-
Notifications
You must be signed in to change notification settings - Fork 322
[plan] Migrate MCP list/inspect commands to use console.RenderTable() instead of manual table strings #23689
Copy link
Copy link
Closed
Labels
Description
Objective
Migrate mcp_list_tools.go and mcp_inspect_mcp.go from manually built table strings using fmt.Print(table) to the shared console.RenderTable() renderer for consistent styling and TTY detection.
Context
From discussion #23683 (Terminal Stylist Analysis): These files render pre-formatted text tables using fmt.Print(table) to stdout. While output routing is correct, they bypass the shared console.RenderTable() which provides TTY-gated Lipgloss styling, alternating row colors, and consistent header styles.
Approach
- Identify the table rendering logic in
pkg/cli/mcp_list_tools.goandpkg/cli/mcp_inspect_mcp.go - Replace manual table string construction with
console.RenderTable(headers, rows)calls - Ensure the output still goes to stdout (structured data, not diagnostic)
- Verify TTY detection: styled output in terminals, plain text when piped (this is handled automatically by
console.RenderTable) - Run
make agent-finishbefore committing
Files to Modify
- Update:
pkg/cli/mcp_list_tools.go - Update:
pkg/cli/mcp_inspect_mcp.go
Acceptance Criteria
- Both files use
console.RenderTable()instead of manual table string building - Terminal output is styled (Lipgloss table with headers/alternating rows)
- Piped output degrades gracefully to plain text (TTY-gated via existing
isTTY()check in console) -
make agent-finishpasses (build, test, fmt, lint) - Existing MCP list/inspect behavior is preserved (correct columns, data)
Generated by Plan Command for issue #discussion #23683 · ◷
- expires on Apr 2, 2026, 12:14 PM UTC
Reactions are currently unavailable
Metadata
Metadata
Labels
Type
Fields
Give feedbackNo fields configured for issues without a type.