Skip to main content
Glama

Run Shortcut

run_shortcut
Destructive

Run any Siri Shortcut by providing its exact name and optional text input.

Instructions

Run a Siri Shortcut by name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesShortcut name (exact match)
inputNoOptional text input for the shortcut

Implementation Reference

  • The handler/executor for the run_shortcut tool. Calls runJxa with runShortcutScript.
    async ({ name, input }) => {
      try {
        return okLinked("run_shortcut", await runJxa(runShortcutScript(name, input)));
      } catch (e) {
        return errJxaFor("run shortcut", e);
      }
    },
  • Input/output schema definition for run_shortcut: requires 'name' (string, max 500), optional 'input' (string, max 10000).
    {
      title: "Run Shortcut",
      description:
        "Run a Siri Shortcut by name. Optionally provide text input. Returns the shortcut's output. Note: shortcuts may trigger UI prompts or perform system actions.",
      inputSchema: {
        name: z.string().max(500).describe("Shortcut name (exact match)"),
        input: z.string().max(10000).optional().describe("Optional text input for the shortcut"),
      },
      annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: true },
    },
  • Registration of the run_shortcut tool via server.registerTool in the registerShortcutsTools function.
    server.registerTool(
      "run_shortcut",
      {
        title: "Run Shortcut",
        description:
          "Run a Siri Shortcut by name. Optionally provide text input. Returns the shortcut's output. Note: shortcuts may trigger UI prompts or perform system actions.",
        inputSchema: {
          name: z.string().max(500).describe("Shortcut name (exact match)"),
          input: z.string().max(10000).optional().describe("Optional text input for the shortcut"),
        },
        annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: true },
      },
      async ({ name, input }) => {
        try {
          return okLinked("run_shortcut", await runJxa(runShortcutScript(name, input)));
        } catch (e) {
          return errJxaFor("run shortcut", e);
        }
      },
    );
  • Helper function that generates a JXA script snippet to run a shortcut via the macOS 'shortcuts run' CLI command.
    export function runShortcutScript(name: string, input?: string): string {
      const inputPart = input !== undefined ? ` --input-type text --input "${escJxaShell(input)}"` : "";
      return `
        const app = Application.currentApplication();
        app.includeStandardAdditions = true;
        const output = app.doShellScript('shortcuts run "${escJxaShell(name)}"${inputPart}');
        JSON.stringify({shortcut: '${esc(name)}', output: output});
      `;
    }
Behavior2/5

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

Annotations indicate destructiveHint=true and openWorldHint=true, implying the tool can modify state or have external effects. The description does not disclose this behavior, nor does it mention that running a shortcut may cause side effects or require certain permissions.

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?

Single sentence with no filler words. Front-loaded with the core action and resource. Efficient and direct.

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?

Given the tool's simplicity (2 params, no output schema), the description is adequate but lacks context about return behavior or side effects. For a tool with destructiveHint and openWorldHint, more completeness would be beneficial.

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 already provides clear descriptions for both parameters: name (exact match) and input (optional text). Description adds no additional meaning. Baseline 3 due to 100% schema coverage.

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?

Description clearly states the action ('Run') and the resource ('Siri Shortcut'), with the scope defined by name. It distinguishes this tool from sibling tools like create_shortcut or edit_shortcut.

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 on when to use this tool versus alternatives. For example, it doesn't mention that this tool executes a shortcut, while 'edit_shortcut' modifies its configuration. No context about prerequisites or restrictions.

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