Skip to main content
Glama

getReminders

Retrieve reminders from a specific Apple Reminders list to help users view and manage their tasks through AI assistants.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
listNameYes

Implementation Reference

  • The handler function for the 'getReminders' MCP tool. It takes a listName parameter, fetches reminders using the helper, handles errors, and returns JSON-formatted reminders in MCP response format.
    async ({ listName }) => { try { const items = await reminders.getRemindersFromList(listName); return { content: [{ type: "text", text: JSON.stringify({ reminders: items }) }] }; } catch (error) { return { content: [{ type: "text", text: JSON.stringify({ error: `Failed to get reminders from list: ${listName}` }) }], isError: true }; } }
  • Input schema for the getReminders tool using Zod, requiring a 'listName' string parameter.
    { listName: z.string() },
  • src/index.ts:38-59 (registration)
    Registration of the 'getReminders' tool on the MCP server, specifying name, input schema, and handler function.
    server.tool( "getReminders", { listName: z.string() }, async ({ listName }) => { try { const items = await reminders.getRemindersFromList(listName); return { content: [{ type: "text", text: JSON.stringify({ reminders: items }) }] }; } catch (error) { return { content: [{ type: "text", text: JSON.stringify({ error: `Failed to get reminders from list: ${listName}` }) }], isError: true }; } }
  • Supporting helper function that retrieves reminders from a specific list: finds list by name, calls node-reminders.getReminders, formats the output.
    export async function getRemindersFromList(listName: string): Promise<any[]> { try { // First get the list ID by name const lists = await reminders.getLists(); const targetList = lists.find(list => list.name === listName); if (!targetList) { throw new Error(`List "${listName}" not found`); } // Get reminders from the list with specific properties const reminderItems = await reminders.getReminders( targetList.id, ['name', 'completed', 'dueDate', 'priority', 'body'] ); // Format the reminders to match the expected output format return reminderItems.map(item => ({ name: item.name, completed: item.completed || false, dueDate: formatDate(item.dueDate), priority: item.priority || 0, notes: item.body })); } catch (error) { console.error(`Failed to get reminders from list "${listName}":`, error); throw new Error(`Failed to get reminders from list "${listName}": ${error}`); } }

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/shadowfax92/apple-reminders-mcp'

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