-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Enhancement: Improve MCP Console Display and Fix Tool Arguments #3526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement: Improve MCP Console Display and Fix Tool Arguments #3526
Conversation
- Rename MCP 'Errors' tab to 'Console' for better semantic meaning - Update tab ID from 'errors' to 'console' in McpView.tsx - Change view ID from 'errors-view' to 'console-view' - Use 'noLogs' translation key for empty state message - Add MCP logs to AI's context awareness through system prompt - Fix MCP tool arguments handling to properly escape code snippets - Ensure consistent handling of arguments for approval and execution - White text for standard output (stdout), red for errors
🦋 Changeset detectedLatest commit: 5ec3d82 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
- Fixed TypeScript error in McpHub.ts by adding return type to appendErrorMessage - Added changesets documenting the improvements to MCP console functionality - Fixed type definition consistency for console logging levels
7fc5c31 to
4ec16e6
Compare
… messages with correct styling
…type compatibility
…sion - Modified getMcpServersSection to return an empty string when enableMcpServerCreation is false - Added unit tests to verify the behavior - This change ensures that when 'Create MCP servers' is toggled off, MCP logs will not be included in the system prompt/context
|
@robertheadley can you please include images? |
I had, but they stopped displaying in the original. I tried to edit it, but they wouldn't display. |
got the images working in the main info. |
|
@robertheadley what if there is an error? |
Errors are displayed in red. |
|
@robertheadley please split this PR up into 3 separate PRs? PR A
PR B PR C |
|
Fair. OK. |


Changed tab ID from 'errors' to 'console' in McpView.tsx
Updated view ID from 'errors-view' to 'console-view'
Changed empty state message to use 'noLogs' translation key
Modified how messages are displayed to ensure proper coloring
STDOUT messages now display in white (using var(--vscode-foreground))
Error messages continue to display in red for visual distinction
Enhanced McpHub.ts to refresh the system prompt when MCP logs are updated
This ensures the AI is aware of MCP logs and can respond to them
Updated useMcpToolTool.ts to properly handle code snippets with special characters
Ensured consistent escaping behavior between approval and execution phases
Created and ran a test script confirming our fix works with:
LaTeX code containing multiple backslashes and special characters
Python code with quotes, indentation, and backslashes
Valid JSON data (passed through unchanged)
Invalid JSON data (properly detected and reported)
Related GitHub Issue
Closes: #2549
Description
Test Procedure
Created and ran a test script confirming our fix works with:
LaTeX code containing multiple backslashes and special characters
Python code with quotes, indentation, and backslashes
Valid JSON data (passed through unchanged)
Invalid JSON data (properly detected and reported)
Type of Change
srcor test files.Pre-Submission Checklist
npm run lint).console.log) has been removed.npm test).mainbranch.npm run changesetif this PR includes user-facing changes or dependency updates.Screenshots / Videos
Documentation Updates
Additional Notes
Before


After
Important
Enhances MCP console display, fixes tool arguments, and improves logging and code handling.
McpView.tsx.McpErrorRow.tsxto display STDOUT messages in white and error messages in red.McpHub.tsto refresh system prompt when MCP logs update.useMcpToolTool.tsto handle code snippets with special characters.This description was created by
for 32d22dc. You can customize this summary. It will automatically update as commits are pushed.