-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Labels
ai-generatedconsole-formattingcookieIssue Monster Loves Cookies!Issue Monster Loves Cookies!enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomersplan
Description
Objective
Transform all 126 MCP error sites to use console.FormatErrorMessage for CLI visibility. Currently, 0/126 error messages use console formatting, making MCP errors invisible in terminal output.
Context
This addresses a critical finding from the MCP Server Integration Quality analysis: MCP configuration errors appear as plain text without color/emphasis, making debugging significantly harder.
Approach
- Review all MCP-related Go files for error handling
- Replace plain
fmt.Errorfpatterns with console-formatted errors - Enhance user-facing errors with actionable guidance
- Follow the error message style guide in
specs/error-messages.md - Ensure all error paths use console formatting
Files to Modify
Priority files (by expected error count):
pkg/workflow/mcp_config_validation.gopkg/workflow/mcp_gateway_schema_validation.gopkg/cli/mcp_validation.gopkg/cli/mcp_server.gopkg/cli/mcp_inspect.gopkg/workflow/mcp_renderer.go
Additional files:
pkg/workflow/mcp_gateway_config.gopkg/workflow/mcp_environment.gopkg/workflow/mcp_setup_generator.gopkg/workflow/mcp_github_config.gopkg/workflow/mcp-config-utils.gopkg/workflow/mcp-config-playwright.gopkg/parser/mcp.go
Pattern to Follow
Replace:
return fmt.Errorf("failed to configure MCP server: %w", err)With:
fmt.Fprintln(os.Stderr, console.FormatErrorMessage(err.Error()))
return fmt.Errorf("failed to configure MCP server: %w", err)For user-facing errors with actionable guidance:
msg := fmt.Sprintf("MCP mode must be 'remote' or 'local', got '%s'\\n\\nSuggestion: Update your workflow to specify:\\n tools:\\n github:\\n mode: remote", mode)
fmt.Fprintln(os.Stderr, console.FormatErrorMessage(msg))
return fmt.Errorf("invalid MCP mode: %s", mode)Acceptance Criteria
- All
fmt.Errorfcalls in MCP files use console formatting - Error messages follow the error message style guide (
specs/error-messages.md) - Errors include actionable guidance where appropriate
- Test cases verify error formatting
-
make agent-finishpasses without errors
Related
- Discussion: 🎯 Repository Quality: MCP Server Integration Quality #11508 (MCP Server Integration Quality)
- Priority: High
- Effort: Medium
AI generated by Plan Command for discussion #11508
Metadata
Metadata
Assignees
Labels
ai-generatedconsole-formattingcookieIssue Monster Loves Cookies!Issue Monster Loves Cookies!enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomersplan