Skip to main content
Glama
eva-wanxin-git

Windows Automation MCP Server

minimize_window

Minimize a specific window by its title to declutter your desktop and focus on other tasks using Windows Automation MCP Server.

Instructions

最小化窗口

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYes窗口标题

Implementation Reference

  • The handler function for minimize_window tool. It executes PowerShell script using Shell.Application.MinimizeAll() to minimize all windows (note: ignores specific title).
    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 };
      }
    }
  • Input schema definition for the 'minimize_window' tool, specifying required 'title' parameter.
    {
      name: 'minimize_window',
      description: '最小化窗口',
      inputSchema: {
        type: 'object',
        properties: {
          title: { type: 'string', description: '窗口标题' },
        },
        required: ['title'],
      },
    },
  • src/server.js:43-52 (registration)
    Registration of WindowTools instance in the main tools map, enabling dynamic tool discovery and execution via getToolDefinitions() and canHandle().
    this.tools = {
      filesystem: new FileSystemTools(),
      process: new ProcessTools(),
      mouseKeyboard: new MouseKeyboardTools(),
      window: new WindowTools(),
      screen: new ScreenTools(),
      clipboard: new ClipboardTools(),
      powershell: new PowerShellTools(),
      browser: new BrowserTools(),
    };
  • canHandle method registers 'minimize_window' as a supported tool name for routing.
    canHandle(toolName) {
      const tools = ['list_windows', 'get_active_window', 'activate_window', 
                     'close_window', 'minimize_window', 'maximize_window'];
      return tools.includes(toolName);
    }
  • Dispatch case in executeTool that routes 'minimize_window' calls to the handler.
        case 'minimize_window':
          return await this.minimizeWindow(args.title);
        case 'maximize_window':
          return await this.maximizeWindow(args.title);
        default:
          throw new Error(`未知工具: ${name}`);
      }
    }
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure but offers none. It doesn't indicate whether this operation requires specific permissions, if it's reversible, what happens to the window state, or any side effects. The single Chinese phrase adds no behavioral context beyond the basic action implied by the name.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

While technically concise with just three Chinese characters, this is under-specification rather than effective brevity. The description fails to provide necessary context and reads as incomplete rather than efficiently structured. Every sentence should earn its place, but here the single phrase doesn't earn enough.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given a mutation tool with no annotations, no output schema, and sibling tools performing similar window operations, the description is completely inadequate. It doesn't explain what 'minimize' means in this context, how it differs from closing or maximizing, what happens after minimization, or any error conditions. The agent would struggle to use this tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage with the 'title' parameter clearly documented as '窗口标题' (window title). The description adds no additional parameter information beyond what's already in the schema, so it meets the baseline score of 3 for adequate schema coverage without extra value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description '最小化窗口' (minimize window) is a tautology that restates the tool name in Chinese without adding specificity. It doesn't clarify what type of window (browser, application, system) or provide any distinguishing context from sibling tools like 'close_window' or 'maximize_window'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'close_window' or 'maximize_window'. There's no mention of prerequisites, context requirements, or comparison with sibling tools, leaving the agent with no usage direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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

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