Skip to main content
Glama

Is App Running

is_app_running
Read-onlyIdempotent

Check whether an application, such as 'Safari', is currently running on macOS.

Instructions

Check whether an application is currently running.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesApplication name to check (e.g. 'Safari')

Implementation Reference

  • Registers the 'is_app_running' tool with an MCP server, including input schema (name string) and handler that calls isAppRunningScript via JXA.
    server.registerTool(
      "is_app_running",
      {
        title: "Is App Running",
        description: "Check whether an application is currently running. Returns process details if found.",
        inputSchema: {
          name: z.string().min(1).max(500).describe("Application name to check (e.g. 'Safari')"),
        },
        annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
      },
      async ({ name }) => {
        try {
          return ok(await runJxa(isAppRunningScript(name)));
        } catch (e) {
          return errJxaFor("check app running", e);
        }
      },
    );
  • Async handler function that runs the JXA script to check if an app is running, returning the result or an error.
    async ({ name }) => {
      try {
        return ok(await runJxa(isAppRunningScript(name)));
      } catch (e) {
        return errJxaFor("check app running", e);
      }
    },
  • Input schema for the tool: 'name' (string, 1-500 chars) describing the application name to check.
    inputSchema: {
      name: z.string().min(1).max(500).describe("Application name to check (e.g. 'Safari')"),
    },
    annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
  • Generates a JXA script string that uses System Events to check if an application process is running, returning running status, name, bundle ID, PID, and visibility.
    export function isAppRunningScript(name: string): string {
      return `
        const se = Application('System Events');
        const procs = se.processes.whose({name: '${esc(name)}'})();
        if (procs.length > 0) {
          const p = procs[0];
          JSON.stringify({running: true, name: p.name(), bundleIdentifier: p.bundleIdentifier(), pid: p.unixId(), visible: p.visible()});
        } else {
          JSON.stringify({running: false, name: '${esc(name)}'});
        }
      `;
    }
  • docs/app.js:240-240 (registration)
    Documentation entry listing the 'is_app_running' tool with description 'Check app' and type 'read'.
    { name: 'is_app_running', desc: 'Check app', type: 'read' },
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and idempotentHint=true, so safety profile is clear. The description adds no additional behavioral context beyond what the schema provides.

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, efficient sentence that conveys the core function with no unnecessary words.

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

Completeness4/5

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

For a simple boolean check tool, the description is adequate. While there is no output schema, the return type is implied. Combined with rich annotations, it provides sufficient context.

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 coverage is 100%, and the parameter 'name' already includes a description with an example. The description adds no extra meaning beyond 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 the verb 'Check' and the resource 'application', making the tool's purpose specific and distinguishable from siblings like 'list_running_apps' and 'get_frontmost_app'.

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. Sibling tools exist but are not referenced, leaving the agent without context for selection.

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/heznpc/AirMCP'

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