You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
authored
feat: surface MCP tool + server identity in confirmation card and invocation states (#14298)
## Summary
The MCP tool execution confirmation card did not show which tool was
being executed or which server that tool came from (APP-4965). This PR
surfaces both the tool name and its originating server across the GUI
and TUI MCP invocation states, with deterministic fallback copy when
identity cannot be resolved.
### GUI
- **Confirmation/blocked card title** now reads `OK if I call MCP tool
{tool} on server {server}` (falling back to the tool name alone when the
server is unknown, and to the generic `OK if I call this MCP tool?` when
the tool name is also unavailable).
- **Expanded running/finished detail header** now reads `Viewing MCP
tool {tool} on {server}` (with the same fallbacks).
- **Preprocessing/queued/finished header titles** now show `{tool} on
{server}` for MCP tool calls, without the `MCP Tool:` presentation
prefix.
- **Warping/loading indicator** now reads `Calling "{name}" MCP tool on
{server}...` when the server is known.
- The action's `name` and `server_id` are passed directly into
`RequestedCommandView` and stored independently of formatted command
text, so headers never parse presentation labels to recover identity.
Server names resolve through `TemplatableMCPServerManager::get_mcp_name`
(non-panicking), even after the action leaves the pending queue. Non-MCP
actions are unchanged.
### TUI
- **Permission card question** now reads `Is it OK if I call MCP tool
{name} on {server}?` (with fallbacks).
- **Permission card details body** labels the tool with its server when
known.
- **Transcript lifecycle labels** (`tool_call_labels`) now append ` on
{server}` to the `CallMCPTool` labels across
constructing/pending/blocked/running/succeeded/failed/cancelled states.
- Added `mcp_server_name_for_id` to `tui_export` so the TUI crate can
resolve server names from the action's `server_id`.
### Tests
- GUI pure title formatter tests (`mcp_blocked_title_text` /
`mcp_viewing_detail_title_text`) for known server, unknown server, and
empty tool name.
- TUI MCP lifecycle label regression test across all states with and
without a server.
- Updated `tui_generic_tool_call_view_tests.rs` to assert tool+server
identity in the permission card question, details, and rendered output.
## Verification
### Completed
- `cargo fmt --all -- --check` — passed after the review fix.
- `git diff --check` — passed.
### Blocked by runner memory ceiling
- `CARGO_BUILD_JOBS=1 CARGO_INCREMENTAL=0 CARGO_PROFILE_DEV_DEBUG=0
CARGO_PROFILE_DEV_OPT_LEVEL=0 CARGO_PROFILE_DEV_CODEGEN_UNITS=256
RUSTFLAGS='-C debuginfo=0' cargo test -p warp_tui --lib` — SIGKILL
(signal 9) while compiling the shared `warp` library; no tests ran.
- The same memory-constrained command with `cargo test -p warp --lib
requested_command --no-fail-fast` — SIGKILL (signal 9) while compiling
`warp`; no tests ran.
- The required `cargo build --bin warp` with the same memory constraints
— SIGKILL (signal 9) during the app build/link step.
- `./script/presubmit`, clippy, and computer-use visual proof could not
run because the app/test artifacts were never produced. The before/after
screenshots of the confirmation card and audited lifecycle states remain
outstanding.
The PR remains a **draft** until a larger runner can complete the app
build, run the touched-package tests and repository presubmit gates, and
capture the required UI evidence. No `impl-done` completion signal has
been applied.
Originating thread:
https://linear.app/warpdotdev/issue/APP-4965/mcp-tool-execution-confirmation-card-should-show-tool-name-and-server
<!-- factory-agent:
{"source":"factory-agent","task_id":"APP-4965","task_source":"linear","task_url":"https://linear.app/warpdotdev/issue/APP-4965/mcp-tool-execution-confirmation-card-should-show-tool-name-and-server","oz_run_id":"019f95af-699b-7ea7-88c0-b776d513d5fc","repo":"warpdotdev/warp","review_rework_attempts":1}
-->
Co-Authored-By: Oz <oz-agent@warp.dev>
_This PR was generated with [Oz](https://warp.dev)._
---------
Co-authored-by: Oz <oz-agent@warp.dev>
Co-authored-by: Warp <agent@warp.dev>
0 commit comments