archive_note
Archive a note by its ID to remove it from active view while preserving it in the NotesKeep system for future reference.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ID of the note to archive |
Implementation Reference
- src/index.ts:226-254 (handler)The tool 'archive_note' is defined and implemented here using the 'server.tool' method. It takes a note ID as input and makes a PUT request to the API to set 'isArchived' to true.
server.tool( "archive_note", { id: z.number().describe("ID of the note to archive"), }, async ({ id }) => { try { await apiRequest(`/api/notes/${id}`, { method: "PUT", body: JSON.stringify({ isArchived: true }), }); return { content: [{ type: "text", text: `Note ${id} archived successfully!` }] }; } catch (error) { return { content: [{ type: "text", text: `Error archiving note: ${error}` }], isError: true }; } } );