list_notes
Retrieve and display notes from NotesKeep with options to limit results and include archived items for efficient note management.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of notes to return | |
| includeArchived | No | Include archived notes |
Implementation Reference
- src/index.ts:44-74 (handler)The handler for the 'list_notes' MCP tool. It fetches notes from the NotesKeep API with optional limit and archive filtering.
server.tool( "list_notes", { limit: z.number().optional().default(20).describe("Maximum number of notes to return"), includeArchived: z.boolean().optional().default(false).describe("Include archived notes"), }, async ({ limit, includeArchived }) => { try { const params = new URLSearchParams(); params.set("limit", limit.toString()); if (includeArchived) params.set("includeArchived", "true"); const data = await apiRequest(`/api/notes?${params}`); return { content: [{ type: "text", text: JSON.stringify(data.notes, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error listing notes: ${error}` }], isError: true }; } } );