Skip to content

[plan] Migrate MCP list/inspect commands to use console.RenderTable() instead of manual table strings #23689

@github-actions

Description

@github-actions

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

  1. Identify the table rendering logic in pkg/cli/mcp_list_tools.go and pkg/cli/mcp_inspect_mcp.go
  2. Replace manual table string construction with console.RenderTable(headers, rows) calls
  3. Ensure the output still goes to stdout (structured data, not diagnostic)
  4. Verify TTY detection: styled output in terminals, plain text when piped (this is handled automatically by console.RenderTable)
  5. Run make agent-finish before 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-finish passes (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

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions