ExMCP.Types.V20251125 (ex_mcp v0.10.0)
View SourceType definitions for MCP protocol version 2025-11-25.
This module contains type definitions specific to the 2025-11-25 version of the Model Context Protocol specification.
Key changes from 2025-06-18:
- Tasks: experimental async state machines for long-running tool calls
- URL-mode elicitation: server can send URL instead of form schema
- Icons metadata on tools, resources, prompts, and serverInfo
- Tool calling in sampling (tools and toolChoice in createMessage)
- Enhanced OAuth/OIDC authorization with incremental scope
- Tool name validation (alphanumeric, dots, hyphens, underscores)
- title/description fields on Implementation
- size/lastModified fields on resource annotations
Summary
Types
Enhanced tool result.
Client capabilities for 2025-11-25.
Result of creating a task (immediate response to tools/call with task support).
Elicitation result (updated for 2025-11-25 to support URL mode).
Icon metadata for tools, resources, prompts, and server info.
Implementation info with title and description fields (new in 2025-11-25).
Meta field for extensibility.
Prompt with icons (new in 2025-11-25).
Resource with icons, size, and lastModified (new in 2025-11-25).
Resource annotations with lastModified (new in 2025-11-25).
Server capabilities for 2025-11-25. Adds tasks capability.
Task struct representing an async operation.
Task state enum.
Task support configuration on a tool.
Tool definition with icons and execution/task support (new in 2025-11-25).
Tool annotations.
Tool choice for sampling/createMessage.
Tool result content type (result of tool execution).
Tool use content type (model using a tool).
URL-mode elicitation request (new in 2025-11-25). Server sends a URL for the client to navigate to instead of a form schema.
Types
@type call_tool_result() :: %{ optional(:content) => [ExMCP.Types.content()], optional(:structuredContent) => any(), optional(:resourceLinks) => [ExMCP.Types.V20250618.resource_link()], optional(:isError) => boolean(), optional(:_meta) => meta() }
Enhanced tool result.
@type client_capabilities() :: %{ optional(:experimental) => %{required(String.t()) => any()}, optional(:sampling) => %{required(String.t()) => any()}, optional(:roots) => %{optional(:listChanged) => boolean()}, optional(:elicitation) => %{}, optional(:_meta) => meta() }
Client capabilities for 2025-11-25.
@type create_task_result() :: %{ :taskId => String.t(), :state => task_state(), optional(:metadata) => map() }
Result of creating a task (immediate response to tools/call with task support).
@type cursor() :: ExMCP.Types.cursor()
@type elicit_result() :: %{ :action => String.t(), optional(:content) => %{required(String.t()) => any()}, optional(:_meta) => meta() }
Elicitation result (updated for 2025-11-25 to support URL mode).
@type icon() :: %{ :src => String.t(), optional(:mimeType) => String.t(), optional(:sizes) => String.t(), optional(:theme) => String.t() }
Icon metadata for tools, resources, prompts, and server info.
@type implementation() :: %{ :name => String.t(), :version => String.t(), optional(:title) => String.t(), optional(:description) => String.t(), optional(:websiteUrl) => String.t(), optional(:icons) => [icon()] }
Implementation info with title and description fields (new in 2025-11-25).
@type json_schema() :: map()
@type json_value() :: any()
@type log_level() :: ExMCP.Types.log_level()
Meta field for extensibility.
@type progress_token() :: ExMCP.Types.progress_token()
@type prompt() :: %{ :name => String.t(), optional(:title) => String.t(), optional(:description) => String.t(), optional(:arguments) => [ExMCP.Types.prompt_argument()], optional(:annotations) => ExMCP.Types.annotations(), optional(:icons) => [icon()], optional(:_meta) => meta() }
Prompt with icons (new in 2025-11-25).
@type request_id() :: ExMCP.Types.request_id()
@type resource() :: %{ :uri => String.t(), optional(:title) => String.t(), optional(:name) => String.t(), optional(:description) => String.t(), optional(:mimeType) => String.t(), optional(:annotations) => resource_annotations(), optional(:icons) => [icon()], optional(:size) => integer(), optional(:lastModified) => String.t(), optional(:_meta) => meta() }
Resource with icons, size, and lastModified (new in 2025-11-25).
@type resource_annotations() :: %{ optional(:audience) => [ExMCP.Types.role()], optional(:priority) => float(), optional(:lastModified) => String.t() }
Resource annotations with lastModified (new in 2025-11-25).
@type server_capabilities() :: %{ optional(:experimental) => %{required(String.t()) => any()}, optional(:prompts) => %{optional(:listChanged) => boolean()}, optional(:resources) => %{ optional(:subscribe) => boolean(), optional(:listChanged) => boolean() }, optional(:tools) => %{ optional(:listChanged) => boolean(), optional(:outputSchema) => boolean() }, optional(:logging) => %{}, optional(:completions) => %{}, optional(:tasks) => %{}, optional(:_meta) => meta() }
Server capabilities for 2025-11-25. Adds tasks capability.
@type task() :: %{ :taskId => String.t(), :status => task_state(), optional(:statusMessage) => String.t(), :createdAt => String.t(), :lastUpdatedAt => String.t(), :ttl => integer(), optional(:pollInterval) => integer() }
Task struct representing an async operation.
@type task_state() :: :working | :input_required | :completed | :failed | :cancelled
Task state enum.
@type task_support() :: %{
optional(:taskSupport) => :required | :optional | :forbidden
}
Task support configuration on a tool.
@type tool() :: %{ :name => String.t(), optional(:title) => String.t(), optional(:description) => String.t(), :inputSchema => json_schema(), optional(:outputSchema) => json_schema(), optional(:annotations) => tool_annotations(), optional(:icons) => [icon()], optional(:execution) => task_support(), optional(:_meta) => meta() }
Tool definition with icons and execution/task support (new in 2025-11-25).
@type tool_annotations() :: %{ optional(:title) => String.t(), optional(:readOnlyHint) => boolean(), optional(:destructiveHint) => boolean(), optional(:idempotentHint) => boolean(), optional(:openWorldHint) => boolean() }
Tool annotations.
@type tool_choice() :: %{optional(:mode) => String.t()}
Tool choice for sampling/createMessage.
@type tool_result_content() :: %{ :type => String.t(), :toolUseId => String.t(), :content => [ExMCP.Types.content()], optional(:isError) => boolean() }
Tool result content type (result of tool execution).
Tool use content type (model using a tool).
@type url_elicit_request() :: %{ :message => String.t(), :url => String.t(), :mode => String.t(), :elicitationId => String.t(), optional(:_meta) => meta() }
URL-mode elicitation request (new in 2025-11-25). Server sends a URL for the client to navigate to instead of a form schema.