Skip to main content
Glama
recursechat

Apple Shortcuts Server

by recursechat

list_shortcuts

Retrieve a complete list of available shortcuts from the Apple Shortcuts Server for streamlined workflow management and automation.

Instructions

List all available shortcuts

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The switch case in handleToolCall that implements the logic for the 'list_shortcuts' tool. It calls updateShortcutsList() and returns the list of available shortcuts as text content.
    case "list_shortcuts": { updateShortcutsList(); console.error("MCP shortcuts: Listing shortcuts"); return { content: [ { type: "text", text: `Available shortcuts:\n${availableShortcuts.join("\n")}`, }, ], isError: false, }; }
  • The schema definition for the 'list_shortcuts' tool in the TOOLS array, specifying name, description, and empty input schema.
    { name: "list_shortcuts", description: "List all available shortcuts", inputSchema: { type: "object", properties: {}, }, },
  • src/index.ts:164-166 (registration)
    Handler for ListToolsRequestSchema that registers the list of tools, including 'list_shortcuts', by returning the TOOLS array.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS, }));
  • Helper function that populates the global availableShortcuts array by running the 'shortcuts list' command and parsing its output.
    function updateShortcutsList() { try { const stdout = execSync("shortcuts list").toString(); availableShortcuts = stdout .split("\n") .map((line) => line.trim()) .filter((line) => line.length > 0); } catch (error) { console.error("Failed to list shortcuts:", error); availableShortcuts = []; } }

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

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