Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions pkg/cli/mcp_inspect_mcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -359,9 +359,8 @@ func displayServerCapabilities(info *parser.MCPServerInfo, toolFilter string) {
ShowVerboseHint: false,
}

// Render the table using the shared helper
table := renderMCPToolTable(info, opts)
fmt.Print(table)
// Render the table using the shared helper and print to stdout (structured data)
fmt.Fprint(os.Stdout, renderMCPToolTable(info, opts))

// Add helpful hint about how to allow tools in workflow frontmatter
displayToolAllowanceHint(info)
Expand Down Expand Up @@ -396,11 +395,10 @@ func displayServerCapabilities(info *parser.MCPServerInfo, toolFilter string) {
rows = append(rows, []string{resource.URI, resource.Name, description, mimeType})
}

table := console.RenderTable(console.TableConfig{
fmt.Fprint(os.Stdout, console.RenderTable(console.TableConfig{
Headers: headers,
Rows: rows,
})
fmt.Print(table)
}))
} else if toolFilter == "" {
fmt.Fprintf(os.Stderr, "\n%s\n", console.FormatWarningMessage("No resources available"))
}
Expand All @@ -416,11 +414,10 @@ func displayServerCapabilities(info *parser.MCPServerInfo, toolFilter string) {
rows = append(rows, []string{root.URI, root.Name})
}

table := console.RenderTable(console.TableConfig{
fmt.Fprint(os.Stdout, console.RenderTable(console.TableConfig{
Headers: headers,
Rows: rows,
})
fmt.Print(table)
}))
} else if toolFilter == "" {
fmt.Fprintf(os.Stderr, "\n%s\n", console.FormatWarningMessage("No roots available"))
}
Expand Down
5 changes: 2 additions & 3 deletions pkg/cli/mcp_list_tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,8 @@ func displayToolsList(info *parser.MCPServerInfo, verbose bool) {
opts.ShowVerboseHint = true
}

// Render the table using the shared helper
table := renderMCPToolTable(info, opts)
fmt.Print(table)
// Render the table using the shared helper and print to stdout (structured data)
fmt.Fprint(os.Stdout, renderMCPToolTable(info, opts))
}

// NewMCPListToolsSubcommand creates the mcp list-tools subcommand
Expand Down
Loading