playground_command_help
Get detailed assistance and explanations for specific playground commands to understand usage, parameters, and functionality.
Instructions
Get detailed help for playground commands
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | Command to get help for (e.g., 'connector restart', 'container logs') |
Implementation Reference
- src/index.ts:153-166 (handler)The MCP tool handler function that extracts the 'command' argument, calls parser.getCommandHelp, and returns the result as MCP content.private async handleCommandHelp(args: any) { const { command } = args; const help = this.parser.getCommandHelp(command); return { content: [ { type: "text", text: JSON.stringify(help, null, 2), }, ], }; }
- src/parser.ts:265-294 (helper)Core implementation providing detailed help for a playground command by finding the command structure, extracting options/subcommands/examples, generating usage string, or error if not found.public getCommandHelp(commandString: string): any { const parts = commandString.trim().split(' ').filter(p => p.length > 0); // Remove 'playground' if it's the first part if (parts[0] === 'playground') { parts.shift(); } const command = this.findCommand(parts); if (command) { return { command: parts.join(' '), description: command.description, options: command.options || [], subcommands: command.subcommands?.map(sub => ({ name: sub.name, description: sub.description, options: sub.options || [] })) || [], examples: command.examples || [], usage: this.generateUsage(command, parts.join(' ')) }; } return { error: 'Command not found', command: commandString }; }
- src/index.ts:76-85 (schema)Input schema definition for the playground_command_help tool, specifying a required 'command' string parameter.inputSchema: { type: "object", properties: { command: { type: "string", description: "Command to get help for (e.g., 'connector restart', 'container logs')", }, }, required: ["command"], },
- src/index.ts:73-86 (registration)Tool registration in the ListTools response, including name, description, and input schema.{ name: "playground_command_help", description: "Get detailed help for playground commands", inputSchema: { type: "object", properties: { command: { type: "string", description: "Command to get help for (e.g., 'connector restart', 'container logs')", }, }, required: ["command"], }, },
- src/index.ts:102-103 (registration)Dispatch registration in the CallToolRequest handler switch statement.case "playground_command_help": return await this.handleCommandHelp(args);