Skip to main content
Glama
eva-wanxin-git

Windows Automation MCP Server

launch_application

Opens Windows applications using file paths or commands, with options to pass arguments and control execution flow.

Instructions

启动应用程序

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes应用程序路径或命令
argsNo命令行参数(可选)
waitNo是否等待程序结束(可选)

Implementation Reference

  • The core handler function for the 'launch_application' tool. It constructs a command from the path and args, and either executes it synchronously (if wait=true) using execAsync or asynchronously using spawn.
    async launchApplication(appPath, args = [], wait = false) {
      try {
        const command = args.length > 0 ? `"${appPath}" ${args.join(' ')}` : `"${appPath}"`;
        
        if (wait) {
          const { stdout, stderr } = await execAsync(command);
          return { success: true, path: appPath, output: stdout, error: stderr };
        } else {
          spawn(command, { shell: true, detached: true, stdio: 'ignore' }).unref();
          return { success: true, path: appPath, message: '应用程序已启动' };
        }
      } catch (error) {
        return { success: false, error: error.message };
      }
    }
  • Input schema defining the parameters for the launch_application tool: path (required), args (optional array), wait (optional boolean).
    inputSchema: {
      type: 'object',
      properties: {
        path: { type: 'string', description: '应用程序路径或命令' },
        args: { type: 'array', items: { type: 'string' }, description: '命令行参数(可选)' },
        wait: { type: 'boolean', description: '是否等待程序结束(可选)' },
      },
      required: ['path'],
    },
  • Tool registration in getToolDefinitions(): includes name, description, and input schema for 'launch_application'.
    {
      name: 'launch_application',
      description: '启动应用程序',
      inputSchema: {
        type: 'object',
        properties: {
          path: { type: 'string', description: '应用程序路径或命令' },
          args: { type: 'array', items: { type: 'string' }, description: '命令行参数(可选)' },
          wait: { type: 'boolean', description: '是否等待程序结束(可选)' },
        },
        required: ['path'],
      },
    },
  • Dispatch in executeTool method that routes 'launch_application' calls to the handler.
    case 'launch_application':
      return await this.launchApplication(args.path, args.args, args.wait);
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions launching but doesn't describe what happens on success/failure, whether it requires specific permissions, if it runs in background/foreground, or how errors are handled. The description is minimal and leaves critical behavioral traits unspecified.

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

Conciseness5/5

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

The description is extremely concise with a single phrase ('启动应用程序'), which is front-loaded and wastes no words. For a simple tool, this brevity is appropriate, though it may sacrifice clarity.

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

Completeness2/5

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

Given the complexity of launching applications (which can involve permissions, environment variables, error handling) and no annotations or output schema, the description is incomplete. It doesn't cover return values, failure modes, or system-specific behaviors, leaving significant gaps for an AI agent to use it 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?

Schema description coverage is 100%, so the schema already documents all three parameters (path, args, wait) with descriptions. The tool description adds no additional meaning beyond what's in the schema, such as examples of valid paths or typical args usage. Baseline 3 is appropriate when the schema does the heavy lifting.

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

Purpose3/5

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

The description '启动应用程序' (launch application) states the basic verb+resource but is vague about scope and differentiation. It doesn't specify what types of applications (local executables, scripts, etc.) or how it differs from sibling tools like 'browser_launch' or 'run_cmd'. The purpose is clear at a high level but lacks specificity.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives like 'browser_launch' for web browsers, 'run_cmd' for command-line execution, or 'activate_window' for already-running applications. The description offers no context about prerequisites, typical use cases, or exclusions.

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