Skip to main content
Glama

Windows Automation MCP Server

minimize_window

Minimize any open window by specifying its title to reduce screen clutter and focus on other tasks.

Instructions

最小化窗口

Input Schema

NameRequiredDescriptionDefault
titleYes窗口标题

Input Schema (JSON Schema)

{ "properties": { "title": { "description": "窗口标题", "type": "string" } }, "required": [ "title" ], "type": "object" }

Implementation Reference

  • The main handler function for the 'minimize_window' tool. It executes PowerShell code to minimize all windows using Shell.Application.MinimizeAll(), despite taking a title parameter.
    async minimizeWindow(title) { try { const script = ` $shell = New-Object -ComObject Shell.Application $shell.MinimizeAll() `; await execAsync(`powershell -Command "${script}"`, { shell: 'powershell.exe' }); return { success: true, window: title, message: '窗口已最小化' }; } catch (error) { return { success: false, error: error.message }; } }
  • The schema definition for the 'minimize_window' tool, including name, description, input schema requiring a 'title' string.
    { name: 'minimize_window', description: '最小化窗口', inputSchema: { type: 'object', properties: { title: { type: 'string', description: '窗口标题' }, }, required: ['title'], }, },
  • Registration and dispatching in the executeTool method's switch statement, calling the minimizeWindow handler.
    case 'minimize_window': return await this.minimizeWindow(args.title);
  • Tool name registered in the canHandle method's supported tools array.
    canHandle(toolName) { const tools = ['list_windows', 'get_active_window', 'activate_window', 'close_window', 'minimize_window', 'maximize_window']; return tools.includes(toolName);

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