claude-code - 💡(How to fix) Fix Feature request: show MCP tool args but collapse result output by default [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#55696Fetched 2026-05-03 04:46:52
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
0
Author
Timeline (top)
labeled ×4cross-referenced ×2commented ×1

Request a display mode (or per-MCP-server config) where tool call arguments remain visible in the chat UI but the result payload is collapsed by default.

Root Cause

Request a display mode (or per-MCP-server config) where tool call arguments remain visible in the chat UI but the result payload is collapsed by default.

Fix Action

Fix / Workaround

1. Local server patch

Patched remnote-mcp-server to return only a short placeholder string ([toolName ok]) in content, keeping the full payload in structuredContent (which the LLM still reads fine).

Code Example

Called remnote (ctrl+o to expand)
RAW_BUFFERClick to expand / collapse

Summary

Request a display mode (or per-MCP-server config) where tool call arguments remain visible in the chat UI but the result payload is collapsed by default.

Use case

I use an MCP server (remnote-mcp-server) whose tools return large JSON results. By default, Claude Code renders the full JSON from the MCP response's content field as a wall of text — hundreds of lines per tool call. Several other MCP servers I use render tool calls as a collapsed line like Called <tool> (ctrl+o to expand) that I can drill into on demand.

What I tried

1. Local server patch

Patched remnote-mcp-server to return only a short placeholder string ([toolName ok]) in content, keeping the full payload in structuredContent (which the LLM still reads fine).

Result: chat now shows nothing more than:

Called remnote (ctrl+o to expand)

No args visible. No result visible. The short placeholder I put in content doesn't render either. Pressing ctrl+o does not expand it — it toggles overall view mode, and there's still nothing to see for that tool call. Net: I lost visibility into what was queried in exchange for losing the JSON wall. The only way to recover the query is to open the session's .jsonl transcript manually.

2. Looked for a Claude Code setting

Checked the MCP docs and settings.json reference. MAX_MCP_OUTPUT_TOKENS controls truncation, and MCP servers can declare an anthropic/maxResultSizeChars annotation, but neither provides a "collapse the output, keep the args visible" display mode. No settings.json key found for this.

3. Filed upstream issue on the MCP server

robert7/remnote-mcp-server#15 — but this is really a Claude Code UI concern, not an MCP server concern, and affects any server that returns non-trivial result payloads.

Proposed behavior

Any of:

  • Settings key like mcpOutputDisplay: "compact" | "full" (default full for back-compat) that collapses result rendering to a summary line while still showing the tool + args header.
  • Always collapse tool results by default; always show args. This matches what many other agent UIs (Cursor, Zed MCP integrations) do. ctrl+o expands the result block.
  • Per-MCP-server config in settings.json to opt individual servers into compact rendering.

Related

  • MCP server tool responses carry both structuredContent and content. Spec-aware clients should be able to render one and hide the other; today Claude Code's UI seems to render content verbatim regardless of whether structuredContent is populated.

Environment

  • Claude Code (latest, darwin arm64, macOS 15 Tahoe)
  • Observed across multiple MCP servers with large results; most acute with remnote-mcp-server v0.13.0

extent analysis

TL;DR

Implement a settings key like mcpOutputDisplay to control the display mode of MCP tool results, allowing for a compact view that shows arguments but collapses the result payload by default.

Guidance

  • Investigate adding a mcpOutputDisplay settings key with options like "compact" or "full" to control the rendering of MCP tool results.
  • Consider implementing a per-MCP-server config in settings.json to allow individual servers to opt into compact rendering.
  • Review the rendering logic for content and structuredContent fields in MCP server responses to ensure that spec-aware clients can render one and hide the other.
  • Explore updating the UI to always collapse tool results by default while showing the tool and arguments header, with ctrl+o expanding the result block.

Example

No code snippet is provided as the issue is more related to the UI rendering and settings configuration.

Notes

The proposed solution relies on the assumption that the Claude Code UI can be modified to render MCP tool results in a compact view. The issue may require coordination with the Claude Code development team to implement the desired changes.

Recommendation

Apply a workaround by implementing a settings key like mcpOutputDisplay to control the display mode of MCP tool results, as this provides a flexible solution that can be easily reverted if needed.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING