Optimize your agent

Return less

Cap tool output

A single chatty tool response can fill the window. Coding agents and SDKs let you cap how many tokens one tool result may return, or reshape the result before the model sees it, so one broad list call can't crowd out the rest of the task.

Checked on the vendor's pages 30 Nov 2026

Where it fits

Building my own agent Fits

Reshape results with toModelOutput in the Vercel AI SDK.

Using a coding agent Fits

MAX_MCP_OUTPUT_TOKENS, tool_output_token_limit.

Using an enterprise assistant Not available

No setting exposed.

Using a workflow tool Not confirmed

Cap history and output in Make.

The setting in each harness

Read on each vendor's own page, linked next to the setting.

HarnessSetting
Vercel AI SDK

toModelOutput on the tool

ai-sdk.dev, read 30 Nov 2026
Claude Code

MAX_MCP_OUTPUT_TOKENS (default 25,000) and BASH_MAX_OUTPUT_LENGTH (default 30,000 characters)

code.claude.com, read 30 Nov 2026
Codex