Skip to content

feat(mcp): cap MCP tool output fed back to the model#133

Merged
oratis merged 1 commit into
mainfrom
feat/mcp-output-cap
May 31, 2026
Merged

feat(mcp): cap MCP tool output fed back to the model#133
oratis merged 1 commit into
mainfrom
feat/mcp-output-cap

Conversation

@oratis
Copy link
Copy Markdown
Owner

@oratis oratis commented May 31, 2026

A runaway MCP tool response could blow the context window. Each MCP tool's text output is now truncated at 50k chars (capMcpOutput) with a visible [… N characters truncated] notice. +2 tests (passthrough under cap, truncation + notice over cap).

A runaway MCP tool response could blow the context window unbounded. Truncate
each MCP tool's text output at 50k chars (capMcpOutput) with a visible
"[… N characters truncated]" notice. +2 tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@oratis oratis merged commit a38e4a7 into main May 31, 2026
3 checks passed
@oratis oratis deleted the feat/mcp-output-cap branch May 31, 2026 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant