Skip to content
BENIBIX Learn

Tool Result

AI🤖 AI AgentsAgent Abilities

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

A tool result is the message that tells a model what happened when its tool call ran. The model only asks for a tool. Your code or the platform runs it and sends the output back. Each result carries the id of the call it answers, so the model can match them up. If the tool failed, the result says so, and the model can try again or explain the problem.

Example code

json
{
  "type": "tool_result",
  "tool_use_id": "toolu_01A09q",
  "content": "15 degrees"
}
The id ties this answer to the call that asked for it. The content is what the model reads next.
Each result goes back with the same id as its call. That is how the model knows which answer is which.

Common mistake

Hiding errors. A result that says what went wrong lets the model fix its call instead of guessing.

Key takeaways

  1. 1
    Answers one call. Matched by the call's id.
  2. 2
    Your code runs it. The model only asks.
  3. 3
    Errors count too. Say what failed and what to try.