Skip to main content
Glama

delete_note

Remove a specific note from a task request in TaskFlow MCP by providing the request ID and note ID.

Instructions

Delete a note from a request.

Provide the 'requestId' and 'noteId' of the note to delete.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestIdYes
noteIdYes

Implementation Reference

  • The main handler function for the 'delete_note' tool. Extracts requestId and noteId from arguments and calls the TaskFlowService.deleteNote method.
    async delete_note(args: any) {
      const { requestId, noteId } = args ?? {};
      return service.deleteNote(String(requestId), String(noteId));
    },
  • JSON Schema definition for the 'delete_note' tool input validation.
    delete_note: {
      type: "object",
      properties: {
        requestId: { type: "string" },
        noteId: { type: "string" },
      },
      required: ["requestId", "noteId"],
    },
  • Registration of the 'delete_note' tool (DELETE_NOTE_TOOL) in the server's list of available tools.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: [
        PLAN_TASK_TOOL,
        GET_NEXT_TASK_TOOL,
        MARK_TASK_DONE_TOOL,
        OPEN_TASK_DETAILS_TOOL,
        LIST_REQUESTS_TOOL,
        ADD_TASKS_TO_REQUEST_TOOL,
        UPDATE_TASK_TOOL,
        DELETE_TASK_TOOL,
        ADD_SUBTASKS_TOOL,
        MARK_SUBTASK_DONE_TOOL,
        UPDATE_SUBTASK_TOOL,
        DELETE_SUBTASK_TOOL,
        EXPORT_TASK_STATUS_TOOL,
        ADD_NOTE_TOOL,
        UPDATE_NOTE_TOOL,
        DELETE_NOTE_TOOL,
        ADD_DEPENDENCY_TOOL,
        GET_PROMPTS_TOOL,
        SET_PROMPTS_TOOL,
        UPDATE_PROMPTS_TOOL,
        REMOVE_PROMPTS_TOOL,
        ARCHIVE_COMPLETED_REQUESTS_TOOL,
        LIST_ARCHIVED_REQUESTS_TOOL,
        RESTORE_ARCHIVED_REQUEST_TOOL,
      ],
    }));
  • Core service method that performs the note deletion logic: loads data, finds the note, removes it from the request's notes array, and saves the changes.
    public async deleteNote(requestId: string, noteId: string) {
      await this.loadTasks();
      const req = this.getRequest(requestId);
      if (!req) return { status: "error", message: "Request not found" };
    
      if (!req.notes) return { status: "error", message: "No notes found for this request" };
    
      const noteIndex = req.notes.findIndex((n) => n.id === noteId);
      if (noteIndex === -1) return { status: "error", message: "Note not found" };
    
      req.notes.splice(noteIndex, 1);
      await this.saveTasks();
    
      return { status: "note_deleted", message: `Note ${noteId} has been deleted.` };
    }
  • Initialization of handlers object which includes the delete_note handler function from taskflowHandlers.
    this.handlers = taskflowHandlers(service);

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It states the action is 'Delete', implying a destructive mutation, but doesn't disclose critical details like whether deletion is permanent, requires specific permissions, or has side effects (e.g., affecting request status). This leaves significant gaps for a tool that alters data.

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 highly concise and front-loaded, with two sentences that directly state the purpose and parameters without any fluff. Every word serves a functional role, making it efficient for an agent to parse 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?

Given the tool's complexity (a destructive operation with 2 parameters), lack of annotations, and no output schema, the description is incomplete. It fails to address behavioral risks, parameter details, or expected outcomes, leaving the agent with insufficient information to use the tool safely and effectively.

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 description coverage is 0%, so the description must compensate but only partially does. It names the parameters ('requestId' and 'noteId') and indicates they identify the note to delete, adding basic context. However, it doesn't explain what these IDs represent, their format, or where to obtain them, leaving the schema's undocumented parameters inadequately clarified.

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 action ('Delete') and target resource ('a note from a request'), making the purpose immediately understandable. It distinguishes itself from siblings like 'update_note' or 'add_note' by specifying deletion. However, it doesn't explicitly differentiate from other deletion tools like 'delete_subtask' or 'delete_task', which keeps it from a perfect score.

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. It doesn't mention prerequisites (e.g., note must exist), exclusions, or compare with siblings like 'update_note' for modification instead of deletion. The agent must infer usage from context alone.

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