format_tool_error_for_model

Function format_tool_error_for_model 

Source
pub fn format_tool_error_for_model(result: &ToolExecutionResult) -> String
Expand description

Formats a tool execution error for sending back to the model.

If the error is retryable (e.g., JSON parse or validation error), includes a message asking the model to correct the arguments and try again.