minimize_window
Minimize any open window by specifying its title to reduce screen clutter and focus on other tasks.
Instructions
最小化窗口
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | 窗口标题 |
Input Schema (JSON Schema)
{
"properties": {
"title": {
"description": "窗口标题",
"type": "string"
}
},
"required": [
"title"
],
"type": "object"
}
Implementation Reference
- src/tools/window.js:220-232 (handler)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 }; } }
- src/tools/window.js:52-62 (schema)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'], }, },
- src/tools/window.js:93-94 (registration)Registration and dispatching in the executeTool method's switch statement, calling the minimizeWindow handler.case 'minimize_window': return await this.minimizeWindow(args.title);
- src/tools/window.js:77-80 (registration)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);