Skip to main content
Glama

note_delete

DestructiveIdempotent

Delete a note by its ID to remove outdated or incorrect entries from your project tracker. Keep your data clean and organized.

Instructions

Delete a note by ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesNote ID

Implementation Reference

  • The handler function that executes the note_delete tool logic. It gets the database, looks up the note by ID (throwing if not found), deletes the note, logs the activity, and returns the deleted note's id, title, and a deleted flag.
    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/input validation definition for the note_delete tool. It defines the tool name, description, annotations (destructiveHint: true), and an inputSchema requiring an integer 'id' field.
    {
      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 handler registration mapping the string 'note_delete' to the handleNoteDelete function, exported as part of the handlers record.
    export const handlers: Record<string, ToolHandler> = {
      note_save: handleNoteSave,
      note_list: handleNoteList,
      note_search: handleNoteSearch,
      note_delete: handleNoteDelete,
    };
  • src/index.ts:37-49 (registration)
    Top-level registration where noteHandlers (including note_delete) are spread into the ALL_HANDLERS record, making it available for the CallToolRequestSchema handler.
    const ALL_HANDLERS: Record<string, (args: Record<string, unknown>) => unknown> = {
      ...projectHandlers,
      ...epicHandlers,
      ...taskHandlers,
      ...subtaskHandlers,
      ...noteHandlers,
      ...commentHandlers,
      ...templateHandlers,
      ...dashboardHandlers,
      ...searchHandlers,
      ...activityHandlers,
      ...exportImportHandlers,
    };
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate destructiveHint=true and idempotentHint=true. Description adds no further behavioral context (e.g., permanence of deletion, soft-delete behavior). Adequate given annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence with 5 words, no wasted text. However, could be slightly more informative while remaining concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple delete tool with one required parameter and no output schema, the description is sufficient. It lacks mention of return value or side effects, but annotations cover the destructive nature.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with parameter 'id' described as 'Note ID'. Description adds no extra semantics beyond 'by ID'. Baseline score for high coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the action 'delete' and the resource 'note' with the method 'by ID'. It is unambiguous and distinct from siblings like note_list, note_save, note_search.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool vs alternatives (e.g., note_save for updating, or archiving). No exclusions or prerequisites mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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