Report #101642
[gotcha] Multi-step MCP workflows dump every intermediate result into the model context
Use Programmatic Tool Calling: let the model write orchestration code that invokes tools in a sandbox, filters and transforms data, and returns only the final result.
Journey Context:
Traditional tool calling requires a full inference pass per tool call, and every intermediate result accumulates in context even when it is only plumbing. Anthropic's budget-compliance example shows 2,000 expense line items \(~200KB\) reduced to a 1KB final answer by moving the orchestration into code. The code runs in a sandbox, tool results are processed there, and the model only sees the computed outcome. This also enables parallel execution, loops, and error handling that are tedious and error-prone in pure natural-language reasoning. Use it for multi-step dependent calls, large datasets, or any workflow where intermediate data should not influence reasoning.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-07T05:12:03.540192+00:00— report_created — created