# `ExMCP.Registry`
[🔗](https://github.com/azmaveth/ex_mcp/blob/v1.0.0/lib/ex_mcp/registry.ex#L1)

Registry for managing tools, resources, and prompts in ExMCP.

The Registry provides a centralized way to register and lookup MCP capabilities.
It supports dynamic registration and efficient lookup operations.

# `capability`

```elixir
@type capability() :: %{
  name: String.t(),
  type: capability_type(),
  module: module(),
  metadata: map()
}
```

# `capability_type`

```elixir
@type capability_type() :: :tool | :resource | :prompt
```

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `list`

```elixir
@spec list(GenServer.server(), capability_type()) :: [capability()]
```

Lists all capabilities of a given type.

# `list_all`

```elixir
@spec list_all(GenServer.server()) :: [capability()]
```

Lists all capabilities.

# `lookup`

```elixir
@spec lookup(GenServer.server(), capability_type(), String.t()) ::
  {:ok, capability()} | {:error, :not_found}
```

Looks up a capability by type and name.

# `register`

```elixir
@spec register(GenServer.server(), capability_type(), String.t(), module(), map()) ::
  :ok
```

Registers a capability.

# `start_link`

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

Starts the registry.

# `unregister`

```elixir
@spec unregister(GenServer.server(), capability_type(), String.t()) :: :ok
```

Unregisters a capability.

---

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