# `ExMCP.Tasks.Extension`
[🔗](https://github.com/azmaveth/ex_mcp/blob/v1.4.0/lib/ex_mcp/tasks/extension.ex#L1)

Capability and wire helpers for the MCP Tasks extension.

The extension is defined for the modern protocol era under
`io.modelcontextprotocol/tasks`. It is deliberately separate from the
experimental `tasks` capability used by MCP 2025-11-25; declaring one never
implies support for the other.

# `validation_error`

```elixir
@type validation_error() :: {:invalid_task_field, String.t()}
```

# `allowed_result_types`

```elixir
@spec allowed_result_types(term()) :: [String.t()]
```

Returns extension result types enabled by the declared capabilities.

# `declared?`

```elixir
@spec declared?(term()) :: boolean()
```

Returns whether a capabilities object declares the modern extension.

# `identifier`

```elixir
@spec identifier() :: String.t()
```

Returns the canonical extension identifier.

# `notification_method`

```elixir
@spec notification_method() :: String.t()
```

Returns the task-state notification method.

# `put_capability`

```elixir
@spec put_capability(map()) :: map()
```

Adds the Tasks extension to a client or server capabilities object.

# `request_methods`

```elixir
@spec request_methods() :: [String.t()]
```

Returns the client-to-server methods defined by the extension.

# `required_capabilities`

```elixir
@spec required_capabilities() :: map()
```

Returns the capability fragment required by modern task operations.

# `result_type`

```elixir
@spec result_type() :: String.t()
```

Returns the result discriminator reserved by the extension.

# `validate_task_result`

```elixir
@spec validate_task_result(map(), :create | :detailed) ::
  :ok | {:error, validation_error()}
```

Validates a task handle or detailed task-state result.

---

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