MCP Tool Call UI#2322
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit caa42ed. Configure here.
| displayOptimizedChatItem = { | ||
| ...displayOptimizedChatItem, | ||
| mcpToolResult: nextItemMessageContent | ||
| }; |
There was a problem hiding this comment.
Rehydration loses MCP error state, shows errors as results
Medium Severity
When rehydrating persisted chat history, the MCP tool call result is always stored as mcpToolResult, even when the backend persisted an error message. The backend's create_display_optimized_tool_result_message stores either the success output or the error_message into the same content field, but the rehydration code unconditionally assigns it to mcpToolResult and never sets mcpToolError. After a page reload, MCPToolCallToolUI won't see mcpToolError, so failed tool calls display with normal styling instead of error styling.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit caa42ed. Configure here.


Description
Added a UI element to the Agent mode, so users can see the tool call request and response.
Testing
Trigger a tool call, look at the UI element.
Documentation
Not needed -- this should be self-explanatory. Click and see.
Note
Medium Risk
Adds new agent tool-call UI and changes how tool results are persisted/rehydrated and attached to chat history, which can affect chat rendering and ordering in the agent websocket flow.
Overview
Adds first-class support for
mcp_tool_callagent responses in the frontend: a new collapsibleMCPToolCallToolUIrenders the MCP request args and the eventual response/error, and chat messages no longer disappear when the assistant message has no text but needs tool UI.Updates agent execution + chat history handling to store/attach MCP tool outputs/errors to the latest MCP tool-call message (including on reload via persisted “next user message” rehydration), and updates the backend display-optimized tool-result persistence to save MCP outputs/errors for UI rehydration.
Reviewed by Cursor Bugbot for commit caa42ed. Configure here.