get_notes
Fetch and retrieve notes directly from NotePlan using Claude Desktop, enabling users to query and access their notes within conversations without leaving the interface.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:15-29 (handler)The handler implementation for the 'get_notes' MCP tool, registered inline via server.tool. Retrieves all notes by calling noteService.getAllNotes() and returns a text content block with JSON-stringified notes.server.tool( 'get_notes', {}, async () => { const notes = noteService.getAllNotes(); return { content: [ { type: 'text', text: JSON.stringify(notes, null, 2), }, ], }; } );
- src/services/noteService.ts:9-19 (schema)TypeScript interface defining the structure of individual Note objects, which are returned as an array by the get_notes tool.interface Note { id: string; title: string; content: string; created: string; modified: string; folder: string; filePath?: string; filename?: string; type?: string; }
- src/services/noteService.ts:193-206 (helper)Core helper function getAllNotes() that implements the note retrieval logic with caching, scanning NotePlan directories or using mock data, called directly by the tool handler.function getAllNotes(): Note[] { const now = Date.now(); // Use cache if still valid if (notesCache.length > 0 && (now - lastCacheUpdate) < CACHE_DURATION) { return notesCache; } // Refresh cache notesCache = loadNotesFromFileSystem(); lastCacheUpdate = now; return notesCache; }