get_user_assigned_tasks
Retrieve tasks assigned to a specific user, including open and closed tasks, to manage workload and track progress efficiently. Integrates with the Goodday platform for streamlined task management.
Instructions
Get tasks assigned to a specific user.
Args: user_id: The ID of the user closed: Set to true to retrieve all open and closed tasks
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| closed | No | ||
| user_id | Yes |
Implementation Reference
- goodday_mcp/main.py:426-453 (handler)The main handler function for the 'get_user_assigned_tasks' tool. It fetches tasks assigned to a user from the Goodday API using the endpoint 'user/{user_id}/assigned-tasks', optionally including closed tasks, formats them using format_task, and returns a formatted string.async def get_user_assigned_tasks(user_id: str, closed: bool = False) -> str: """Get tasks assigned to a specific user. Args: user_id: The ID of the user closed: Set to true to retrieve all open and closed tasks """ params = [] if closed: params.append("closed=true") endpoint = f"user/{user_id}/assigned-tasks" if params: endpoint += "?" + "&".join(params) data = await make_goodday_request(endpoint) if not data: return "No assigned tasks found." if isinstance(data, dict) and "error" in data: return f"Unable to fetch assigned tasks: {data.get('error', 'Unknown error')}" if not isinstance(data, list): return f"Unexpected response format: {str(data)}" tasks = [format_task(task) for task in data] return "\n---\n".join(tasks)