# 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.

Last checked: 30 Nov 2026, against the vendor's own pages.

Family: Return less.

## 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**: partly (not confirmed). Cap history and output in Make.

## The setting in each harness
- [Vercel AI SDK](https://usefewertokens.com/harnesses/vercel-ai-sdk/): toModelOutput on the tool ([source](https://ai-sdk.dev/docs/ai-sdk-core/tools-and-tool-calling), read 30 Nov 2026)
- [Claude Code](https://usefewertokens.com/harnesses/claude-code/): MAX_MCP_OUTPUT_TOKENS (default 25,000) and BASH_MAX_OUTPUT_LENGTH (default 30,000 characters) ([source](https://code.claude.com/docs/en/env-vars), read 30 Nov 2026)
- [Codex](https://usefewertokens.com/harnesses/codex/): tool_output_token_limit ([source](https://learn.chatgpt.com/docs/config-file/config-reference), read 30 Nov 2026)

## Read more
- [MCP output limits in Claude Code](https://code.claude.com/docs/en/mcp)
- [Codex configuration reference](https://learn.chatgpt.com/docs/config-file/config-reference)
