Helper module used to build ToolExecution structure.
(MCP protocol: 2025-11-25)
Short example:
%ToolExecution{}
|> ToolExecution.task_support(:optional)
|> ToolExecution.build()Result:
%{taskSupport: :optional}Specification: ToolExecution
Fields
| Field | Setter | Type | Required |
|---|---|---|---|
taskSupport | task_support/2 | term | no |
Summary
Functions
The text that the client shows to the model while a task of the tool
runs. The value is never sent to the client in tools/list: build/1
does not emit it. The CreateTaskResult of a task-augmented call
carries it as io.modelcontextprotocol/model-immediate-response in
_meta.
The preferred interval (ms) between two polls of tasks/get for the
tasks of the tool. The value is never sent to the client: build/1
does not emit it. The task records of the tool carry it as their
pollInterval.
Types
@type immediate_response() :: String.t() | nil
@type poll_interval() :: pos_integer() | nil
@type task_support() :: :forbidden | :optional | :required | String.t() | nil
Functions
@spec immediate_response(t(), immediate_response()) :: t()
The text that the client shows to the model while a task of the tool
runs. The value is never sent to the client in tools/list: build/1
does not emit it. The CreateTaskResult of a task-augmented call
carries it as io.modelcontextprotocol/model-immediate-response in
_meta.
@spec poll_interval(t(), poll_interval()) :: t()
The preferred interval (ms) between two polls of tasks/get for the
tasks of the tool. The value is never sent to the client: build/1
does not emit it. The task records of the tool carry it as their
pollInterval.