MCP tool results should support the native Edit tool's diff rendering
<img width="895" height="209" alt="Image" src="https://github.com/user-attachments/assets/54149d58-53b7-4685-811f-29f461451bcb" />
Problem
MCP tools that edit files can only return TextContent, which Claude Code renders as a plain monospace block with escaped \ns. The native Edit tool renders the same information as a colored unified diff (green + / red -). There is no way for an MCP tool to opt into that renderer.
For users of third-party edit tools, every edit produces a wall of text instead of a diff. This is our number one user complaint.
Request
Give MCP tools access to the native Edit tool's diff rendering. Tools should be able to signal "this result is a diff" (e.g. via a content-type annotation on TextContent) and have Claude Code render it the same way as a native Edit call — colored, expanded by default, same visual treatment.
Related issues
- #22619 — generative UI for tools
- #15718 — display/context separation (closed — curious why)
- #13600 — markdown renderer for CLI
- #18177 — configurable diff tools
- #39683 — persistent verbosity setting
Environment
- Claude Code: 2.1.104
- OS / terminal: macOS, iTerm2
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗