Skip to main content
Glama

Windows Automation MCP Server

get_process_info

Retrieve detailed process information from Windows systems to monitor application status, identify running services, and manage system resources effectively.

Instructions

获取进程详细信息

Input Schema

NameRequiredDescriptionDefault
nameYes进程名称

Input Schema (JSON Schema)

{ "properties": { "name": { "description": "进程名称", "type": "string" } }, "required": [ "name" ], "type": "object" }

Implementation Reference

  • The main handler function that retrieves detailed process information (PID, session, memory, status, username, window title) using the Windows 'tasklist' command with CSV and verbose output, parsing the first matching process.
    async getProcessInfo(processName) { try { const { stdout } = await execAsync(`tasklist /FI "IMAGENAME eq ${processName}" /FO CSV /V`); const lines = stdout.trim().split('\n'); if (lines.length < 2) { return { success: false, message: '进程未找到' }; } const info = lines[1].split(',').map(p => p.replace(/"/g, '')); return { success: true, process: { name: info[0], pid: info[1], session: info[2], memory: info[4], status: info[5], username: info[6], windowTitle: info[8], }, }; } catch (error) { return { success: false, error: error.message }; } }
  • The tool schema definition, specifying the name, description, and input schema requiring a 'name' string for the process.
    { name: 'get_process_info', description: '获取进程详细信息', inputSchema: { type: 'object', properties: { name: { type: 'string', description: '进程名称' }, }, required: ['name'], }, },
  • The dispatch case in executeTool method that routes 'get_process_info' calls to the getProcessInfo handler.
    case 'get_process_info': return await this.getProcessInfo(args.name);
  • The tools array in canHandle method that includes 'get_process_info' for capability checking.
    const tools = ['launch_application', 'kill_process', 'list_processes', 'get_process_info'];

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