Skip to content

Commit 0e9e9cb

Browse files
authored
Remove unused NewMCPInspectCommand function (#3767)
1 parent d661823 commit 0e9e9cb

1 file changed

Lines changed: 0 additions & 66 deletions

File tree

pkg/cli/mcp_inspect.go

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -253,72 +253,6 @@ func listWorkflowsWithMCP(workflowsDir string, verbose bool) error {
253253
return nil
254254
}
255255

256-
// NewMCPInspectCommand creates the mcp inspect command
257-
func NewMCPInspectCommand() *cobra.Command {
258-
var serverFilter string
259-
var toolFilter string
260-
var spawnInspector bool
261-
var checkSecrets bool
262-
263-
cmd := &cobra.Command{
264-
Use: "mcp inspect [workflow-file]",
265-
Short: "Inspect MCP servers and list available tools, resources, and roots",
266-
Long: `Inspect MCP servers used by a workflow and display available tools, resources, and roots.
267-
268-
This command starts each MCP server configured in the workflow, queries its capabilities,
269-
and displays the results in a formatted table. It supports stdio, Docker, and HTTP MCP servers.
270-
271-
Examples:
272-
gh aw mcp inspect # List workflows with MCP servers
273-
gh aw mcp inspect weekly-research # Inspect MCP servers in weekly-research.md
274-
gh aw mcp inspect daily-news --server tavily # Inspect only the tavily server
275-
gh aw mcp inspect weekly-research --server github --tool create_issue # Show details for a specific tool
276-
gh aw mcp inspect weekly-research -v # Verbose output with detailed connection info
277-
gh aw mcp inspect weekly-research --inspector # Launch @modelcontextprotocol/inspector
278-
gh aw mcp inspect weekly-research --check-secrets # Check GitHub Actions secrets
279-
280-
The command will:
281-
- Parse the workflow file to extract MCP server configurations
282-
- Start each MCP server (stdio, docker, http)
283-
- Query available tools, resources, and roots
284-
- Validate required secrets are available
285-
- Display results in formatted tables with error details`,
286-
Args: cobra.MaximumNArgs(1),
287-
RunE: func(cmd *cobra.Command, args []string) error {
288-
var workflowFile string
289-
if len(args) > 0 {
290-
workflowFile = args[0]
291-
}
292-
293-
verbose, _ := cmd.Flags().GetBool("verbose")
294-
if cmd.Parent() != nil {
295-
parentVerbose, _ := cmd.Parent().PersistentFlags().GetBool("verbose")
296-
verbose = verbose || parentVerbose
297-
}
298-
299-
// Validate that tool flag requires server flag
300-
if toolFilter != "" && serverFilter == "" {
301-
return fmt.Errorf("--tool flag requires --server flag to be specified")
302-
}
303-
304-
// Handle spawn inspector flag
305-
if spawnInspector {
306-
return spawnMCPInspector(workflowFile, serverFilter, verbose)
307-
}
308-
309-
return InspectWorkflowMCP(workflowFile, serverFilter, toolFilter, verbose, checkSecrets)
310-
},
311-
}
312-
313-
cmd.Flags().StringVar(&serverFilter, "server", "", "Filter to inspect only the specified MCP server")
314-
cmd.Flags().StringVar(&toolFilter, "tool", "", "Show detailed information about a specific tool (requires --server)")
315-
cmd.Flags().BoolP("verbose", "v", false, "Enable verbose output with detailed connection information")
316-
cmd.Flags().BoolVar(&spawnInspector, "inspector", false, "Launch the official @modelcontextprotocol/inspector tool")
317-
cmd.Flags().BoolVar(&checkSecrets, "check-secrets", false, "Check GitHub Actions repository secrets for missing secrets")
318-
319-
return cmd
320-
}
321-
322256
// spawnMCPInspector launches the official @modelcontextprotocol/inspector tool
323257
// and spawns any stdio MCP servers beforehand
324258
func spawnMCPInspector(workflowFile string, serverFilter string, verbose bool) error {

0 commit comments

Comments
 (0)