Skip to content

APP-2527: Specs for MCP tool call JSON tree rendering#12818

Draft
cephalonaut wants to merge 4 commits into
masterfrom
oz-agent/mcp-json-tree-spec
Draft

APP-2527: Specs for MCP tool call JSON tree rendering#12818
cephalonaut wants to merge 4 commits into
masterfrom
oz-agent/mcp-json-tree-spec

Conversation

@cephalonaut

@cephalonaut cephalonaut commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Description

Adds a product spec and tech spec (no code changes) for rendering MCP tool call JSON requests and responses in the Warp client as a collapsible tree instead of an unformatted pretty-printed JSON blob.

Specs live in specs/APP-2527/:

  • PRODUCT.md — user-facing behavior as numbered, testable invariants: collapsible nodes with chevron expanders, theme-colored keys/values by type, long-string elision that expands in place, request/response sections, default expansion state, selection/copy, and malformed/streaming edge cases.
  • TECH.md — implementation plan grounded in the current rendering path (requested_command.rs should_render_mcp_content branch, block.rs MCP command_text construction, CallMCPToolResult), proposing a new mcp_json_tree module, path-keyed expansion state on RequestedCommandView, and theme-token-driven typed colors. Includes tradeoffs, testing/validation mapped to the product invariants, risks, and follow-ups. Code references are pinned to commit 46265f4.

The visual treatment follows Warp UI conventions; the originating request included a reference screenshot of a generic collapsible JSON tree.

Linked Issue

APP-2527

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

Conversation: https://staging.warp.dev/conversation/16b6d33c-f180-45bb-82f7-8b721b09d153
Run: https://oz.staging.warp.dev/runs/019edddf-9ac8-7afd-8ac1-84888afdac83

This PR was generated with Oz.

@cla-bot cla-bot Bot added the cla-signed label Jun 19, 2026
Co-Authored-By: Oz <oz-agent@warp.dev>
@cephalonaut cephalonaut changed the title Specs: MCP tool call JSON tree rendering APP-2527: Specs for MCP tool call JSON tree rendering Jun 19, 2026
cephalonaut and others added 2 commits June 18, 2026 23:53
… component, design alternatives, and phased impl

Co-Authored-By: Oz <oz-agent@warp.dev>
PRODUCT.md: clarify Behavior 8 (annotation count is sole non-empty signal), fix Behavior 12 (no ambiguous 'or disabled chevron'), add Behavior 16 (response arrives while header collapsed), add Behavior 17 (tree scroll/max-height), renumber downstream behaviors, fix Copy semantics (no-op without selection), unify context menu description for node rows and section labels.

TECH.md: add color mapping to Design §A1, use Vec<PathSegment> not Rc<[PathSegment]> as HashMap key, define LONG_STRING_THRESHOLD=120, remove render_expansion_icon cross-module dependency (use warpui icons directly), move mcp_result_to_renderable test note to Phase 2 and fix name, add SelectableArea+Hoverable interaction risk, add scrollable tree body and correct behavior refs in Phase 3, update testing table with new behavior numbers.

Co-Authored-By: Oz <oz-agent@warp.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant