list_notes
Retrieve and display notes from NotesKeep with options to limit results and include archived items for efficient note management.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list_notes"
}
}Input 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 }; } } );