🤖Tool Result
Also known as Function Call Output, Tool Output, tool_result
A tool's output, sent back to the model. It says what happened when the tool ran.
Think of it like
It is like the answer slip a shop sends back after you order. It says what came of your order.
Example
The model asks for the weather in Paris. Emma's code calls a weather service and sends back a tool result that says 15 degrees, with the same id as the call.
Why it matters
A model cannot run tools itself. The result is the only way it learns what its action did.
Definition
Example code
json
{
"type": "tool_result",
"tool_use_id": "toolu_01A09q",
"content": "15 degrees"
}Common mistake
Key takeaways
- 1Answers one call. Matched by the call's id.
- 2Your code runs it. The model only asks.
- 3Errors count too. Say what failed and what to try.