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
2 changes: 1 addition & 1 deletion cmd/gh-aw/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
14 changes: 7 additions & 7 deletions docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:**
Expand Down
27 changes: 13 additions & 14 deletions docs/mcps.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ tools:

> [!TIP]
> You can inspect test your MCP configuration by running <br/>
> `gh aw inspect <workflow-file>`
> `gh aw mcp-inspect <workflow-file>`


### Engine Compatibility
Expand Down Expand Up @@ -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 <br/>
> `gh aw inspect <workflow-file>`
> `gh aw mcp-inspect <workflow-file>`

### Wildcard Access

Expand Down Expand Up @@ -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

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <br/>
> `gh aw inspect <workflow-file>`
> `gh aw mcp-inspect <workflow-file>`

## GitHub Tools (`github:`)

Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down
20 changes: 10 additions & 10 deletions pkg/cli/inspect.go → pkg/cli/mcp_inspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,32 +184,32 @@ func listWorkflowsWithMCP(workflowsDir string, verbose bool) error {
for _, workflow := range workflowsWithMCP {
fmt.Printf(" • %s\n", workflow)
}
fmt.Printf("\nRun 'gh aw inspect <workflow-name>' to inspect MCP servers in a specific workflow.\n")
fmt.Printf("\nRun 'gh aw mcp-inspect <workflow-name>' 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.

This command starts each MCP server configured in the workflow, queries its capabilities,
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
Expand Down
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions pkg/cli/templates/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down