-
Notifications
You must be signed in to change notification settings - Fork 295
Open
Labels
Description
Objective
Replace raw fmt.Fprintf(os.Stderr, ...) calls with console.Format* wrappers across all MCP-related CLI files identified in the Terminal Stylist audit (discussion #21126).
Context
The audit found ~54 files with unformatted stderr output. This issue covers the MCP command group.
Files to Modify
All files are in pkg/cli/:
mcp_config_file.gomcp_inspect.gomcp_inspect_inspector.gomcp_inspect_list.gomcp_inspect_mcp.gomcp_list.go
Approach
For each file:
- Find all
fmt.Fprintf(os.Stderr, ...)andfmt.Fprintln(os.Stderr, ...)calls that are NOT already using console formatters - Choose the correct formatter based on message semantics:
- Info/neutral →
console.FormatInfoMessage - Success/completion →
console.FormatSuccessMessage - Warning →
console.FormatWarningMessage - Error →
console.FormatErrorMessage - Command display →
console.FormatCommandMessage - List items →
console.FormatListItem
- Info/neutral →
- Convert
fmt.Fprintf(os.Stderr, "...\n", args...)→fmt.Fprintln(os.Stderr, console.FormatXxxMessage(fmt.Sprintf("...", args...))) - Run
make fmt && make test-unitto validate
Note
Do NOT change:
- Calls that already wrap a
console.Format*function - Calls that output structured data (JSON, tables) which go to stdout
Acceptance Criteria
- All raw
fmt.Fprintf(os.Stderr, ...)diagnostic messages in the 6 MCP files replaced with console formatters -
make fmtpasses with no changes -
make test-unitpasses
Generated by Plan Command for issue #discussion #21126 · ◷
- expires on Mar 18, 2026, 5:12 AM UTC
Reactions are currently unavailable