# `ExMCP.Server.RequestState`
[🔗](https://github.com/azmaveth/ex_mcp/blob/v1.4.0/lib/ex_mcp/server/request_state.ex#L1)

Seals and verifies opaque MCP multi-round-trip request state.

State is encoded as bounded JSON and authenticated with AES-256-GCM. The
key ring is runtime configuration; ExMCP never provides or persists a
fallback secret.

# `error`

```elixir
@type error() ::
  :request_state_not_configured
  | :invalid_request_state_configuration
  | :invalid_request_state
  | :request_state_expired
  | :request_state_not_yet_valid
  | :request_state_key_revoked
  | :request_state_key_unknown
  | :request_state_too_large
  | :request_state_binding_mismatch
  | :input_response_ids_mismatch
  | :request_state_not_json
```

# `seal`

```elixir
@spec seal(term(), map(), keyword()) :: {:ok, String.t()} | {:error, error()}
```

# `unseal`

```elixir
@spec unseal(String.t(), ExMCP.Server.RequestContext.t(), map(), map(), keyword()) ::
  {:ok, map()} | {:error, error()}
```

# `validate_configuration`

```elixir
@spec validate_configuration(keyword()) :: :ok | {:error, error()}
```

Validates that an active 256-bit key is present in the runtime key ring.

---

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