Skip to main content
Glama

system_info

Retrieve detailed system information, including hardware specifications, OS details, environment variables, and installed software, to monitor and analyze Windows system configurations efficiently.

Instructions

Comprehensive system information including hardware details, OS info, environment variables, and system configuration

Input Schema

NameRequiredDescriptionDefault
actionYesThe system information action to perform
categoryNoHardware category to focus on (for hardware_info action)all
filterNoFilter for environment variables or software (supports wildcards)

Input Schema (JSON Schema)

{ "properties": { "action": { "description": "The system information action to perform", "enum": [ "get_system_overview", "get_hardware_info", "get_os_info", "get_environment_vars", "get_installed_software", "get_system_uptime", "get_user_info", "get_system_paths" ], "type": "string" }, "category": { "default": "all", "description": "Hardware category to focus on (for hardware_info action)", "enum": [ "cpu", "memory", "disk", "network", "all" ], "type": "string" }, "filter": { "description": "Filter for environment variables or software (supports wildcards)", "type": "string" } }, "required": [ "action" ], "type": "object" }

Implementation Reference

  • Primary handler for the system_info tool. Dispatches to specific sub-actions like get_system_overview, get_hardware_info, etc.
    async run(args: { action: string; category?: string; filter?: string; }) { try { switch (args.action) { case "get_system_overview": return await this.getSystemOverview(); case "get_hardware_info": return await this.getHardwareInfo(args.category); case "get_os_info": return await this.getOSInfo(); case "get_environment_vars": return await this.getEnvironmentVars(args.filter); case "get_installed_software": return await this.getInstalledSoftware(args.filter); case "get_system_uptime": return await this.getSystemUptime(); case "get_user_info": return await this.getUserInfo(); case "get_system_paths": return await this.getSystemPaths(); default: throw new Error(`Unknown action: ${args.action}`); } } catch (error: any) { return { content: [{ type: "text", text: `❌ System information operation failed: ${error.message}` }], isError: true }; } },
  • Schema definition for the system_info tool, including name, description, input parameters with action enum and optional category/filter.
    export const systemInfoTool = { name: "system_info", description: "Comprehensive system information including hardware details, OS info, environment variables, and system configuration", parameters: { type: "object", properties: { action: { type: "string", enum: ["get_system_overview", "get_hardware_info", "get_os_info", "get_environment_vars", "get_installed_software", "get_system_uptime", "get_user_info", "get_system_paths"], description: "The system information action to perform" }, category: { type: "string", enum: ["cpu", "memory", "disk", "network", "all"], description: "Hardware category to focus on (for hardware_info action)", default: "all" }, filter: { type: "string", description: "Filter for environment variables or software (supports wildcards)" } }, required: ["action"] },
  • src/index.ts:38-41 (registration)
    Registration of the system_info tool in the MCP server's tool list response.
    name: systemInfoTool.name, description: systemInfoTool.description, inputSchema: systemInfoTool.parameters },
  • Top-level handler dispatch in the MCP server that calls the systemInfoTool.run method.
    case "system_info": return await systemInfoTool.run(args as any);
  • Helper function to retrieve comprehensive system overview, used by the main handler.
    async getSystemOverview() { try { const nodeInfo = { platform: os.platform(), arch: os.arch(), hostname: os.hostname(), totalMemory: this.formatBytes(os.totalmem()), freeMemory: this.formatBytes(os.freemem()), cpuCount: os.cpus().length, uptime: this.formatUptime(os.uptime()) }; const command = `Get-ComputerInfo | Select-Object WindowsProductName, WindowsVersion, TotalPhysicalMemory, CsProcessors, CsSystemType, TimeZone | Format-List`; const { stdout } = await execAsync(`powershell -Command "${command}"`); const result = `# System Overview\n\n## Basic Information\n` + `- **Hostname**: ${nodeInfo.hostname}\n` + `- **Platform**: ${nodeInfo.platform}\n` + `- **Architecture**: ${nodeInfo.arch}\n` + `- **CPU Cores**: ${nodeInfo.cpuCount}\n` + `- **Total Memory**: ${nodeInfo.totalMemory}\n` + `- **Free Memory**: ${nodeInfo.freeMemory}\n` + `- **System Uptime**: ${nodeInfo.uptime}\n\n` + `## Windows Details\n\`\`\`\n${stdout}\n\`\`\``; return { content: [{ type: "text", text: result }] }; } catch (error: any) {

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/guangxiangdebizi/windows-system-mcp'

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