Skip to main content
Glama
cfdude

Super Shell MCP Server

get_pending_commands

Retrieve commands awaiting approval for secure execution across Windows, macOS, and Linux systems.

Instructions

Get the list of commands pending approval

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The primary handler for the 'get_pending_commands' tool. It fetches pending commands from the CommandService and formats them as JSON text content for the MCP response.
    /**
     * Handle get_pending_commands tool
     */
    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)
    Registration of the 'get_pending_commands' tool in the list of available tools, including its name, description, and empty input schema.
    {
      name: 'get_pending_commands',
      description: 'Get the list of commands pending approval',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • Dispatch in the tool call switch statement that routes 'get_pending_commands' calls to the handler function.
    case 'get_pending_commands':
      return await this.handleGetPendingCommands();
  • Helper method in CommandService that retrieves and returns all pending commands from the internal queue.
    public getPendingCommands(): PendingCommand[] {
      return Array.from(this.pendingCommands.values());
    }
  • TypeScript interface defining the structure of PendingCommand objects returned by the tool.
    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;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states the tool retrieves pending commands but doesn't mention whether this requires special permissions, how results are formatted, if there are rate limits, or what happens if no commands are pending. For a security/approval-related tool, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that communicates the core purpose without any wasted words. It's appropriately sized for a simple retrieval tool and front-loads the essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter tool with no output schema, the description provides the minimum viable information about what it does. However, given the security/approval context and sibling tools that suggest this is part of a command management system, more information about permissions, return format, or typical usage patterns would be helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters with 100% schema description coverage, so the schema already fully documents the parameter situation. The description appropriately doesn't mention parameters since none exist, which is correct. Baseline for zero parameters is 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get') and resource ('list of commands pending approval'), making the purpose immediately understandable. It doesn't specifically differentiate from siblings like 'execute_command' or 'approve_command', but the verb+resource combination is unambiguous in context.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided about when to use this tool versus alternatives like 'execute_command' or 'approve_command'. The description only states what it does, not when it should be used in relation to the sibling tools that manage command approval workflows.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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