Skip to main content
Glama
aaronfeingold

MCP Project Context Server

add_note

Attach notes to specific projects with details like content and category, using the MCP Project Context Server to maintain persistent project information and eliminate redundant context explanations.

Instructions

Add a note to the project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryNoNote category
contentYesNote content
projectIdYesProject ID

Implementation Reference

  • Core handler function that retrieves the project, adds a new note object with generated ID, default category if omitted, timestamp, pushes to project.notes array, and persists the update via store.updateProject.
    async addNote( projectId: string, content: string, category?: string ): Promise<void> { const project = await this.store.getProject(projectId); if (!project) { throw new Error("Project not found"); } project.notes.push({ id: uuidv4(), content, category: category || "general", timestamp: new Date().toISOString(), }); await this.store.updateProject(project); }
  • src/server.ts:279-314 (registration)
    Registers the 'add_note' MCP tool, providing title, description, Zod input schema validation, and an async handler that calls ContextManager.addNote within try-catch, returning success or error message.
    this.server.registerTool( "add_note", { title: "Add Note", description: "Add a note to the project", inputSchema: { projectId: z.string().describe("Project ID"), content: z.string().describe("Note content"), category: z.string().optional().describe("Note category"), }, }, async ({ projectId, content, category }) => { try { await this.contextManager.addNote(projectId, content, category); return { content: [ { type: "text", text: "Note added successfully", }, ], }; } catch (error) { return { content: [ { type: "text", text: `Error adding note: ${ error instanceof Error ? error.message : "Unknown error" }`, }, ], }; } } );
  • Zod schema definition for the notes array in ProjectContext, defining the structure of each note (id, content, timestamp, optional category) used when adding notes.
    notes: z .array( z.object({ id: z.string(), content: z.string(), timestamp: z.string(), category: z.string().optional(), }) ) .default([]), createdAt: z.string(),

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/aaronfeingold/mcp-project-context'

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