# `Mead.MCP.Catalog`
[🔗](https://github.com/albertosca/mead/blob/main/lib/mead/mcp/catalog.ex#L1)

The tools the connected MCP servers offer, plus the normalized server configuration, in an ETS
table any process can read.

The process owns the table and is the only writer. A connection registers its tools after the
handshake, and the catalog monitors that connection, so a connection that is killed without
running `terminate/2` still loses its tools. A server re-registered by a newer connection keeps
the new rows when the old connection's death is noticed afterwards.

The configuration lives here so that `Mead.MCP.Hub` can ask the policy for a decision with one
read and no call.

# `tool`

```elixir
@type tool() :: %{
  name: String.t(),
  description: String.t() | nil,
  input_schema: map()
}
```

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `register`

```elixir
@spec register(atom(), atom(), pid(), [tool()]) :: :ok
```

# `snapshot`

```elixir
@spec snapshot(atom()) :: {:ok, [map()], [map()]} | :unavailable
```

# `start_link`

```elixir
@spec start_link(keyword()) :: GenServer.on_start()
```

# `unregister`

```elixir
@spec unregister(atom(), atom()) :: :ok
```

---

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