Skip to main content
Glama
recursechat

Apple Shortcuts Server

by recursechat

list_shortcuts

Discover available shortcuts to automate tasks on Apple devices. This tool provides a complete list of shortcuts for users to browse and select automation options.

Instructions

List all available shortcuts

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'list_shortcuts' tool, which updates the list of shortcuts and returns them as a text response.
    case "list_shortcuts": {
      updateShortcutsList();
      console.error("MCP shortcuts: Listing shortcuts");
      return {
        content: [
          {
            type: "text",
            text: `Available shortcuts:\n${availableShortcuts.join("\n")}`,
          },
        ],
        isError: false,
      };
    }
  • Schema definition for the 'list_shortcuts' tool, specifying no input parameters.
    {
      name: "list_shortcuts",
      description: "List all available shortcuts",
      inputSchema: {
        type: "object",
        properties: {},
      },
    },
  • src/index.ts:164-166 (registration)
    Registers the tool list handler, which exposes the 'list_shortcuts' tool via the TOOLS array.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: TOOLS,
    }));
  • src/index.ts:168-170 (registration)
    Registers the general tool call handler that dispatches to specific tool handlers including 'list_shortcuts'.
    server.setRequestHandler(CallToolRequestSchema, async (request) =>
      handleToolCall(request.params.name, request.params.arguments ?? {})
    );
  • Helper function to fetch and parse the list of available shortcuts using the 'shortcuts list' command.
    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 = [];
      }
    }
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