Skip to main content
Glama
recursechat

Apple Shortcuts Server

by recursechat

run_shortcut

Execute Apple Shortcuts automations by name to automate tasks on Apple devices, with optional input parameters for customization.

Instructions

Run a Shortcuts automation by name

Input Schema

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

Implementation Reference

  • The handler case for 'run_shortcut' tool, which constructs and executes a 'shortcuts run' command using execSync, handling input and errors.
    case "run_shortcut": {
      try {
        const command = args.input
          ? `shortcuts run "${args.name}" -i "${args.input}"`
          : `shortcuts run "${args.name}"`;
    
        console.error("MCP shortcuts: Running command:", command);
        const stdout = execSync(command).toString();
    
        return {
          content: [
            {
              type: "text",
              text: stdout || "Shortcut executed successfully",
            },
          ],
          isError: false,
        };
      } catch (error) {
        return {
          content: [
            {
              type: "text",
              text: `Failed to run shortcut: ${(error as Error).message}`,
            },
          ],
          isError: true,
        };
      }
    }
  • Tool definition including name, description, and input schema for 'run_shortcut' in the TOOLS array.
    name: "run_shortcut",
    description: "Run a Shortcuts automation by name",
    inputSchema: {
      type: "object",
      properties: {
        name: { type: "string", description: "Name of the shortcut to run" },
        input: {
          type: "string",
          description: "Optional input to pass to the shortcut",
        },
      },
      required: ["name"],
    },
  • src/index.ts:164-166 (registration)
    Registration of the tools list, which includes the 'run_shortcut' tool via the TOOLS array.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: TOOLS,
    }));
  • src/index.ts:168-170 (registration)
    Registration of the CallToolRequestSchema handler, which dispatches to the 'handleToolCall' function containing the 'run_shortcut' logic.
    server.setRequestHandler(CallToolRequestSchema, async (request) =>
      handleToolCall(request.params.name, request.params.arguments ?? {})
    );
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool runs a shortcut but doesn't explain what that entails—whether it's synchronous/asynchronous, if it requires permissions, potential side effects, or error handling. This leaves significant gaps for an agent to understand the tool's behavior.

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 directly states the tool's function without unnecessary words. It is front-loaded and appropriately sized for its purpose.

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

Completeness2/5

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

Given the complexity of executing automations, no annotations, and no output schema, the description is incomplete. It fails to address key aspects like what the tool returns, error conditions, or behavioral traits, leaving the agent with insufficient context for reliable use.

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?

The input schema has 100% coverage, with clear descriptions for both parameters. The description adds no additional meaning beyond the schema, such as examples of valid shortcut names or input formats. Baseline 3 is appropriate since the schema adequately documents the parameters.

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 ('Run') and resource ('Shortcuts automation'), making the purpose understandable. However, it doesn't differentiate from the sibling tool 'list_shortcuts' beyond the basic verb difference, missing an opportunity to clarify this tool executes while the sibling enumerates.

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 or any prerequisites. The description lacks context about dependencies, such as needing to know shortcut names from 'list_shortcuts' or handling errors if a shortcut doesn't exist.

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/recursechat/mcp-server-apple-shortcuts'

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