# `Urchin.Capabilities`
[🔗](https://github.com/urth-inc/urchin/blob/v0.4.0/lib/urchin/capabilities.ex#L1)

Builds the `ServerCapabilities` object returned in the `initialize` result and
parses the `ClientCapabilities` received from the client.

A capability group is only advertised when the corresponding feature is enabled,
matching the schema's "present if supported" semantics.

# `feature_flags`

```elixir
@type feature_flags() :: %{
  optional(:tools) =&gt; %{optional(:list_changed) =&gt; boolean()},
  optional(:resources) =&gt; %{
    optional(:subscribe) =&gt; boolean(),
    optional(:list_changed) =&gt; boolean()
  },
  optional(:prompts) =&gt; %{optional(:list_changed) =&gt; boolean()},
  optional(:logging) =&gt; boolean(),
  optional(:completions) =&gt; boolean(),
  optional(:experimental) =&gt; map()
}
```

# `server`

```elixir
@spec server(feature_flags() | keyword()) :: map()
```

Builds the wire-shape server capabilities map from resolved feature flags.

Only enabled groups are included. Sub-flags such as `listChanged`/`subscribe`
default to `false` when omitted.

---

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