Skip to main content
Glama

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
NameRequiredDescriptionDefault
idYesNote ID

Implementation Reference

  • 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 };
    }
  • 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'],
      },
    },
  • 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,
    };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/spranab/saga-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server