Blog / Tool results and errors

Next-step hints: make every tool result tell the agent what to do next

The agent reads your tool results more closely than anything else you send it. That's the best place to say what comes next: not in a skill it may not have, or an instruction it read 20 calls ago.

Leonid Bugaev · Published 21 Oct 2026

What agents skipped

On a 99-tool production MCP server, without the vendor's skills, Claude Code and Codex got most answers right but missed the intended path:

With the skills, both followed the playbook. Without them, nothing in the results said “check the balance next” or “use the since cursor”. More: agent skills vs MCP server.

See where agents go off your intended path.

We trace your users' jobs call by call in the agent apps they use and show where a next-step hint would keep them on track.

Test your MCP

Why results are the right place

The shape of a hint

{
  "balance": 6567,
  "next": {
    "tool": "preview_plan",
    "args": {"max_credits": 3000},
    "why": "Preview before starting. Nothing is spent until the user confirms."
  },
  "if_blocked": {"tool": "get_spend", "why": "See what's already reserved."}
}

A compliance SaaS MCP server we studied does this in its start-here tool: the result names a focus area with the reason and the exact items, plus an if_blocked fallback that names another tool and its arguments.

Hints in errors

{"error": "list_items: status \"waiting\" is not valid. Use open, blocked, in_review or done. Call get_stats to get valid values.",
 "guidance": {"state": "fix_args", "next": "get_stats"}}

On our made-up task-tracker mock this one-line style was 51 tokens against 3,109 for a schema dump, and errors stopped with the fixed surface (4/30 runs with an error before, 0/30 after). Don't mark a typo as “ask the user”: see agent refusal states.

Go deeper: The two-step confirm pattern, Make agents read your instructions first, The 12,689-token typo.

What not to do

Back to tool results and errors for agents.

How we measured

FAQ

How can tool results guide an agent's next call?

Add a small field to each result naming the next tool to call, with the arguments that matter and a one-line reason, plus a fallback if that step is blocked. Agents read results closely and act on them.

What should a next-step hint contain?

The tool name, key arguments (such as a cursor or an ID), a one-line reason, and optionally an alternative. Keep it to one step.

Should hints be prose or structured?

Both work; structured is easier to keep consistent: for example {"next": {"tool": "preview_plan", "args": {...}, "why": "..."}}.

Can a hint make an agent do something unsafe?

It shouldn't be able to. A hint suggests; spends and writes still need the user's yes and a confirm step on the server.

See where agents go off your intended path.

We trace your users' jobs call by call in the agent apps they use and show where a next-step hint would keep them on track.

Test your MCP