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
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The name of the shortcut to open |
Implementation Reference
- shortcuts.ts:144-169 (handler)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}` }); }); }); };
- shortcuts.ts:28-32 (schema)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);
- shortcuts.ts:48-48 (helper)ToolName enum value defining the string name 'open_shortcut'.OPEN_SHORTCUT = "open_shortcut",