list_labels
Retrieve all available labels to organize and categorize notes within the NotesKeep MCP Server for efficient note management.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:291-314 (handler)The handler for the 'list_labels' tool, which fetches labels from the API and returns them as a JSON-formatted text response.
server.tool( "list_labels", {}, async () => { try { const data = await apiRequest("/api/labels"); return { content: [{ type: "text", text: JSON.stringify(data.labels, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error listing labels: ${error}` }], isError: true }; } } );