# `ExMCP.Server.Capabilities`
[🔗](https://github.com/azmaveth/ex_mcp/blob/v1.0.0/lib/ex_mcp/server/capabilities.ex#L1)

Helper module to build server capabilities.

Uses the VersionRegistry to return appropriate capabilities
based on the negotiated protocol version.

# `build_capabilities`

```elixir
@spec build_capabilities(module(), String.t() | nil) :: map()
```

Builds server capabilities object based on protocol version.

Returns version-specific capabilities from the VersionRegistry.
Handlers can still override this in their handle_initialize/2
if they want to advertise different capabilities.

## Parameters
- handler_module: The handler module (reserved for future use)
- version: The negotiated protocol version (defaults to latest)

## Examples

    iex> ExMCP.Server.Capabilities.build_capabilities(MyHandler, "2025-03-26")
    %{
      "prompts" => %{"listChanged" => true},
      "resources" => %{"subscribe" => true, "listChanged" => true},
      "tools" => %{},
      "logging" => %{"setLevel" => true},
      "completion" => %{},
      "experimental" => %{}
    }

---

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