Skip to main content
Glama

Super Shell MCP Server

get_pending_commands

Retrieve a list of shell commands awaiting approval for execution on Super Shell MCP Server, ensuring secure and controlled command processing across Windows, macOS, and Linux systems.

Instructions

Get the list of commands pending approval

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "properties": {}, "type": "object" }

Implementation Reference

  • Main handler function for 'get_pending_commands' tool that fetches pending commands from CommandService and serializes them to JSON for the MCP response, excluding internal resolve/reject functions.
    private async handleGetPendingCommands() { const pendingCommands = this.commandService.getPendingCommands(); return { content: [ { type: 'text', text: JSON.stringify(pendingCommands.map(cmd => ({ id: cmd.id, command: cmd.command, args: cmd.args, requestedAt: cmd.requestedAt, requestedBy: cmd.requestedBy, })), null, 2), }, ], }; }
  • src/index.ts:234-241 (registration)
    MCP tool registration defining the name, description, and empty input schema for 'get_pending_commands'.
    { name: 'get_pending_commands', description: 'Get the list of commands pending approval', inputSchema: { type: 'object', properties: {}, }, },
  • Tool dispatcher switch case that routes 'get_pending_commands' calls to the handler method.
    case 'get_pending_commands': return await this.handleGetPendingCommands();
  • Core helper method returning all pending commands from the internal Map.
    public getPendingCommands(): PendingCommand[] { return Array.from(this.pendingCommands.values()); }
  • Type definition for PendingCommand used by getPendingCommands and tool response.
    export interface PendingCommand { /** Unique ID for the command */ id: string; /** The command to execute */ command: string; /** Arguments for the command */ args: string[]; /** When the command was requested */ requestedAt: Date; /** Who requested the command */ requestedBy?: string; /** Resolve function to call when approved */ resolve: (value: { stdout: string; stderr: string }) => void; /** Reject function to call when denied */ reject: (reason: Error) => void; }

Other Tools

Related Tools

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/cfdude/super-shell-mcp'

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