# `Nous.MCP.Adapter`
[🔗](https://github.com/nyo16/nous/blob/v0.21.1/lib/nous/mcp/adapter.ex#L1)

Client-library boundary for MCP discovery and invocation.

Return wire-format descriptors with string keys, including `"name"` and an
object `"inputSchema"`. A page ends with a cursor string or `nil`.

Successful calls return model-visible JSON data. Keep credentials, HTTP
headers and host-only metadata outside this value. Use `:remote_error` for a
reported tool failure, `:unavailable` when the call could not start, and
`:unknown_outcome` if a dispatched call lost its response or timed out.
Adapters must never replay a call whose outcome is unknown.

# `descriptor`

```elixir
@type descriptor() :: %{required(String.t()) =&gt; term()}
```

# `error`

```elixir
@type error() :: Nous.MCP.Connection.error() | :remote_error | :unknown_outcome
```

# `call_tool`

```elixir
@callback call_tool(term(), String.t(), map()) :: {:ok, term()} | {:error, error()}
```

# `list_tools`

```elixir
@callback list_tools(term(), String.t() | nil) ::
  {:ok, [descriptor()], String.t() | nil} | {:error, error()}
```

---

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