pub fn format_tool_error_for_model(result: &ToolExecutionResult) -> StringExpand 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.