Skip to main content
Glama

add_note

Attach contextual information to task requests, enabling clear communication of project details, user preferences, or guidelines for reference during task execution.

Instructions

Add a note to a request. Notes can contain important information about the project, such as user preferences or guidelines.

Notes are displayed in the task progress table and can be referenced when working on tasks.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestIdYes
titleYes
contentYes

Implementation Reference

  • Handler function for the 'add_note' tool that extracts requestId, title, and content from args and calls TaskFlowService.addNote
    async add_note(args: any) {
      const { requestId, title, content } = args ?? {};
      return service.addNote(String(requestId), String(title), String(content));
    },
  • Tool definition for 'add_note' including name, description, and input schema validation
    export const ADD_NOTE_TOOL: Tool = {
      name: "add_note",
      description:
        "Add a note to a request. Notes can contain important information about the project, such as user preferences or guidelines.\n\n" +
        "Notes are displayed in the task progress table and can be referenced when working on tasks.",
      inputSchema: {
        type: "object",
        properties: {
          requestId: { type: "string" },
          title: { type: "string" },
          content: { type: "string" },
        },
        required: ["requestId", "title", "content"],
      },
    };
  • Registration of ADD_NOTE_TOOL in the list of tools returned by ListToolsRequestHandler
    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 implements adding a note to a request: generates ID, sanitizes inputs, persists to file, and returns confirmation
    public async addNote(requestId: string, title: string, content: string) {
      await this.loadTasks();
      const req = this.getRequest(requestId);
      if (!req) return { status: "error", message: "Request not found" };
    
      const now = new Date().toISOString();
      const factory = new TaskFactory({ value: this.globalIdCounter });
      const noteId = factory.createNoteId();
      this.globalIdCounter = factory["counterRef"].value;
    
      const note: Note = {
        id: noteId,
        title: sanitizeString(title),
        content: sanitizeString(content),
        createdAt: now,
        updatedAt: now,
      };
    
      if (!req.notes) req.notes = [];
      req.notes.push(note);
      await this.saveTasks();
    
      return {
        status: "note_added",
        message: `Note "${title}" has been added to request ${requestId}.`,
        note,
      };
    }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.7/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 lacks critical behavioral details. It mentions notes are displayed in task progress and can be referenced, but doesn't cover permissions, rate limits, whether notes are editable/deletable, or what happens on success/failure. This is inadequate for a mutation tool.

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 that avoid redundancy. The first sentence states the purpose, and the second provides context about display and reference, though it could be more front-loaded with key details.

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 mutation tool with 3 parameters, 0% schema coverage, no annotations, and no output schema, the description is incomplete. It lacks details on parameters, behavioral traits, error handling, and output, leaving significant gaps for an AI agent to use it correctly.

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

Parameters2/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 adds no parameter-specific information. It doesn't explain what 'requestId', 'title', or 'content' represent, their formats, or constraints. The mention of 'important information about the project' vaguely relates to 'content' but is insufficient.

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 ('Add a note') and target resource ('to a request'), specifying that notes contain project information like user preferences or guidelines. It distinguishes from siblings like 'delete_note' and 'update_note' by focusing on creation, but could be more explicit about differentiation.

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 such as 'update_note' or 'add_tasks_to_request', nor does it mention prerequisites like needing an existing request. It only implies usage through context about note content and display.

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