move_to_notes
Transfer reminders to permanent notes for long-term storage and reference, ensuring important tasks and details are retained across AI assistant sessions.
Instructions
Move reminder to permanent notes
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Reminder ID | |
| note | No | Additional note (optional) |
Implementation Reference
- src/index.ts:161-194 (handler)The moveToNotes method in the ReminderManager class implements the core logic for the 'move_to_notes' tool. It retrieves the reminder, creates a markdown note file in the Obsidian vault, updates the reminder status, and returns success or error message.moveToNotes(id: string, additionalNote?: string): { success: boolean; message: string } { const reminder = this.reminders.get(id); if (!reminder || reminder.status !== 'active') { return { success: false, message: 'Reminder not found or already processed' }; } // Create note content const noteContent = `# Reminder: ${reminder.content} Created: ${reminder.created} Priority: ${reminder.priority} ${additionalNote ? `\nNote: ${additionalNote}` : ''} Moved to notes on: ${new Date().toISOString()} `; // Save to Obsidian vault (or wherever permanent notes go) try { const obsidianPath = path.join(homedir(), 'Documents/Obsidian/Brain/Reminders'); if (!fs.existsSync(obsidianPath)) { fs.mkdirSync(obsidianPath, { recursive: true }); } const filename = `reminder_${new Date().toISOString().split('T')[0]}_${id}.md`; fs.writeFileSync(path.join(obsidianPath, filename), noteContent); reminder.status = 'moved'; this.saveReminders(); return { success: true, message: `Moved to notes: ${filename}` }; } catch (e) { return { success: false, message: `Error moving to notes: ${e}` }; } }
- src/index.ts:295-308 (schema)The input schema definition for the 'move_to_notes' tool, specifying parameters id (required) and note (optional).inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Reminder ID' }, note: { type: 'string', description: 'Additional note (optional)' } }, required: ['id'], },
- src/index.ts:293-309 (registration)Registration of the 'move_to_notes' tool in the ListTools response, including name, description, and input schema.name: 'move_to_notes', description: 'Move reminder to permanent notes', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Reminder ID' }, note: { type: 'string', description: 'Additional note (optional)' } }, required: ['id'], }, },
- src/index.ts:389-395 (handler)The switch case in the CallToolRequest handler that dispatches to the moveToNotes function and formats the response.case 'move_to_notes': { const { id, note } = args as { id: string; note?: string }; const result = reminders.moveToNotes(id, note); return { content: [{ type: 'text', text: result.message }], }; }