# `Mead.MCP.Server.Tools`
[🔗](https://github.com/albertosca/mead/blob/main/lib/mead/mcp/server/tools.ex#L1)

The nine tools the MCP server offers: `start_session`, `submit_turn`, `history`,
`stop_session`, `resume_session`, `delete_session`, `list_sessions`, `compact_session`, and
`usage`. They are the only code of the server that touches the runtime, and they do it only through the
public `Mead` API.

A tool never raises for what a client can send. Arguments of the wrong type come back as
`{:error, {:invalid_params, message}}`, which the dispatcher turns into a JSON-RPC error.
What goes wrong while the tool runs (an unknown session, a failed turn, a timeout) comes back
as an ordinary result with `"isError" => true` and a short fixed message: no stack trace, no
provider text, no internal term.

# `context`

```elixir
@type context() :: %{allow_effect: boolean()}
```

# `call`

```elixir
@spec call(term(), map(), context()) ::
  {:ok, map()}
  | {:error, :unknown_tool}
  | {:error, {:invalid_params, String.t()}}
```

# `definitions`

```elixir
@spec definitions() :: [map()]
```

---

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