# `Raxol.AgentClientProtocol.Schema.ClientTypes.RequestPermissionRequest`
[🔗](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#L476)

Request from the agent asking the client for permission to perform a tool
call, sent before a sensitive operation.

`tool_call` is a `Raxol.AgentClientProtocol.Schema.ToolCallUpdate`. Per
the established convention in this schema layer (see `Plan.entries`),
`options` decodes leniently -- a missing/non-list value defaults to `[]`
and individual options that fail to decode are skipped, even though the
oracle schema marks `options` as required; only `sessionId` and
`toolCall` can fail this request's decode.

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

# `t`

```elixir
@type t() :: %Raxol.AgentClientProtocol.Schema.ClientTypes.RequestPermissionRequest{
  _meta: map(),
  options: [Raxol.AgentClientProtocol.Schema.ClientTypes.PermissionOption.t()],
  session_id: String.t(),
  tool_call: Raxol.AgentClientProtocol.Schema.ToolCallUpdate.t()
}
```

# `from_json`

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

Total: never raises. A missing/non-string `sessionId`, or a missing/
unparseable `toolCall`, is the only failure mode -- `options` decodes
leniently (see moduledoc).

# `new`

```elixir
@spec new(String.t(), Raxol.AgentClientProtocol.Schema.ToolCallUpdate.t(), [
  Raxol.AgentClientProtocol.Schema.ClientTypes.PermissionOption.t()
]) :: t()
```

# `to_json`

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

---

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