pin_note
Pin or unpin notes in NotesKeep to prioritize important information and organize your workspace effectively.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ID of the note to pin/unpin | |
| pinned | No | Pin (true) or unpin (false) |
Implementation Reference
- src/index.ts:257-283 (handler)The handler and registration for the 'pin_note' tool, which updates the 'isPinned' status of a note via the API.
server.tool( "pin_note", { id: z.number().describe("ID of the note to pin/unpin"), pinned: z.boolean().optional().default(true).describe("Pin (true) or unpin (false)"), }, async ({ id, pinned }) => { try { await apiRequest(`/api/notes/${id}`, { method: "PUT", body: JSON.stringify({ isPinned: pinned }), }); return { content: [{ type: "text", text: `Note ${id} ${pinned ? "pinned" : "unpinned"} successfully!` }] }; } catch (error) { return { content: [{ type: "text", text: `Error pinning note: ${error}` }], isError: true };