Skip to main content
Glama
eugenechen0514

mac-apps-launcher

launch_app

Quickly launch Mac applications by specifying the app name, enabling efficient app management directly from the macOS command line.

Instructions

Launch a Mac application by name

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
appNameYes

Implementation Reference

  • The launchApp function implements the core logic to launch a Mac application using the 'open' command.
    export async function launchApp(appName: string): Promise<boolean> {
      try {
        const fullAppName = appName.endsWith(".app") ? appName : `${appName}.app`;
        const appPath = join("/Applications", fullAppName);
        await execAsync(`open "${appPath}"`);
        return true;
      } catch (error) {
        console.error("Error launching application:", error);
        return false;
      }
    }
  • Zod input schema for the launch_app tool, requiring 'appName' as string.
    export const LaunchAppInputSchema = {
      appName: z.string(),
    };
  • tools.ts:50-75 (registration)
    Tool configuration object for 'launch_app' including name, description, annotations, schema reference, and thin wrapper callback that invokes the launchApp utility.
    const launchAppConfig: ToolConfig<typeof LaunchAppInputSchema> = {
      name: "launch_app",
      description: "Launch a Mac application by name",
      annotations: {
        title: "啟動應用程式",
        readOnlyHint: false, // 會修改系統狀態(啟動應用程式)
        destructiveHint: false, // 不執行破壞性操作
        idempotentHint: false, // 重複啟動可能有不同結果
        openWorldHint: true, // 與外部應用程式互動
      },
      schema: LaunchAppInputSchema,
      cb: async (args) => {
        const success = await launchApp(args.appName);
        const toolResult: CallToolResult = {
          content: [
            {
              type: "text",
              text: success
                ? "Application launched successfully"
                : "Failed to launch application",
            },
          ],
        };
        return toolResult;
      },
    };
  • tools.ts:103-107 (registration)
    Export of the tools array where launchAppConfig is registered alongside other tools for use in the MCP server.
    export const tools: ToolConfig<any>[] = [
      listApplicationsConfig,
      launchAppConfig,
      openWithAppConfig,
    ];
Behavior3/5

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

Annotations provide readOnlyHint=false, destructiveHint=false, and openWorldHint=true, indicating this is a non-destructive, non-idempotent operation that may have side effects. The description adds that it launches applications, which aligns with these annotations but doesn't provide additional behavioral context like what happens if the app is already running, permission requirements, or system-level effects.

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 a single, clear sentence with zero wasted words. It's front-loaded with the core functionality and appropriately sized for a simple tool with one parameter.

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

Completeness3/5

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

For a tool with no output schema and minimal annotations, the description covers the basic action but lacks details about return values, error conditions, or system dependencies. It's adequate for the simplest use case but doesn't provide enough context for robust agent decision-making given the tool's potential side effects.

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?

With 0% schema description coverage for the single parameter 'appName', the description doesn't add any parameter-specific information beyond what's implied by the tool name. It mentions 'by name' which echoes the parameter name but doesn't clarify format, examples, or constraints. The baseline is appropriate given the schema's lack of descriptions.

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

Purpose4/5

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

The description clearly states the action ('Launch') and resource ('a Mac application by name'), making the purpose immediately understandable. It doesn't differentiate from sibling tools like 'list_applications' or 'open_with_app', but the verb+resource combination is specific enough for basic understanding.

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?

The description provides no guidance on when to use this tool versus alternatives like 'open_with_app' or 'list_applications'. There's no mention of prerequisites, context for launching applications, or any exclusions that would help an agent choose between available options.

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

Related 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/eugenechen0514/mac-apps-launcher'

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