Skip to main content
Glama
cfdude

Super Shell MCP Server

get_platform_info

Retrieve current platform and shell details to enable secure cross-platform command execution with built-in security controls.

Instructions

Get information about the current platform and shell

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The primary handler function for the 'get_platform_info' tool. It dynamically imports platform utilities, gathers platform, shell, and configuration information, and returns it as a formatted JSON response.
    private async handleGetPlatformInfo() {
      const { detectPlatform, getShellSuggestions, getCommonShellLocations } = await import('./utils/platform-utils.js');
      
      const platform = detectPlatform();
      const currentShell = this.commandService.getShell();
      const shellExecutionEnabled = this.commandService.isShellEnabled();
      const suggestedShells = getShellSuggestions()[platform];
      const commonLocations = getCommonShellLocations();
      
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify({
              platform,
              currentShell,
              shellExecutionEnabled,
              suggestedShells,
              commonLocations,
              helpMessage: shellExecutionEnabled
                ? `Super Shell MCP is running on ${platform} using ${currentShell} with shell parsing enabled.`
                : `Super Shell MCP is running on ${platform} executing commands without shell parsing.`,
            }, null, 2),
          },
        ],
      };
    }
  • src/index.ts:142-148 (registration)
    Registers the 'get_platform_info' tool in the MCP server's tool list, including its name, description, and input schema (empty object).
      name: 'get_platform_info',
      description: 'Get information about the current platform and shell',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • Defines the input schema for the 'get_platform_info' tool as an empty object (no parameters required).
    inputSchema: {
      type: 'object',
      properties: {},
    },
  • Utility function to detect the current platform (WINDOWS, MACOS, LINUX, or UNKNOWN) based on process.platform.
    export function detectPlatform(): PlatformType {
      const platform = process.platform;
      
      if (platform === 'win32') return PlatformType.WINDOWS;
      if (platform === 'darwin') return PlatformType.MACOS;
      if (platform === 'linux') return PlatformType.LINUX;
      
      return PlatformType.UNKNOWN;
    }
  • Utility function providing suggested shell executables for each supported platform.
    export function getShellSuggestions(): Record<PlatformType, string[]> {
      return {
        [PlatformType.WINDOWS]: ['cmd.exe', 'powershell.exe', 'pwsh.exe'],
        [PlatformType.MACOS]: ['/bin/zsh', '/bin/bash', '/bin/sh'],
        [PlatformType.LINUX]: ['/bin/bash', '/bin/sh', '/bin/zsh'],
        [PlatformType.UNKNOWN]: ['/bin/sh']
      };
    }
  • Utility function returning common file paths where shell executables are typically located on the current platform.
    export function getCommonShellLocations(): string[] {
      const platform = detectPlatform();
      
      switch (platform) {
        case PlatformType.WINDOWS:
          return [
            process.env.COMSPEC || 'C:\\Windows\\System32\\cmd.exe',
            'C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe',
            'C:\\Program Files\\PowerShell\\7\\pwsh.exe'
          ];
        case PlatformType.MACOS:
          return ['/bin/zsh', '/bin/bash', '/bin/sh'];
        case PlatformType.LINUX:
          return ['/bin/bash', '/bin/sh', '/usr/bin/bash', '/usr/bin/zsh'];
        default:
          return ['/bin/sh'];
      }
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves information, implying a read-only operation, but doesn't specify what information is returned (e.g., OS version, shell type, environment details), whether it requires permissions, or if there are rate limits. This leaves significant gaps for a tool with zero annotation coverage.

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 directly states the tool's purpose without unnecessary words. It is front-loaded with the core action ('Get information'), making it easy to parse, and every part of the sentence contributes to understanding the tool's function.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete for a tool that retrieves system information. It doesn't explain what specific data is returned (e.g., platform details, shell version) or the format of the output, which is critical for an agent to use the tool effectively. This leaves too much ambiguity for practical use.

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 0 parameters, and the schema description coverage is 100%, so there are no parameters to document. The description doesn't need to add parameter semantics, and it appropriately doesn't mention any. A baseline of 4 is applied as per the rules for tools with no parameters.

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 tool's purpose with a specific verb ('Get') and resource ('information about the current platform and shell'), making it immediately understandable. However, it doesn't explicitly differentiate this tool from its siblings (like 'execute_command' or 'get_pending_commands'), which focus on command execution and management rather than platform metadata.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, context (e.g., use for system diagnostics or compatibility checks), or exclusions, leaving the agent to infer usage based on the name alone.

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