list_labels
Retrieve all available labels to organize and categorize notes within the NotesKeep MCP Server 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_labels"
}
}Input 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 }; } } );