The tool agent communicates exclusively using JSON in one of two forms:
{
"tool": "<tool_name>",
"args": {
/* arguments matching the tool's input_schema */
}
}{
"final": "<answer text>"
}Any other output is considered invalid.
System: <prompt listing tools>
User: "What is 2 + 2?"
Assistant: {"tool": "calculator", "args": {"expression": "2+2"}}
User: {"result": 4}
Assistant: {"final": "2 + 2 = 4"}