Tool result size cap (~25K tokens) blocks round-tripping large MCP tool payloads

Resolved 💬 3 comments Opened Apr 9, 2026 by danielrdc Closed Apr 9, 2026

Bug: Tool result size cap prevents valid MCP workflows

Tool results over ~25K tokens are automatically persisted to a file and replaced with a 2KB preview, even when the context window has ample capacity. This is a harness-level decision that prevents the model from seeing the full tool result — and consequently prevents it from passing that data back as a parameter to another tool call.

This is not a model limitation. The model's context window (200K+ tokens) can handle these payloads. The harness intercepts and truncates the result before the model ever sees it.

Concrete use case

We use the Atlassian MCP server's getConfluencePage (returns full ADF body) and updateConfluencePage (accepts full ADF body) tools to make surgical edits to Confluence pages. The workflow is:

  1. Fetch page ADF (~300KB for a page with ~80 table rows)
  2. Insert a new table row into the ADF JSON
  3. Pass the updated ADF back to the update tool

This works fine for small pages (~20KB), but for larger pages:

  • Step 1 fails: The tool result (290KB / ~160K tokens) exceeds the ~25K token cap and gets persisted to a file. The model only sees a 2KB preview.
  • Step 3 fails: Even if the model could reconstruct the body (e.g., via Bash), it cannot emit ~160K tokens as a tool call parameter.

The page body can't come in through a tool result, and can't go back out through a tool parameter. It's stuck on both sides.

Expected behavior

The harness should not truncate tool results that fit within the model's available context window. A 300KB payload (~160K tokens) is well within a 200K+ token context window and should be passed through to the model.

Current behavior

The harness enforces a hardcoded ~25K token cap on tool results regardless of available context capacity. Results exceeding this cap are persisted to a local file, and the model receives only a 2KB preview. This cap is not configurable.

Environment

  • Claude Code CLI
  • Atlassian MCP server (https://mcp.atlassian.com/v1/mcp)
  • Page size: ~300KB ADF / ~160K tokens / ~80 table rows

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗