# `OzMcp.Structs.ServerCapabilities`
[🔗](https://github.com/oz-elixir/oz_mcp/blob/v0.9.0/lib/oz_mcp/structs/server_capabilities.ex#L1)

Helper module used to build `ServerCapabilities` structure.

_(MCP protocol: 2025-11-25)_

## Short example:

```elixir
%ServerCapabilities{}
  |> ServerCapabilities.resources(true)
  |> ServerCapabilities.build()
```

Result:

```elixir
%{resources: %{subscribe: true}}
```

## Long example:

```elixir
%ServerCapabilities{}
  |> ServerCapabilities.logging(%{})
  |> ServerCapabilities.completions(%{})
  |> ServerCapabilities.resources(true)
  |> ServerCapabilities.tasks(%{}, %{}, %{tools: %{call: %{}}})
  |> ServerCapabilities.build()
```

Result:

```elixir
%{
  resources: %{subscribe: true},
  tasks: %{list: %{}, cancel: %{}, requests: %{tools: %{call: %{}}}},
  logging: %{},
  completions: %{}
}
```

Specification: [ServerCapabilities](https://modelcontextprotocol.io/specification/2025-11-25/schema#servercapabilities)

## Fields

| Field | Setter | Type | Required |
|---|---|---|---|
| `experimental` | `experimental/2` | map | no |
| `logging` | `logging/2` | map | no |
| `completions` | `completions/2` | map | no |
| `prompts` | see the module functions | map | no |
| `resources` | see the module functions | map | no |
| `tools` | see the module functions | map | no |
| `tasks` | see the module functions | map | no |

# `t`

```elixir
@type t() :: %OzMcp.Structs.ServerCapabilities{
  completions: map() | nil,
  experimental: map() | nil,
  logging: map() | nil,
  prompts: map() | nil,
  resources: map() | nil,
  tasks: map() | nil,
  tools: map() | nil
}
```

# `build`

```elixir
@spec build(t()) :: map()
```

# `completions`

```elixir
@spec completions(t(), map() | nil) :: t()
```

# `experimental`

```elixir
@spec experimental(t(), map() | nil) :: t()
```

# `logging`

```elixir
@spec logging(t(), map() | nil) :: t()
```

# `resources`

```elixir
@spec resources(t(), boolean() | nil) :: t()
```

# `tasks`

```elixir
@spec tasks(t(), map() | nil, map() | nil, map() | nil) :: t()
```

---

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