Skip to main content
Glama

create_task_comment

Add comments to tasks in ClickUp, providing context, updates, or instructions. Specify task ID, comment text, and optional assignee, with notifications to all assignees by default.

Instructions

Create a comment on a task

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assigneeNoUser ID to assign (optional)
comment_textYesComment text
notify_allNoNotify all assignees (default: true)
task_idYesTask ID

Implementation Reference

  • MCP tool handler: resolves the task ID intelligently and calls the ClickUp client to create the comment, handles errors.
    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, }
  • Input schema and Tool definition for create_task_comment.
    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"], }, ),
  • Tool registration: maps 'create_task_comment' to the handler method in the _tools dictionary used by call_tool.
    self._tools: Dict[str, Callable] = { "create_task": self.create_task, "get_task": self.get_task, "update_task": self.update_task, "delete_task": self.delete_task, "list_tasks": self.list_tasks, "search_tasks": self.search_tasks, "get_subtasks": self.get_subtasks, "get_task_comments": self.get_task_comments, "create_task_comment": self.create_task_comment, "get_task_status": self.get_task_status, "update_task_status": self.update_task_status, "get_assignees": self.get_assignees, "assign_task": self.assign_task, "list_spaces": self.list_spaces, "list_folders": self.list_folders, "list_lists": self.list_lists, "find_list_by_name": self.find_list_by_name, # Bulk operations "bulk_update_tasks": self.bulk_update_tasks, "bulk_move_tasks": self.bulk_move_tasks, # Time tracking "get_time_tracked": self.get_time_tracked, "log_time": self.log_time, # Templates "create_task_from_template": self.create_task_from_template, "create_task_chain": self.create_task_chain, # Analytics "get_team_workload": self.get_team_workload, "get_task_analytics": self.get_task_analytics, # User management "list_users": self.list_users, "get_current_user": self.get_current_user, "find_user_by_name": self.find_user_by_name, }
  • ClickUpClient helper method: makes the actual API POST request to create the 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

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/DiversioTeam/clickup-mcp'

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