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.
    {},

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