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.
Summary
Functions
Returns extension result types enabled by the declared capabilities.
Returns whether a capabilities object declares the modern extension.
Returns the canonical extension identifier.
Returns the task-state notification method.
Adds the Tasks extension to a client or server capabilities object.
Returns the client-to-server methods defined by the extension.
Returns the capability fragment required by modern task operations.
Returns the result discriminator reserved by the extension.
Validates a task handle or detailed task-state result.
Types
@type validation_error() :: {:invalid_task_field, String.t()}
Functions
Returns extension result types enabled by the declared capabilities.
Returns whether a capabilities object declares the modern extension.
@spec identifier() :: String.t()
Returns the canonical extension identifier.
@spec notification_method() :: String.t()
Returns the task-state notification method.
Adds the Tasks extension to a client or server capabilities object.
@spec request_methods() :: [String.t()]
Returns the client-to-server methods defined by the extension.
@spec required_capabilities() :: map()
Returns the capability fragment required by modern task operations.
@spec result_type() :: String.t()
Returns the result discriminator reserved by the extension.
@spec validate_task_result(map(), :create | :detailed) :: :ok | {:error, validation_error()}
Validates a task handle or detailed task-state result.