check_reminders
Retrieve and view your scheduled reminders, with options to filter by priority level for organized task management.
Instructions
Check your reminders
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filter | No | Filter by priority (default: all) |
Implementation Reference
- src/index.ts:348-365 (handler)Handler for the check_reminders tool. Retrieves reminders using the filter, formats them by priority and creation time, and returns a formatted text response.case 'check_reminders': { const { filter } = args as { filter?: string }; const items = reminders.getReminders(filter); if (items.length === 0) { return { content: [{ type: 'text', text: 'No active reminders.' }], }; } const formatted = items.map(r => `[${r.priority.toUpperCase()}] ${r.id}: ${r.content}\n Created: ${r.created}` ).join('\n\n'); return { content: [{ type: 'text', text: `Active reminders:\n\n${formatted}` }], }; }
- src/index.ts:251-262 (schema)Input schema definition for the check_reminders tool, specifying optional filter parameter.name: 'check_reminders', description: 'Check your reminders', inputSchema: { type: 'object', properties: { filter: { type: 'string', enum: ['all', 'high', 'normal', 'low'], description: 'Filter by priority (default: all)' } }, },
- src/index.ts:250-263 (registration)Registration of the check_reminders tool in the list of available tools.{ name: 'check_reminders', description: 'Check your reminders', inputSchema: { type: 'object', properties: { filter: { type: 'string', enum: ['all', 'high', 'normal', 'low'], description: 'Filter by priority (default: all)' } }, }, },
- src/index.ts:126-143 (helper)Helper method in ReminderManager that fetches active reminders, applies filter if provided, sorts by priority then age, and returns the list.getReminders(filter: string = 'all'): Reminder[] { let reminders = Array.from(this.reminders.values()) .filter(r => r.status === 'active'); if (filter !== 'all') { reminders = reminders.filter(r => r.priority === filter); } // Sort by priority (high first) then by creation time (oldest first) const priorityOrder = { high: 0, normal: 1, low: 2 }; reminders.sort((a, b) => { const priDiff = priorityOrder[a.priority] - priorityOrder[b.priority]; if (priDiff !== 0) return priDiff; return new Date(a.created).getTime() - new Date(b.created).getTime(); }); return reminders; }