Skip to main content
Glama

Delete Note

delete_note
DestructiveIdempotent

Delete a note by its ID, removing it permanently. Use this to remove unwanted notes from your collection.

Instructions

Delete a note by ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesNote ID (x-coredata:// format)

Implementation Reference

  • Handler function for the delete_note tool: checks shared note guard, then executes JXA script to delete the note, returns result.
    server.registerTool(
      "delete_note",
      {
        title: "Delete Note",
        description: "Delete a note by ID. The note is moved to Recently Deleted and permanently removed after 30 days.",
        inputSchema: {
          id: z.string().max(500).describe("Note ID (x-coredata:// format)"),
        },
        annotations: {
          readOnlyHint: false,
          destructiveHint: true,
          idempotentHint: true,
          openWorldHint: false,
        },
      },
      async ({ id }) => {
        try {
          const blocked = await guardShared(id, config, "delete_note");
          if (blocked) return errPermission(blocked);
          const result = await runJxa<DeleteResult>(deleteNoteScript(id));
          return ok(result);
        } catch (e) {
          return errJxaFor("delete note", e);
        }
      },
  • Input schema for delete_note: requires a single 'id' string parameter (max 500 chars) identifying the note.
    inputSchema: {
      id: z.string().max(500).describe("Note ID (x-coredata:// format)"),
    },
  • Registration of the delete_note tool via server.registerTool in the registerNoteTools function.
    server.registerTool(
      "delete_note",
  • JXA helper function that generates the AppleScript/JXA script to delete a note by ID. Accesses the Notes application, finds the note by ID, deletes it, and returns {deleted: true, name}.
    export function deleteNoteScript(id: string): string {
      return `
        const Notes = Application('Notes');
        const note = Notes.notes.byId('${esc(id)}');
        const name = note.name();
        Notes.delete(note);
        JSON.stringify({deleted: true, name: name});
      `;
    }
  • Tool-link mapping: after reading a note, suggests delete_note as a next action with the note ID passed as argument.
    { tool: "delete_note", description: "Delete this note", args: { noteId: "{{id}}" } },
Behavior2/5

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

Annotations already indicate destructiveHint=true and idempotentHint=true. The description adds no behavioral context beyond 'Delete', such as whether the note is permanently deleted or moved to trash, or any permission requirements. It repeats the essential action without elaboration.

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?

The description is extremely concise at four words, front-loading the verb and target. However, for a destructive tool, it may be too brief, sacrificing helpful detail for brevity.

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

Completeness2/5

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

Given the tool's destructive nature and lack of output schema, the description is overly minimal. It does not mention outcome, error cases, or recovery options, leaving the agent with insufficient context for reliable use.

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?

With 100% schema description coverage, the schema already explains the 'id' parameter format. The description's 'by ID' adds no new semantic value beyond the schema, earning the baseline score of 3.

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?

The description clearly states the verb 'Delete' and the resource 'note' with the method 'by ID'. It unambiguously identifies the tool's function and distinguishes it from sibling tools like delete_event or delete_reminder.

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?

The description provides no guidance on when to use this tool, when not to, or any prerequisites. It does not mention alternatives such as delete_event or trashing functionality, leaving the agent without context for appropriate use.

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/heznpc/AirMCP'

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