Skip to main content
Glama

update_note

Modify the title or content of an existing note in TaskFlow MCP's task management system using the note's ID and request ID.

Instructions

Update an existing note's title or content.

Provide the 'requestId' and 'noteId', and optionally 'title' and/or 'content' to update.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestIdYes
noteIdYes
titleNo
contentNo

Implementation Reference

  • The main handler function for the 'update_note' MCP tool. It destructures the input arguments and delegates the update logic to the TaskFlowService.updateNote method.
    async update_note(args: any) {
      const { requestId, noteId, title, content } = args ?? {};
      return service.updateNote(String(requestId), String(noteId), { title, content });
    },
  • Tool definition including name, description, and input schema for 'update_note'. This object is exported and used for registration.
    export const UPDATE_NOTE_TOOL: Tool = {
      name: "update_note",
      description:
        "Update an existing note's title or content.\n\n" +
        "Provide the 'requestId' and 'noteId', and optionally 'title' and/or 'content' to update.",
      inputSchema: {
        type: "object",
        properties: {
          requestId: { type: "string" },
          noteId: { type: "string" },
          title: { type: "string" },
          content: { type: "string" },
        },
        required: ["requestId", "noteId"],
      },
    };
  • Registration of the UPDATE_NOTE_TOOL in the server's listTools handler, making it available via MCP protocol.
    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,
      ],
  • The core service method implementing the note update logic: finds the note, applies updates with sanitization, updates timestamp, and persists changes.
    public async updateNote(requestId: string, noteId: string, updates: { title?: string; content?: 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" };
    
      const note = req.notes[noteIndex];
      if (updates.title) note.title = sanitizeString(updates.title);
      if (updates.content) note.content = sanitizeString(updates.content);
      note.updatedAt = new Date().toISOString();
    
      await this.saveTasks();
    
      return { status: "note_updated", message: `Note ${noteId} has been updated.`, note };
    }
  • JSON schema definition for 'update_note' input validation in the shared schemas module (matches the tool's inputSchema).
    update_note: {
      type: "object",
      properties: {
        requestId: { type: "string" },
        noteId: { type: "string" },
        title: { type: "string" },
        content: { type: "string" },
      },
      required: ["requestId", "noteId"],
    },
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states this is an update operation, implying mutation, but doesn't describe permissions needed, whether changes are reversible, error conditions (e.g., invalid noteId), or side effects. For a mutation tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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 appropriately concise with two sentences. The first sentence states the purpose, and the second explains the parameters. There's no wasted text, and it's front-loaded with the core functionality. A minor improvement would be combining sentences for better flow, but it's efficient overall.

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 complexity (a mutation tool with 4 parameters), lack of annotations, and no output schema, the description is incomplete. It covers the basic operation and parameters but misses critical context: no error handling, no details on what the update does (e.g., overwrites or merges), no information on return values, and no guidance on usage relative to siblings. This is inadequate for safe and effective tool invocation.

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 schema provides no parameter documentation. The description adds value by listing the parameters ('requestId', 'noteId', 'title', 'content') and indicating which are required versus optional. However, it doesn't explain what these parameters represent (e.g., format of IDs, constraints on title/content) or provide examples, which is insufficient given the low coverage.

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 tool's purpose: 'Update an existing note's title or content.' It specifies the verb ('update') and resource ('note'), and distinguishes it from sibling tools like 'add_note' (creation) and 'delete_note' (deletion). However, it doesn't explicitly differentiate from 'update_subtask' or 'update_task', which are similar operations on different resources, so it's not a perfect 5.

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 (e.g., cannot update archived notes), or compare it to sibling tools like 'update_subtask' or 'update_task'. The only implied usage is for modifying notes, but this is redundant with the purpose statement.

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/pinkpixel-dev/taskflow-mcp'

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