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, }; }

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