Skip to main content
Glama

assign_task

Assign users to tasks in ClickUp by specifying task IDs and user IDs to manage team responsibilities and project workflows.

Instructions

Assign users to a task

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYesTask ID
user_idsYesUser IDs to assign

Implementation Reference

  • The primary handler for the 'assign_task' MCP tool. Resolves flexible task_id formats, updates assignees via ClickUp API, handles errors, and returns formatted response.
    async def assign_task(self, task_id: str, user_ids: List[int]) -> Dict[str, Any]: """Assign users to task.""" try: # First resolve the task to get the internal ID resolved_task = await self._resolve_task_id(task_id) update_request = UpdateTaskRequest(assignees={"add": user_ids}) task = await self.client.update_task(resolved_task.id, update_request) except ClickUpAPIError as e: return {"error": f"Failed to assign users to task '{task_id}': {e!s}"} return { "task_id": task.id, "assignees": [u.username for u in task.assignees], "updated": True, }
  • JSON schema defining the input parameters and validation for the assign_task tool.
    Tool( name="assign_task", description="Assign users to a task", inputSchema={ "type": "object", "properties": { "task_id": {"type": "string", "description": "Task ID"}, "user_ids": { "type": "array", "items": {"type": "integer"}, "description": "User IDs to assign", }, }, "required": ["task_id", "user_ids"], }, ),
  • Maps the 'assign_task' tool name to its handler function in the internal dispatch dictionary used by call_tool().
    "get_assignees": self.get_assignees, "assign_task": self.assign_task, "list_spaces": self.list_spaces,
  • MCP server handler that exposes the assign_task tool schema (via get_tool_definitions()) to clients.
    @self.server.list_tools() async def list_tools() -> List[Tool]: """List all available tools.""" return self.tools.get_tool_definitions()

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