# `Raxol.AgentClientProtocol.Schema.ClientTypes.WriteTextFileRequest`
[🔗](https://github.com/DROOdotFOO/raxol-agent/blob/raxol_agent_client_protocol-v0.1.0/packages/raxol_agent_client_protocol/lib/raxol/agent_client_protocol/schema/client_types.ex#L48)

Request to write content to a text file (`fs/write_text_file`). Only sent
if the client declared the `fs.writeTextFile` capability.

Ported from the MIT `f1729/agent_client_protocol` (c) 2025 f1729; see NOTICE.md.

# `t`

```elixir
@type t() :: %Raxol.AgentClientProtocol.Schema.ClientTypes.WriteTextFileRequest{
  _meta: map(),
  content: String.t(),
  path: String.t(),
  session_id: String.t()
}
```

# `from_json`

```elixir
@spec from_json(term()) :: {:ok, t()} | {:error, term()}
```

Total: never raises. Missing/non-string `sessionId`, `path`, or `content` is the only failure mode.

# `new`

```elixir
@spec new(String.t(), String.t(), String.t()) :: t()
```

# `to_json`

```elixir
@spec to_json(t()) :: map()
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
