Files
leo-claude-mktplace/plugins/debug-mcp/commands/debug-mcp-test.md
lmiranda 2d51df7a42 feat(marketplace): command consolidation + 8 new plugins (v8.1.0 → v9.0.0) [BREAKING]
Phase 1b: Rename all ~94 commands across 12 plugins to /<noun> <action>
sub-command pattern. Git-flow consolidated from 8→5 commands (commit
variants absorbed into --push/--merge/--sync flags). Dispatch files,
name: frontmatter, and cross-reference updates for all plugins.

Phase 2: Design documents for 8 new plugins in docs/designs/.

Phase 3: Scaffold 8 new plugins — saas-api-platform, saas-db-migrate,
saas-react-platform, saas-test-pilot, data-seed, ops-release-manager,
ops-deploy-pipeline, debug-mcp. Each with plugin.json, commands, agents,
skills, README, and claude-md-integration. Marketplace grows from 12→20.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 14:52:11 -05:00

2.3 KiB

name, description
name description
debug-mcp test Test a specific MCP tool call by invoking it and displaying the result

/debug-mcp test

Test a specific MCP tool by invoking it with sample parameters.

Skills to Load

  • skills/visual-header.md
  • skills/mcp-protocol.md

Agent

Delegate to agents/mcp-debugger.md.

Usage

/debug-mcp test <server_name> <tool_name> [--params=<json>]

Arguments:

  • server_name - Name of the MCP server from .mcp.json
  • tool_name - Name of the tool to invoke
  • --params - JSON object with tool parameters (optional)

Instructions

Execute skills/visual-header.md with context "Tool Test".

Phase 1: Validate Inputs

  1. Read .mcp.json and verify the server exists
  2. Check if the server is healthy (run quick executable check)
  3. If tool_name is not provided, list available tools for the server and ask user to select

Phase 2: Tool Discovery

  1. Parse the server source code to find the tool definition
  2. Extract the tool's inputSchema (parameters, types, required fields)
  3. Display the schema to the user:
    ## Tool: list_issues
    Server: gitea
    
    Parameters:
    - state (string, optional): "open", "closed", "all" [default: "open"]
    - labels (array[string], optional): Filter by labels
    - repo (string, optional): Repository name
    

Phase 3: Parameter Preparation

  1. If --params provided, validate against the tool's inputSchema
  2. If no params provided and tool has required params, ask user for values
  3. If no params and all optional, invoke with defaults

Phase 4: Invocation

Invoke the MCP tool using the available MCP tool functions:

  1. Call the tool with prepared parameters
  2. Capture the response
  3. Measure response time

Phase 5: Result Display

## Test Result

### Request
- Server: gitea
- Tool: list_issues
- Params: {"state": "open", "repo": "leo-claude-mktplace"}

### Response
- Status: Success
- Time: 245ms
- Result:
  [formatted JSON response, truncated if large]

### Schema Validation
- All required params provided: YES
- Response type matches expected: YES

Error Handling

If the tool call fails, apply skills/mcp-protocol.md error patterns:

### Error
- Type: ConnectionRefused
- Message: Could not connect to MCP server
- Likely Cause: Server not running or venv broken
- Fix: Run /debug-mcp status to diagnose

User Request

$ARGUMENTS