Skip to main content
Glama
eva-wanxin-git

Windows Automation MCP Server

get_system_info

Retrieve Windows system information including hardware specifications, OS details, and performance metrics for monitoring and automation tasks.

Instructions

获取系统信息

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for 'get_system_info' that executes PowerShell commands to gather system details including OS, computer model, memory, and CPU information, parses the JSON output, and returns it in a success/error structure.
    async getSystemInfo() {
      try {
        const command = `
          $os = Get-CimInstance Win32_OperatingSystem
          $cs = Get-CimInstance Win32_ComputerSystem
          $cpu = Get-CimInstance Win32_Processor
          @{
            ComputerName = $cs.Name
            OS = $os.Caption
            Version = $os.Version
            Architecture = $os.OSArchitecture
            Manufacturer = $cs.Manufacturer
            Model = $cs.Model
            TotalMemoryGB = [math]::Round($cs.TotalPhysicalMemory / 1GB, 2)
            CPU = $cpu.Name
            CPUCores = $cpu.NumberOfCores
            CPULogical = $cpu.NumberOfLogicalProcessors
          } | ConvertTo-Json
        `;
    
        const { stdout } = await execAsync(`powershell -Command "${command.replace(/"/g, '\\"')}"`, {
          shell: 'powershell.exe'
        });
    
        const info = JSON.parse(stdout);
        return { success: true, info };
      } catch (error) {
        return { success: false, error: error.message };
      }
    }
  • Tool schema definition including name, description, and empty input schema (no parameters required).
    {
      name: 'get_system_info',
      description: '获取系统信息',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • Registration and dispatch logic in the executeTool switch statement that routes calls to the getSystemInfo handler.
    case 'get_system_info':
      return await this.getSystemInfo();

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/eva-wanxin-git/windows-automation-mcp'

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