Skip to content

fix(mcp): route large tool output through shared storage policy - #1347

Merged
wsp1911 merged 1 commit into
GCWing:mainfrom
wsp1911:main
Jun 29, 2026
Merged

fix(mcp): route large tool output through shared storage policy#1347
wsp1911 merged 1 commit into
GCWing:mainfrom
wsp1911:main

Conversation

@wsp1911

@wsp1911 wsp1911 commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Remove the MCP adapter's 12k pre-truncation so large MCP tool outputs flow into the shared tool-result storage policy. Add regression coverage to ensure MCP rendering preserves output beyond the old limit before storage budgeting runs.

Fixes #

Type and Areas

Type:

bug fix, test

Areas:

Rust core, MCP tools

Motivation / Impact

MCP tool results were truncated before the shared oversized tool-result storage path could evaluate them, which could discard content instead of persisting large outputs with a preview. MCP results now use the same downstream storage policy as other large tool outputs.

Verification

  • cargo test -p bitfun-core mcp_tool_result_rendering_does_not_pretruncate_before_storage_policy -- --nocapture - passed

Reviewer Notes

This keeps the existing shared storage thresholds unchanged; it only removes the MCP-specific 12k pre-truncation.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable.

Remove the MCP adapter's 12k pre-truncation so oversized MCP tool results can be handled by the shared tool-result storage policy instead. Add coverage to ensure MCP rendering preserves output beyond the old limit before storage budgeting runs.
@wsp1911
wsp1911 marked this pull request as ready for review June 29, 2026 11:29
@wsp1911
wsp1911 merged commit d770932 into GCWing:main Jun 29, 2026
4 checks passed
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