note_delete
Remove a specific note from the Saga MCP project tracker by providing its ID, helping maintain organized project documentation.
Instructions
Delete a note by ID.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Note ID |
Implementation Reference
- src/tools/notes.ts:180-191 (handler)The function `handleNoteDelete` implements the logic to delete a note by its ID and log the activity.
function handleNoteDelete(args: Record<string, unknown>) { const db = getDb(); const id = args.id as number; const note = db.prepare('SELECT * FROM notes WHERE id = ?').get(id) as Record<string, unknown> | undefined; if (!note) throw new Error(`Note ${id} not found`); db.prepare('DELETE FROM notes WHERE id = ?').run(id); logActivity(db, 'note', id, 'deleted', null, null, null, `Note '${note.title}' deleted`); return { id, title: note.title, deleted: true }; } - src/tools/notes.ts:71-81 (schema)The schema definition for the `note_delete` tool.
name: 'note_delete', description: 'Delete a note by ID.', annotations: { title: 'Delete Note', readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false }, inputSchema: { type: 'object', properties: { id: { type: 'integer', description: 'Note ID' }, }, required: ['id'], }, }, - src/tools/notes.ts:193-198 (registration)The registration of the `note_delete` handler within the `handlers` object.
export const handlers: Record<string, ToolHandler> = { note_save: handleNoteSave, note_list: handleNoteList, note_search: handleNoteSearch, note_delete: handleNoteDelete, };