Raxol. AgentClientProtocol. Schema. ToolCall
(Raxol Agent Client Protocol v0.1.0)
Copy Markdown
View Source
Represents a tool call that the language model has requested. Every other
type ported from tool_call.ex (ToolKind, ToolCallStatus,
ToolCallLocation, Diff, ToolCallTerminal, ToolCallContentWrapper,
ToolCallContent, ToolCallUpdateFields, ToolCallUpdate) is a separate,
bare Schema.* module, not nested under this one.
kind and status default (:other / :pending) rather than erroring
on an unrecognized wire value; content and locations default to []
and skip items that individually fail to decode.
Ported from the MIT f1729/agent_client_protocol (c) 2025 f1729; see NOTICE.md.
Summary
Functions
Total: never raises. Missing/non-string toolCallId or title is the
only failure mode (the two required fields); everything else defaults
leniently per the schema.
Project this ToolCall down to a ToolCallUpdate carrying its full current state.
Apply a partial update, overwriting only the fields present (non-nil) in fields.
Types
@type t() :: %Raxol.AgentClientProtocol.Schema.ToolCall{ _meta: map(), content: [Raxol.AgentClientProtocol.Schema.ToolCallContent.t()], kind: Raxol.AgentClientProtocol.Schema.ToolKind.t(), locations: [Raxol.AgentClientProtocol.Schema.ToolCallLocation.t()], raw_input: term() | nil, raw_output: term() | nil, status: Raxol.AgentClientProtocol.Schema.ToolCallStatus.t(), title: String.t(), tool_call_id: String.t() }
Functions
Total: never raises. Missing/non-string toolCallId or title is the
only failure mode (the two required fields); everything else defaults
leniently per the schema.
@spec to_update(t()) :: Raxol.AgentClientProtocol.Schema.ToolCallUpdate.t()
Project this ToolCall down to a ToolCallUpdate carrying its full current state.
@spec update(t(), Raxol.AgentClientProtocol.Schema.ToolCallUpdateFields.t()) :: t()
Apply a partial update, overwriting only the fields present (non-nil) in fields.