Skip to main content

error_tool_result

Function error_tool_result 

Source
pub fn error_tool_result(call: &ToolCall, e: impl ToString) -> Message
Expand description

Builds an error tool-result message for a failed tool call.

The message carries is_error: Some(true) so LLM clients can report the failure back to the model (Claude’s tool_result is_error) instead of aborting the whole flow. This is the designated return path for parse, validation, and execution failures of tool calls.