Agents & tools

Tool result

Also called: tool output

A tool result is the output of running a tool, fed back into the conversation so the model can use it. It is tied to the tool call that requested it, and it is how the model sees the consequences of its own actions.

James Phoenix
Understanding Data Updated July 2, 2026

A tool call asks for an action; a tool result delivers the answer. After your harness runs the requested tool, it packages the output and adds it to the conversation. On the next request the model reads that result and continues, now knowing what the file contained or whether the command passed.

Linking result to call

A tool result references the id of the call it answers, so the model can match output to request even when several tools ran at once:

TypeScript
// Sent back to the model after running the tool
{
  type: 'tool_result',
  tool_use_id: 'toolu_01A2b3',
  content: 'export function main() { /* ... */ }',
}

That paired structure, a call with an id and a result that quotes it, is the backbone of the agent loop.

It lands back in the context window

The result is not free. Whatever you feed back, a file, a stack trace, a directory listing, is now text in the context window, counted in tokens and carried for the rest of the session. This is why dumping a 5,000-line file as a tool result can quietly wreck an agent: it crowds out everything else. Good tools return focused output, and good harnesses trim or summarise large results rather than pasting them whole.

Tip
If an agent slows down or loses the thread after a few tool-heavy steps, look at what the tools are returning. Bloated tool results are one of the most common ways a context window fills up without anyone noticing.

Related terms

Building with AI agents?

This dictionary is part of how I think about agentic engineering. If you want the same thinking applied to your codebase, that is what I do.

See how I can help