create_task_comment
Add comments to ClickUp tasks to provide updates, instructions, or feedback, with options to assign users and notify team members.
Instructions
Create a comment on a task
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | Yes | Task ID | |
| comment_text | Yes | Comment text | |
| assignee | No | User ID to assign (optional) | |
| notify_all | No | Notify all assignees (default: true) |
Implementation Reference
- src/clickup_mcp/tools.py:842-866 (handler)MCP tool handler implementation for create_task_comment. Resolves the task ID using _resolve_task_id helper and delegates to ClickUpClient.create_task_comment.async def create_task_comment( self, task_id: str, comment_text: str, assignee: Optional[int] = None, notify_all: bool = True, ) -> Dict[str, Any]: """Create a comment on a task.""" try: # First resolve the task to get the internal ID task = await self._resolve_task_id(task_id) comment_data = await self.client.create_task_comment( task.id, comment_text, assignee, notify_all ) except ClickUpAPIError as e: return {"error": f"Failed to create comment on task '{task_id}': {e!s}"} return { "task_id": task.id, "comment_id": comment_data.get("id"), "comment_text": comment_text, "created": True, "notify_all": notify_all, }
- src/clickup_mcp/tools.py:219-238 (schema)JSON schema definition for the input parameters of the create_task_comment tool.Tool( name="create_task_comment", description="Create a comment on a task", inputSchema={ "type": "object", "properties": { "task_id": {"type": "string", "description": "Task ID"}, "comment_text": {"type": "string", "description": "Comment text"}, "assignee": { "type": "integer", "description": "User ID to assign (optional)", }, "notify_all": { "type": "boolean", "description": "Notify all assignees (default: true)", }, }, "required": ["task_id", "comment_text"], }, ),
- src/clickup_mcp/tools.py:31-32 (registration)Registration of the create_task_comment handler in the tools dictionary within ClickUpTools.__init__."get_task_comments": self.get_task_comments, "create_task_comment": self.create_task_comment,
- src/clickup_mcp/client.py:416-437 (helper)ClickUpClient helper method that makes the actual API POST request to create a task comment.async def create_task_comment( self, task_id: str, comment_text: str, assignee: Optional[int] = None, notify_all: bool = True, ) -> Dict[str, Any]: """Create a comment on a task.""" payload: Dict[str, Any] = { "comment_text": comment_text, "notify_all": notify_all, } if assignee: payload["assignee"] = assignee data = await self._request( "POST", f"/task/{task_id}/comment", json=payload, ) return data