Skip to main content
Glama

shortcuts_run_shortcut

Execute macOS shortcuts in the background using AppleScript integration. Provide a shortcut name and optional input to automate tasks without opening the Shortcuts app.

Instructions

[Shortcuts operations] Run a shortcut with optional input. Uses Shortcuts Events to run in background without opening the app.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName of the shortcut to run
inputNoOptional input to provide to the shortcut

Implementation Reference

  • Handler function that generates AppleScript to run the named shortcut via Shortcuts Events app, optionally with input, and handles errors.
    script: (args) => `
      try
        tell application "Shortcuts Events"
          ${args.input ? 
            `run shortcut "${args.name}" with input "${args.input}"` :
            `run shortcut "${args.name}"`
          }
        end tell
        return "Shortcut '${args.name}' executed successfully"
      on error errMsg
        return "Failed to run shortcut: " & errMsg
      end try
    `,
  • Input schema for the tool: requires 'name' (string), optional 'input' (string).
    schema: {
      type: "object",
      properties: {
        name: {
          type: "string",
          description: "Name of the shortcut to run",
        },
        input: {
          type: "string",
          description: "Optional input to provide to the shortcut",
        },
      },
      required: ["name"],
    },
  • src/index.ts:33-33 (registration)
    Registers the 'shortcuts' category containing the 'run_shortcut' script by adding it to the MCP server.
    server.addCategory(shortcutsCategory);
  • In the listTools handler, constructs the full tool name as '{category.name}_{script.name}', yielding 'shortcuts_run_shortcut'.
    name: `${category.name}_${script.name}`, // Changed from dot to underscore
  • In the callTool handler, parses the tool name 'shortcuts_run_shortcut' by splitting on '_' to extract category 'shortcuts' and script 'run_shortcut'.
    const [categoryName, ...scriptNameParts] =
      toolName.split("_");
    const scriptName = scriptNameParts.join("_"); // Rejoin in case script name has underscores
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses that the tool runs shortcuts in the background using 'Shortcuts Events,' which adds useful behavioral context about execution mode. However, it lacks details on permissions, error handling, or output format, leaving gaps for a mutation tool.

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 concise and front-loaded, consisting of two sentences that efficiently convey the core functionality and key behavioral trait. Every sentence adds value without redundancy, making it easy to parse.

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 no annotations and no output schema, the description is moderately complete for a tool with two parameters. It covers the basic action and execution mode but lacks details on prerequisites, error cases, or return values, which are important for a tool that performs mutations (running shortcuts).

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 both parameters ('name' and 'input'). The description adds marginal value by noting that input is 'optional,' but does not provide additional semantics beyond what the schema specifies (e.g., format of input or examples). Baseline 3 is appropriate given high schema coverage.

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 tool's purpose: 'Run a shortcut with optional input.' It specifies the verb ('run') and resource ('shortcut'), but does not differentiate it from sibling tools like 'shortcuts_list_shortcuts' beyond the basic action. It's not tautological, as it adds operational context beyond the name.

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

Usage Guidelines3/5

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

The description implies usage context by mentioning 'optional input' and that it 'runs in background without opening the app,' but it does not explicitly state when to use this tool versus alternatives (e.g., compared to 'shortcuts_list_shortcuts' or other execution methods). No exclusions or clear alternatives are provided.

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/joshrutkowski/applescript-mcp'

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