note_add
Add notes or comments to tickets, tasks, projects, or organizations to document context, decisions, and 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
| Name | Required | Description | Default |
|---|---|---|---|
| entity_type | Yes | Type of entity | |
| entity_id | Yes | ID of the entity | |
| content | Yes | Note content |
Implementation Reference
- src/tpm_mcp/server.py:706-715 (handler)Main tool handler in _handle_tool function. Creates NoteCreate from arguments and calls db.add_note to persist the note, returns confirmation message.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}"
- src/tpm_mcp/server.py:383-398 (registration)Tool registration in list_tools() function, including name, description, and JSON input schema matching NoteCreate model.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"], }, ),
- src/tpm_mcp/db.py:758-772 (schema)Database implementation of add_note: generates ID, inserts into 'notes' table using SQL, commits, and returns Note model instance.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), )
- src/tpm_mcp/models.py:159-162 (schema)Pydantic model NoteCreate defining the input structure for note_add tool, used for validation and type hints.class NoteCreate(BaseModel): entity_type: str entity_id: str content: str