add_assignee
Assign a user to a task without removing other assignees. Checks if already assigned, avoids disrupting active timers, and rejects non-members.
Instructions
Assign a user to a task WITHOUT disturbing anyone already assigned. task_assignments holds one row per (task_id, user_id) — POST /api/tasks/:id/assignments upserts exactly that one row and leaves every other assignee alone, unlike update_task's assignee_user_id (which REPLACES the whole set — use that only when you actually want a single owner). This is the fix for the defect where a second MCP assignment silently dropped the first.
Idempotent and is_active-safe: this checks the task's current assignees first, and if the user already holds a row (assigned OR actively working) it does nothing and says so, rather than re-POSTing. That matters because the REST endpoint's upsert OVERWRITES is_active on conflict — a blind re-assign of someone with a running timer (is_active=1, set by start_working) would silently stop their clock. Skipping the no-op re-POST is what keeps assignment and active-work presence independent.
Rejects a user who is not a member of this account (404, surfaced as an error) rather than creating a dangling assignment.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | Yes | The ID of the task to assign the user to. | |
| user_id | Yes | User ID to add as an assignee. Must be a member of the same account. |