Skip to main content
Glama
dvcrn

Siri Shortcuts MCP Server

by dvcrn

list_shortcuts

Enable quick access by listing all available Siri shortcuts on macOS through the MCP Server, helping users identify and manage shortcuts efficiently.

Instructions

List all available Siri shortcuts

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function that lists all available Siri shortcuts by executing 'shortcuts list --show-identifiers', parsing the output, populating shortcut maps, and returning the list.
    const listShortcuts = async (): Promise<ToolResult> => { return new Promise((resolve, reject) => { exec("shortcuts list --show-identifiers", (error, stdout, stderr) => { if (error) { reject( new McpError( ErrorCode.InternalError, `Failed to list shortcuts: ${error.message}`, ), ); return; } if (stderr) { reject( new McpError( ErrorCode.InternalError, `Error listing shortcuts: ${stderr}`, ), ); return; } // Parse output with identifiers format: "Name (UUID)" const shortcuts = stdout .split("\n") .filter((line) => line.trim()) .map((line) => { const trimmed = line.trim(); // Extract name and identifier if present const match = trimmed.match(/^(.+?)\s*\(([A-F0-9-]+)\)$/); if (match) { return { name: match[1].trim(), identifier: match[2] }; } return { name: trimmed }; }); // Update the shortcut map with unique sanitized names const existingSanitizedNames = new Set<string>(); shortcuts.forEach((shortcut) => { const uniqueSanitizedName = generateUniqueSanitizedName(shortcut.name, existingSanitizedNames); shortcutMap.set(shortcut.name, uniqueSanitizedName); existingSanitizedNames.add(uniqueSanitizedName); // Store identifier if present if ('identifier' in shortcut && shortcut.identifier) { shortcutIdentifierMap.set(shortcut.name, shortcut.identifier); } }); resolve({ shortcuts }); }); }); };
  • Input schema for list_shortcuts tool (empty object since no parameters required).
    const ListShortcutsSchema = z.object({}).strict();
  • shortcuts.ts:294-298 (registration)
    Registration of the list_shortcuts tool in the base tools array returned by getBaseTools().
    name: ToolName.LIST_SHORTCUTS, description: "List all available Siri shortcuts", inputSchema: zodToJsonSchema(ListShortcutsSchema) as ToolInput, run: listShortcuts, },
  • Enum defining the tool name constant LIST_SHORTCUTS = "list_shortcuts" used in registration and dispatching.
    enum ToolName { LIST_SHORTCUTS = "list_shortcuts", OPEN_SHORTCUT = "open_shortcut", RUN_SHORTCUT = "run_shortcut", }
  • shortcuts.ts:388-389 (registration)
    Dispatch/execution case in the CallToolRequest handler switch statement.
    case ToolName.LIST_SHORTCUTS: result = await listShortcuts();

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