getLists
Retrieve all reminder lists from Apple Reminders to view, organize, and manage tasks across different categories on macOS.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "getLists"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:13-35 (registration)Registers the 'getLists' MCP tool with empty input schema. The handler fetches reminder lists using the helper function and returns a JSON-formatted response or error.
server.tool( "getLists", {}, async () => { try { const lists = await reminders.getRemindersLists(); return { content: [{ type: "text", text: JSON.stringify({ lists }) }] }; } catch (error) { return { content: [{ type: "text", text: JSON.stringify({ error: "Failed to get reminder lists" }) }], isError: true }; } } ); - src/index.ts:16-34 (handler)The core handler function for the 'getLists' tool, which invokes the reminders helper and formats the MCP response.
async () => { try { const lists = await reminders.getRemindersLists(); return { content: [{ type: "text", text: JSON.stringify({ lists }) }] }; } catch (error) { return { content: [{ type: "text", text: JSON.stringify({ error: "Failed to get reminder lists" }) }], isError: true }; } } - src/reminders.ts:23-30 (helper)Helper function that interacts with the node-reminders library to retrieve all reminder list names.
try { const lists = await reminders.getLists(); return lists.map(list => list.name); } catch (error) { console.error('Failed to get reminder lists:', error); throw new Error(`Failed to get reminder lists: ${error}`); } }