From 7bf0a0fafa7a12517ebfd139ec45c87e4dc1f27d Mon Sep 17 00:00:00 2001 From: Don Syme Date: Sat, 23 Aug 2025 02:47:33 +0100 Subject: [PATCH] gh aw inspect --> gh aw mcp-inspect --- cmd/gh-aw/main.go | 2 +- docs/commands.md | 14 +++++----- docs/mcps.md | 27 +++++++++---------- docs/tools.md | 2 +- docs/tutorial.md | 2 +- pkg/cli/{inspect.go => mcp_inspect.go} | 20 +++++++------- .../{inspect_mcp.go => mcp_inspect_mcp.go} | 0 .../{inspect_test.go => mcp_inspect_test.go} | 0 pkg/cli/templates/instructions.md | 12 ++++----- 9 files changed, 39 insertions(+), 40 deletions(-) rename pkg/cli/{inspect.go => mcp_inspect.go} (94%) rename pkg/cli/{inspect_mcp.go => mcp_inspect_mcp.go} (100%) rename pkg/cli/{inspect_test.go => mcp_inspect_test.go} (100%) diff --git a/cmd/gh-aw/main.go b/cmd/gh-aw/main.go index 357293ba0ba..c866c0d7653 100644 --- a/cmd/gh-aw/main.go +++ b/cmd/gh-aw/main.go @@ -353,7 +353,7 @@ func init() { rootCmd.AddCommand(enableCmd) rootCmd.AddCommand(disableCmd) rootCmd.AddCommand(cli.NewLogsCommand()) - rootCmd.AddCommand(cli.NewInspectCommand()) + rootCmd.AddCommand(cli.NewMCPInspectCommand()) rootCmd.AddCommand(versionCmd) } diff --git a/docs/commands.md b/docs/commands.md index 9fd5570fbc8..da195ab374d 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -191,28 +191,28 @@ gh aw logs --format json -o ./exports/ ## 🔍 MCP Server Inspection -The `inspect` command allows you to analyze and troubleshoot Model Context Protocol (MCP) servers configured in your workflows. +The `mcp-inspect` command allows you to analyze and troubleshoot Model Context Protocol (MCP) servers configured in your workflows. > **📘 Complete MCP Guide**: For comprehensive MCP setup, configuration examples, and troubleshooting, see the [MCPs](mcps.md). ```bash # List all workflows that contain MCP server configurations -gh aw inspect +gh aw mcp-inspect # Inspect all MCP servers in a specific workflow -gh aw inspect workflow-name +gh aw mcp-inspect workflow-name # Filter inspection to specific servers by name -gh aw inspect workflow-name --server server-name +gh aw mcp-inspect workflow-name --server server-name # Show detailed information about a specific tool (requires --server) -gh aw inspect workflow-name --server server-name --tool tool-name +gh aw mcp-inspect workflow-name --server server-name --tool tool-name # Enable verbose output with connection details -gh aw inspect workflow-name --verbose +gh aw mcp-inspect workflow-name --verbose # Launch the official @modelcontextprotocol/inspector web interface -gh aw inspect workflow-name --inspector +gh aw mcp-inspect workflow-name --inspector ``` **Key Features:** diff --git a/docs/mcps.md b/docs/mcps.md index cd2bde79d53..6285c94c245 100644 --- a/docs/mcps.md +++ b/docs/mcps.md @@ -38,7 +38,7 @@ tools: > [!TIP] > You can inspect test your MCP configuration by running
-> `gh aw inspect ` +> `gh aw mcp-inspect ` ### Engine Compatibility @@ -165,7 +165,7 @@ When using an agentic engine that allows tool whitelisting (e.g. Claude), this g > [!TIP] > You can inspect the tools available for an Agentic Workflow by running
-> `gh aw inspect ` +> `gh aw mcp-inspect ` ### Wildcard Access @@ -198,24 +198,23 @@ tools: ### MCP Server Inspection -Use the `inspect` command to analyze and troubleshoot MCP configurations: +Use the `mcp-inspect` command to analyze and troubleshoot MCP configurations: ```bash -# List all workflows with MCP configurations -gh aw inspect +# List all workflows with MCP servers configured +gh aw mcp-inspect # Inspect all MCP servers in a specific workflow -gh aw inspect my-workflow +gh aw mcp-inspect my-workflow -# Filter to specific servers -gh aw inspect my-workflow --server trello-server +# Inspect a specific MCP server in a workflow +gh aw mcp-inspect my-workflow --server trello-server -# Verbose output with connection details -gh aw inspect my-workflow --verbose +# Enable verbose output for debugging connection issues +gh aw mcp-inspect my-workflow --verbose # Launch official MCP inspector web interface -gh aw inspect my-workflow --inspector -``` +gh aw mcp-inspect my-workflow --inspector ### Common Issues and Solutions @@ -241,13 +240,13 @@ Error: Tool 'my_tool' not found **Solutions**: 1. Add tool to `allowed` list -2. Check tool name spelling (use `gh aw inspect` to see available tools) +2. Check tool name spelling (use `gh aw mcp-inspect` to see available tools) 3. Verify MCP server is running correctly ## Related Documentation - [Tools Configuration](tools.md) - Complete tools reference -- [Commands](commands.md) - CLI commands including `inspect` +- [Commands](commands.md) - CLI commands including `mcp-inspect` - [Include Directives](include-directives.md) - Modularizing workflows with includes - [Secrets Management](secrets.md) - Managing secrets and environment variables - [Frontmatter Options](frontmatter.md) - All configuration options diff --git a/docs/tools.md b/docs/tools.md index 48ebc2da46a..ce50fa58f4b 100644 --- a/docs/tools.md +++ b/docs/tools.md @@ -22,7 +22,7 @@ All tools declared in included components are merged into the final workflow. > [!TIP] > You can inspect the tools available for an Agentic Workflow by running
-> `gh aw inspect ` +> `gh aw mcp-inspect ` ## GitHub Tools (`github:`) diff --git a/docs/tutorial.md b/docs/tutorial.md index 24e7035d2b0..950caaa07fa 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -92,7 +92,7 @@ gh aw logs weekly-research - `gh aw status` — Check workflow installation status - `gh aw logs` — Download recent run logs and cost/usage analysis -- `gh aw inspect` — Inspect MCP servers and tools +- `gh aw mcp-inspect` — Inspect MCP servers and tools - If compilation fails, run `gh aw compile --verbose` for more details and follow the error output. ### What's next? diff --git a/pkg/cli/inspect.go b/pkg/cli/mcp_inspect.go similarity index 94% rename from pkg/cli/inspect.go rename to pkg/cli/mcp_inspect.go index 9bb8d4b40e2..0471795e921 100644 --- a/pkg/cli/inspect.go +++ b/pkg/cli/mcp_inspect.go @@ -184,19 +184,19 @@ func listWorkflowsWithMCP(workflowsDir string, verbose bool) error { for _, workflow := range workflowsWithMCP { fmt.Printf(" • %s\n", workflow) } - fmt.Printf("\nRun 'gh aw inspect ' to inspect MCP servers in a specific workflow.\n") + fmt.Printf("\nRun 'gh aw mcp-inspect ' to inspect MCP servers in a specific workflow.\n") return nil } -// NewInspectCommand creates the inspect command -func NewInspectCommand() *cobra.Command { +// NewMCPInspectCommand creates the mcp-inspect command +func NewMCPInspectCommand() *cobra.Command { var serverFilter string var toolFilter string var spawnInspector bool cmd := &cobra.Command{ - Use: "inspect [workflow-file]", + Use: "mcp-inspect [workflow-file]", Short: "Inspect MCP servers and list available tools, resources, and roots", Long: `Inspect MCP servers used by a workflow and display available tools, resources, and roots. @@ -204,12 +204,12 @@ This command starts each MCP server configured in the workflow, queries its capa and displays the results in a formatted table. It supports stdio, Docker, and HTTP MCP servers. Examples: - gh aw inspect # List workflows with MCP servers - gh aw inspect weekly-research # Inspect MCP servers in weekly-research.md - gh aw inspect repomind --server repo-mind # Inspect only the repo-mind server - gh aw inspect weekly-research --server github --tool create_issue # Show details for a specific tool - gh aw inspect weekly-research -v # Verbose output with detailed connection info - gh aw inspect weekly-research --inspector # Launch @modelcontextprotocol/inspector + gh aw mcp-inspect # List workflows with MCP servers + gh aw mcp-inspect weekly-research # Inspect MCP servers in weekly-research.md + gh aw mcp-inspect repomind --server repo-mind # Inspect only the repo-mind server + gh aw mcp-inspect weekly-research --server github --tool create_issue # Show details for a specific tool + gh aw mcp-inspect weekly-research -v # Verbose output with detailed connection info + gh aw mcp-inspect weekly-research --inspector # Launch @modelcontextprotocol/inspector The command will: - Parse the workflow file to extract MCP server configurations diff --git a/pkg/cli/inspect_mcp.go b/pkg/cli/mcp_inspect_mcp.go similarity index 100% rename from pkg/cli/inspect_mcp.go rename to pkg/cli/mcp_inspect_mcp.go diff --git a/pkg/cli/inspect_test.go b/pkg/cli/mcp_inspect_test.go similarity index 100% rename from pkg/cli/inspect_test.go rename to pkg/cli/mcp_inspect_test.go diff --git a/pkg/cli/templates/instructions.md b/pkg/cli/templates/instructions.md index 6844e37e37f..c0b20189bb8 100644 --- a/pkg/cli/templates/instructions.md +++ b/pkg/cli/templates/instructions.md @@ -678,23 +678,23 @@ permissions: ### MCP Server Inspection -Use the `inspect` command to analyze and debug MCP servers in workflows: +Use the `mcp-inspect` command to analyze and debug MCP servers in workflows: ```bash # List workflows with MCP configurations -gh aw inspect +gh aw mcp-inspect # Inspect MCP servers in a specific workflow -gh aw inspect workflow-name +gh aw mcp-inspect workflow-name # Filter to a specific MCP server -gh aw inspect workflow-name --server server-name +gh aw mcp-inspect workflow-name --server server-name # Show detailed information about a specific tool -gh aw inspect workflow-name --server server-name --tool tool-name +gh aw mcp-inspect workflow-name --server server-name --tool tool-name # Enable verbose output with connection details -gh aw inspect workflow-name --verbose +gh aw mcp-inspect workflow-name --verbose ``` The `--tool` flag provides detailed information about a specific tool, including: