pub struct ChatToolCallCompleteAction {
pub turn_id: String,
pub tool_call_id: String,
pub meta: Option<JsonObject>,
pub result: ToolCallResult,
pub requires_result_confirmation: Option<bool>,
}Expand description
Tool execution finished. Transitions to completed or pending-result-confirmation
if requiresResultConfirmation is true.
For client-provided tools (whose tool call state carries a client
ToolCallContributor with a clientId), the owning client dispatches this
action with the execution result. The server SHOULD reject this action if the
dispatching client does not match the contributor’s clientId.
Servers waiting on a client tool call MAY time out after a reasonable duration
if the implementing client disconnects or becomes unresponsive, and dispatch
this action with result.success = false and an appropriate error.
A client MAY also dispatch this action with a failed result (
result.success: false) for a tool call currently in auth-required
status, to cancel that invocation without completing the pending MCP
authentication challenge. This always transitions the tool call straight
to completed, preserving the fields it had before pausing for auth;
requiresResultConfirmation is ignored for this transition; the
cancellation can never enter pending-result-confirmation, since there is
no real result to review.
A successful result (result.success: true) is invalid for a tool
call in auth-required status — execution never resumed after the
challenge, so there’s nothing that could have produced it. The reducer
MUST reject/ignore it as a no-op, leaving the tool call in
auth-required. The client must resolve the auth challenge
(chat/toolCallAuthResolved) before completing successfully.
Fields§
§turn_id: StringTurn identifier
tool_call_id: StringTool call identifier
meta: Option<JsonObject>Additional provider-specific metadata for this tool call.
Clients MAY look for well-known keys here to provide enhanced UI.
For example, a ptyTerminal key with { input: string; output: string }
indicates the tool operated on a terminal (both input and output may
contain escape sequences).
result: ToolCallResultExecution result
requires_result_confirmation: Option<bool>If true, the result requires client approval before finalizing
Trait Implementations§
Source§impl Clone for ChatToolCallCompleteAction
impl Clone for ChatToolCallCompleteAction
Source§fn clone(&self) -> ChatToolCallCompleteAction
fn clone(&self) -> ChatToolCallCompleteAction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more