add_label_to_note
Add a label to an existing note in NotesKeep to organize and categorize your content for better retrieval and management.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| noteId | Yes | ID of the note | |
| labelId | Yes | ID of the label to add |
Implementation Reference
- src/index.ts:377-402 (handler)The handler for the add_label_to_note tool, which sends a POST request to add a label to a specific note.
server.tool( "add_label_to_note", { noteId: z.number().describe("ID of the note"), labelId: z.number().describe("ID of the label to add"), }, async ({ noteId, labelId }) => { try { await apiRequest(`/api/notes/${noteId}/labels`, { method: "POST", body: JSON.stringify({ labelId }), }); return { content: [{ type: "text", text: `Label ${labelId} added to note ${noteId} successfully!` }] }; } catch (error) { return { content: [{ type: "text", text: `Error adding label to note: ${error}` }], isError: true