Skip to main content
Glama
9Ninety
by 9Ninety

deleteNote

Remove a specific note from the MCP Notes server by providing its unique ID, ensuring precise management of stored records.

Instructions

Deletes a specific note by its ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesID of the note to delete

Implementation Reference

  • The core handler function that performs the deletion of a note from the DynamoDB table and updates the ALL_RESOURCES list by removing the deleted note's resource.
    export const handleDeleteNote = async (
      docClient: DynamoDBDocumentClient,
      tableName: string,
      id: string,
      ALL_RESOURCES: Resource[]
    ) => {
      const command = new DeleteCommand({ TableName: tableName, Key: { id } });
      await docClient.send(command);
    
      const index = ALL_RESOURCES.findIndex(
        (res) => res.uri === `notes://notes/${id}`
      );
      if (index !== -1) {
        ALL_RESOURCES.splice(index, 1);
      }
    
      return {
        content: [{ type: "text", text: `Note with ID '${id}' has been deleted.` }],
      };
    };
  • Zod input schema for the deleteNote tool, validating the 'id' parameter.
    export const DeleteNoteInputSchema = z.object({
      id: z.string().describe("ID of the note to delete"),
    });
  • Definition of the MCP 'deleteNote' tool within the getTools() function, specifying name, description, and input schema.
    {
      name: ToolName.DELETE_NOTE,
      description: "Deletes a specific note by its ID.",
      inputSchema: zodToJsonSchema(DeleteNoteInputSchema) as Tool["inputSchema"],
    },
  • Dispatch logic in the CallToolRequest handler that parses input and invokes the deleteNote handler.
    case ToolName.DELETE_NOTE: {
      const { id: deleteNoteId } = DeleteNoteInputSchema.parse(args);
      return handleDeleteNote(
        docClient,
        tableName,
        deleteNoteId,
        ALL_RESOURCES
      );
    }
  • Enum definition for the tool name constant 'deleteNote'.
    DELETE_NOTE = "deleteNote",
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states 'Deletes' which implies a destructive mutation, but lacks details on permissions needed, whether deletion is permanent or reversible, error handling (e.g., invalid ID), or side effects. This leaves significant gaps for a destructive operation.

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

Conciseness5/5

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

The description is a single, efficient sentence with zero wasted words. It is front-loaded with the core action ('Deletes'), making it easy to scan and understand quickly.

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?

For a destructive tool with no annotations and no output schema, the description is incomplete. It lacks critical information such as success/error responses, confirmation prompts, or behavioral nuances (e.g., cascading effects). The schema covers the parameter, but overall context for safe and effective use is insufficient.

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?

The schema description coverage is 100%, with the parameter 'id' documented as 'ID of the note to delete'. The description adds minimal value beyond this, only reiterating 'by its ID' without providing additional context like ID format or examples. Baseline 3 is appropriate given the schema does the heavy lifting.

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

Purpose4/5

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

The description clearly states the verb ('Deletes') and resource ('a specific note'), making the purpose unambiguous. It specifies 'by its ID' which helps differentiate it from siblings like 'listNotes' or 'writeNote', though it doesn't explicitly contrast with them in the description text.

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 versus alternatives like 'writeNote' for updates or 'getNote' for retrieval. It mentions the 'ID' parameter but doesn't explain prerequisites (e.g., note must exist) or exclusions (e.g., cannot delete non-existent notes).

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

Related 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/9Ninety/MCPNotes'

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