Skip to main content
Glama

system-info

Retrieve detailed system information using PermShell MCP's tool, enabling users to access essential data for diagnostics or monitoring with explicit permission.

Instructions

Get system information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function executes predefined shell commands to gather system information (OS, uptime, memory, disk, CPU) using execAsync and returns the concatenated results as text content.
    async () => {
      try {
        // This command doesn't need permissions as it only retrieves read-only system info
        const commands = [
          "uname -a",                  // Operating system info
          "uptime",                    // System uptime
          "free -h || vm_stat",        // Memory usage (Linux || MacOS)
          "df -h | grep -v loop",      // Disk usage
          "cat /proc/cpuinfo | grep 'model name' | head -1 || sysctl -n machdep.cpu.brand_string" // CPU info
        ];
        
        const results = await Promise.all(
          commands.map(async (cmd) => {
            try {
              const { stdout } = await execAsync(cmd);
              return stdout.trim();
            } catch (error) {
              return `Failed to execute: ${cmd}`;
            }
          })
        );
        
        return {
          content: [{ 
            type: "text" as const, 
            text: results.join("\n\n")
          }]
        };
      } catch (error) {
        const errorMessage = error instanceof Error ? error.message : String(error);
        return {
          isError: true,
          content: [{ 
            type: "text" as const, 
            text: `Error retrieving system information: ${errorMessage}` 
          }]
        };
      }
    }
  • Registers the 'system-info' tool on the McpServer with name, description, empty schema, and inline handler function.
    server.tool(
      "system-info",
      "Get system information",
      {},
      async () => {
        try {
          // This command doesn't need permissions as it only retrieves read-only system info
          const commands = [
            "uname -a",                  // Operating system info
            "uptime",                    // System uptime
            "free -h || vm_stat",        // Memory usage (Linux || MacOS)
            "df -h | grep -v loop",      // Disk usage
            "cat /proc/cpuinfo | grep 'model name' | head -1 || sysctl -n machdep.cpu.brand_string" // CPU info
          ];
          
          const results = await Promise.all(
            commands.map(async (cmd) => {
              try {
                const { stdout } = await execAsync(cmd);
                return stdout.trim();
              } catch (error) {
                return `Failed to execute: ${cmd}`;
              }
            })
          );
          
          return {
            content: [{ 
              type: "text" as const, 
              text: results.join("\n\n")
            }]
          };
        } catch (error) {
          const errorMessage = error instanceof Error ? error.message : String(error);
          return {
            isError: true,
            content: [{ 
              type: "text" as const, 
              text: `Error retrieving system information: ${errorMessage}` 
            }]
          };
        }
      }
    );
  • Empty Zod schema indicating the tool takes no input parameters.
    {},
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool 'gets' information, implying a read-only operation, but doesn't specify what information is returned, format, potential side effects, or performance considerations. This is inadequate 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 extremely concise ('Get system information')—a single, front-loaded sentence with no wasted words. It efficiently communicates the core purpose without redundancy or fluff.

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. It doesn't explain what 'system information' includes (e.g., OS, hardware, network details) or the return format, leaving significant gaps for the agent to understand the tool's behavior and output.

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 with 100% schema description coverage, so no parameter documentation is needed. The description doesn't mention parameters, which is appropriate, earning a baseline score of 4 for not adding unnecessary information beyond the schema.

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

Purpose3/5

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

The description 'Get system information' clearly states the verb ('Get') and resource ('system information'), providing a basic purpose. However, it's somewhat vague about what specific information is retrieved and doesn't distinguish from the sibling tool 'execute-command', which might also provide system-related data.

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 on when to use this tool versus the sibling 'execute-command' or other alternatives. The description lacks context about appropriate scenarios, prerequisites, or exclusions, leaving the agent to infer usage based on the tool 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

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/mcollina/perm-shell-mcp'

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