Skip to main content
Glama
LukeLamb

claude-linux-mcp

launch_app

Destructive

Launch an application on Linux via shell command, running as a detached process from the server. Execute commands like 'firefox' or 'gnome-terminal'.

Instructions

Launch an application via a shell command (e.g. "firefox", "gnome-terminal", "code /path/to/project"). The process is detached from this server.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYes

Implementation Reference

  • The launchApp function that executes the tool logic. It validates the 'command' argument as a string, spawns the command via 'sh -c' as a detached child process (stdio ignored), unrefs the child so it can outlive the server, and returns the PID.
    function launchApp(args) {
      if (typeof args.command !== 'string' || !args.command.trim()) {
        return errorResult('command is required (string)');
      }
      try {
        const child = spawn('sh', ['-c', args.command], {
          stdio: 'ignore',
          detached: true,
        });
        child.unref();
        return textResult({ command: args.command, pid: child.pid });
      } catch (e) {
        return errorResult(`launch_app failed: ${e.message}`);
      }
    }
  • Tool registration metadata and input schema for launch_app. Defines name 'launch_app', description, annotations (destructiveHint, openWorldHint), and inputSchema requiring a 'command' string property.
    {
      name: 'launch_app',
      description: 'Launch an application via a shell command (e.g. "firefox", "gnome-terminal", "code /path/to/project"). The process is detached from this server.',
      annotations: { title: 'Launch application', destructiveHint: true, openWorldHint: true },
      inputSchema: {
        type: 'object',
        properties: { command: { type: 'string' } },
        required: ['command'],
      },
    },
  • server.js:567-569 (registration)
    Tool dispatch mapping in HANDLERS object: 'launch_app: launchApp' maps the tool name to the handler function.
      launch_app: launchApp,
      screenshot_text: screenshotText,
    };
  • server.js:585-598 (registration)
    tools/list endpoint returns the TOOLS array; tools/call dispatches to HANDLERS[name] to invoke the handler function.
    if (method === 'tools/list') { respond(id, { tools: TOOLS }); return; }
    
    if (method === 'tools/call') {
      const { name, arguments: args = {} } = params || {};
      const handler = HANDLERS[name];
      if (!handler) { error(id, -32601, `unknown tool: ${name}`); return; }
      try {
        const result = await Promise.resolve(handler(args));
        respond(id, result);
      } catch (e) {
        log('tool error:', name, e.message, e.stack);
        respond(id, errorResult(`tool ${name} threw: ${e.message}`));
      }
      return;
  • Helper utilities used by the handler: requireBin for checking binary availability, textResult and errorResult for building JSON-RPC response objects.
    // ─── Helpers ──────────────────────────────────────────────────────────────
    function requireBin(name) {
      if (!BIN[name]) {
        return `Required system tool "${name}" is not installed. Install with: sudo apt install ${name === 'gnomeShot' ? 'gnome-screenshot' : name === 'xclip' ? 'xclip' : name === 'xdotool' ? 'xdotool' : 'wmctrl'}`;
      }
      return null;
    }
Behavior4/5

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

Beyond the annotations (destructiveHint, openWorldHint), the description adds that 'The process is detached from this server', informing users that the tool does not wait for the process and is non-blocking. This is valuable behavioral context not captured by annotations.

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 two sentences, front-loaded with the action and examples. Every sentence adds value: the first defines the tool, the second adds a key behavioral detail. No redundant or unnecessary content.

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

Completeness5/5

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

Given the tool's simplicity (one parameter, no output schema), the description covers all essential aspects: what it does, how to use it (with examples), and a critical behavioral detail (detached process). No further information is needed for correct invocation.

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

Parameters4/5

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

With 0% schema description coverage, the description compensates by explaining that the 'command' parameter is a shell command like 'firefox' or 'code /path/to/project', adding meaning and usage examples beyond the basic string type in the schema.

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

Purpose5/5

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

The description clearly states 'Launch an application via a shell command', providing a specific verb and resource. Examples like 'firefox', 'gnome-terminal', and 'code /path/to/project' further clarify the tool's purpose, and it is well-differentiated from sibling tools that handle clipboard, windows, or mouse actions.

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

Usage Guidelines4/5

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

The description provides clear context on when to use the tool by specifying it launches applications via shell commands and noting the process is detached. It does not explicitly exclude use cases or mention alternatives, but the examples and context make the usage straightforward.

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/LukeLamb/claude-linux-mcp'

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