check_reminders
View and filter your reminders by priority (all, high, normal, low) to stay organized and manage tasks effectively with MCP Reminders.
Instructions
Check your reminders
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filter | No | Filter by priority (default: all) |
Input Schema (JSON Schema)
{
"properties": {
"filter": {
"description": "Filter by priority (default: all)",
"enum": [
"all",
"high",
"normal",
"low"
],
"type": "string"
}
},
"type": "object"
}
Implementation Reference
- src/index.ts:348-365 (handler)Executes the check_reminders tool by calling getReminders on the ReminderManager instance, formatting the results, and returning them as text content.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)Defines the input schema for the check_reminders tool, specifying an optional filter parameter with allowed values.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)Implements the core logic for fetching active reminders, applying optional priority filter, sorting by priority then age, used by the tool handler.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; }