Skip to main content
Glama

update_task

Modify task properties such as title, description, status, priority, due date, and assignees in ClickUp MCP Server to maintain accurate and up-to-date task management for streamlined workflows.

Instructions

Update task properties

Input Schema

NameRequiredDescriptionDefault
assignees_addNoUser IDs to add as assignees
assignees_removeNoUser IDs to remove as assignees
descriptionNoNew description
due_dateNoNew due date
priorityNoNew priority
statusNoNew status
task_idYesTask ID
titleNoNew title

Input Schema (JSON Schema)

{ "properties": { "assignees_add": { "description": "User IDs to add as assignees", "items": { "type": "integer" }, "type": "array" }, "assignees_remove": { "description": "User IDs to remove as assignees", "items": { "type": "integer" }, "type": "array" }, "description": { "description": "New description", "type": "string" }, "due_date": { "description": "New due date", "type": "string" }, "priority": { "description": "New priority", "type": "integer" }, "status": { "description": "New status", "type": "string" }, "task_id": { "description": "Task ID", "type": "string" }, "title": { "description": "New title", "type": "string" } }, "required": [ "task_id" ], "type": "object" }

Implementation Reference

  • Main handler function for the 'update_task' MCP tool. Resolves task ID using _resolve_task_id, builds UpdateTaskRequest from parameters, calls client.update_task, and returns formatted success response.
    async def update_task( self, task_id: str, title: Optional[str] = None, description: Optional[str] = None, status: Optional[str] = None, priority: Optional[int] = None, due_date: Optional[str] = None, assignees_add: Optional[List[int]] = None, assignees_remove: Optional[List[int]] = None, **kwargs: Any, ) -> Dict[str, Any]: """Update task properties.""" try: # First resolve the task to get the internal ID resolved_task = await self._resolve_task_id(task_id) parsed_id = resolved_task.id except ClickUpAPIError as e: return {"error": f"Failed to resolve task '{task_id}': {e!s}"} update_request = UpdateTaskRequest() if title: update_request.name = title if description is not None: update_request.description = description if status: update_request.status = status if priority: update_request.priority = priority if due_date: dt = datetime.fromisoformat(due_date.replace("Z", "+00:00")) update_request.due_date = int(dt.timestamp() * 1000) update_request.due_date_time = True if assignees_add or assignees_remove: update_request.assignees = {} if assignees_add: update_request.assignees["add"] = assignees_add if assignees_remove: update_request.assignees["rem"] = assignees_remove task = await self.client.update_task(parsed_id, update_request) return { "id": task.id, "name": task.name, "status": task.status.status, "updated": True, }
  • Input schema definition for the 'update_task' tool, including parameters like task_id (required), title, description, status, priority, due_date, assignees_add/remove.
    Tool( name="update_task", description="Update task properties", inputSchema={ "type": "object", "properties": { "task_id": {"type": "string", "description": "Task ID"}, "title": {"type": "string", "description": "New title"}, "description": {"type": "string", "description": "New description"}, "status": {"type": "string", "description": "New status"}, "priority": {"type": "integer", "description": "New priority"}, "due_date": {"type": "string", "description": "New due date"}, "assignees_add": { "type": "array", "items": {"type": "integer"}, "description": "User IDs to add as assignees", }, "assignees_remove": { "type": "array", "items": {"type": "integer"}, "description": "User IDs to remove as assignees", }, }, "required": ["task_id"], }, ),
  • <In ClickUpTools.__init__\u003e Registration of 'update_task' handler in the internal _tools dictionary used by call_tool method.
    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, }
  • Underlying ClickUpClient method called by the tool handler to perform the actual API update request to ClickUp.
    async def update_task( self, task_id: str, updates: UpdateTaskRequest, ) -> Task: """Update a task.""" data = await self._request( "PUT", f"/task/{task_id}", json=updates.model_dump(exclude_none=True), ) return Task(**data)
  • Helper method _resolve_task_id used in update_task (and other tools) to smartly resolve various task ID formats to internal ClickUp task ID.
    async def _resolve_task_id(self, task_id: str, include_subtasks: bool = False) -> Task: """Smart task ID resolution that handles both internal and custom IDs.""" # Parse task ID to determine if it might be a custom ID parsed_id, custom_type = parse_task_id(task_id, self.client.config.id_patterns) # Try direct lookup first (works for both internal and custom IDs) try: return await self.client.get_task(parsed_id, include_subtasks=include_subtasks) except ClickUpAPIError as direct_error: # If it might be a custom ID, try with custom_task_ids=true if custom_type or "-" in parsed_id: try: team_id = ( self.client.config.default_team_id or self.client.config.default_workspace_id ) return await self.client.get_task( parsed_id, include_subtasks=include_subtasks, custom_task_ids=True, team_id=team_id, ) except ClickUpAPIError as custom_error: # If both fail, try search as final fallback try: tasks = await self.client.search_tasks(query=task_id) if not tasks: raise ClickUpAPIError(f"Task '{task_id}' not found") # Find exact match by custom_id or use first result for task in tasks: if hasattr(task, "custom_id") and task.custom_id == task_id: return task return tasks[0] except ClickUpAPIError: # Re-raise the most relevant error raise (custom_error if custom_type else direct_error) from None else: # Not a custom ID pattern, re-raise the original error raise direct_error

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