Skip to main content
Glama
dvcrn

Siri Shortcuts MCP Server

by dvcrn

open_shortcut

Quickly launch Siri Shortcuts on macOS by opening them directly in the Shortcuts app. Simplify workflow automation with dynamic shortcut access through the Siri Shortcuts MCP Server.

Instructions

Open a shortcut in the Shortcuts app

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesThe name of the shortcut to open

Implementation Reference

  • The handler function for the 'open_shortcut' tool. It executes the shell command 'shortcuts view <name>' to open the specified shortcut in the Shortcuts app, returning success or error.
    const openShortcut = async (params: OpenShortcutInput): Promise<ToolResult> => {
      return new Promise((resolve, reject) => {
        const command = `shortcuts view '${params.name}'`;
        exec(command, (error, stdout, stderr) => {
          if (error) {
            reject(
              new McpError(
                ErrorCode.InternalError,
                `Failed to open shortcut: ${error.message}`,
              ),
            );
            return;
          }
          if (stderr) {
            reject(
              new McpError(
                ErrorCode.InternalError,
                `Error opening shortcut: ${stderr}`,
              ),
            );
            return;
          }
          resolve({ success: true, message: `Opened shortcut: ${params.name}` });
        });
      });
    };
  • Zod schema defining the input for the open_shortcut tool: an object with a required 'name' string.
    const OpenShortcutSchema = z
      .object({
        name: z.string().describe("The name of the shortcut to open"),
      })
      .strict();
  • shortcuts.ts:300-304 (registration)
    Registration of the 'open_shortcut' tool in the base tools array, specifying name, description, input schema, and run handler that delegates to openShortcut.
      name: ToolName.OPEN_SHORTCUT,
      description: "Open a shortcut in the Shortcuts app",
      inputSchema: zodToJsonSchema(OpenShortcutSchema) as ToolInput,
      run: (params: any) => openShortcut(params as OpenShortcutInput),
    },
  • shortcuts.ts:391-392 (registration)
    Dispatch logic in the CallToolRequest handler that invokes openShortcut when the tool name is OPEN_SHORTCUT.
    case ToolName.OPEN_SHORTCUT:
      result = await openShortcut(args as OpenShortcutInput);
  • ToolName enum value defining the string name 'open_shortcut'.
    OPEN_SHORTCUT = "open_shortcut",
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/dvcrn/mcp-server-siri-shortcuts'

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