Skip to main content
Glama
vdesabou

MCP Playground Server

by vdesabou

playground_command_help

Get detailed help for Kafka Docker Playground CLI commands to understand usage, parameters, and troubleshooting steps.

Instructions

Get detailed help for playground commands

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYesCommand to get help for (e.g., 'connector restart', 'container logs')

Implementation Reference

  • The handler function for the 'playground_command_help' MCP tool. Extracts the 'command' argument, delegates to parser.getCommandHelp(), and returns the result formatted as MCP text 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), }, ], }; }
  • Input schema for the 'playground_command_help' tool, defining a required 'command' string parameter with description.
    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)
    Switch case in CallToolRequest handler that registers and routes calls to the 'playground_command_help' tool handler.
    case "playground_command_help": return await this.handleCommandHelp(args);
  • Primary helper implementing the help logic: splits command string, finds matching command via findCommand, assembles detailed help object with options, subcommands, examples, and generated usage.
    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 }; }
  • Supporting helper to locate a command or subcommand by path array, used by getCommandHelp.
    public findCommand(commandPath: string[]): PlaygroundCommand | null { let current = this.commands; let command: PlaygroundCommand | null = null; for (const part of commandPath) { command = current.find(cmd => cmd.name === part) || null; if (!command) return null; current = command.subcommands || []; } return command; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/vdesabou/kafka-docker-playground-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server