Skip to main content
Glama

note_add

Add notes or comments to tickets, tasks, projects, or organizations to document context, decisions, and progress updates in project management workflows.

Instructions

PROJECT MANAGEMENT (TPM): Add a note/comment to a ticket or task for context or decisions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entity_typeYesType of entity
entity_idYesID of the entity
contentYesNote content

Implementation Reference

  • Registration of the 'note_add' tool within the @server.list_tools() function, defining its name, description, and JSON input schema.
    Tool( name="note_add", description="PROJECT MANAGEMENT (TPM): Add a note/comment to a ticket or task for context or decisions.", inputSchema={ "type": "object", "properties": { "entity_type": { "type": "string", "enum": ["org", "project", "ticket", "task"], "description": "Type of entity", }, "entity_id": {"type": "string", "description": "ID of the entity"}, "content": {"type": "string", "description": "Note content"}, }, "required": ["entity_type", "entity_id", "content"], }, ),
  • The main handler logic for the 'note_add' tool inside _handle_tool function. It validates input using NoteCreate Pydantic model and delegates persistence to db.add_note, returning a minimal confirmation.
    if name == "note_add": note = db.add_note( NoteCreate( entity_type=args["entity_type"], entity_id=args["entity_id"], content=args["content"], ) ) # Return minimal confirmation - note content is echoed back by caller anyway return f"Added note {note.id} to {note.entity_type}/{note.entity_id}"
  • Pydantic BaseModel NoteCreate defines the input structure for note_add tool, matching the tool's inputSchema exactly (entity_type, entity_id, content). Used for validation in the handler.
    class NoteCreate(BaseModel): entity_type: str entity_id: str content: str
  • Core persistence helper method in TrackerDB class that executes the SQL INSERT into the 'notes' table, generates ID and timestamp, commits the transaction, and returns the created Note object.
    def add_note(self, data: NoteCreate) -> Note: id = self._gen_id() now = self._now() self.conn.execute( "INSERT INTO notes (id, entity_type, entity_id, content, created_at) VALUES (?, ?, ?, ?, ?)", (id, data.entity_type, data.entity_id, data.content, now), ) self.conn.commit() return Note( id=id, entity_type=data.entity_type, entity_id=data.entity_id, content=data.content, created_at=datetime.fromisoformat(now), )

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/urjitbhatia/tpm-mcp'

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