add_task
Add a task with automatic routing to the best workflow and assignment by role. Override with explicit workflow, assignee, or priority as needed.
Instructions
Add a task — autonomous by default. Just pass a title and the server will (a) auto-ROUTE the task to the workflow it best fits (matched from the task text against workflow names/descriptions), falling back to the workspace's "General" workflow when no workflow clearly relates, and (b) auto-ASSIGN it to the right team member(s) by role/default. Every task belongs to a workflow — there is no workspace-level task. The caller does NOT need to choose a workflow or assignee. Provide an explicit workflowId/workflowName and/or assigneeIds ONLY to override that decision (the user has already decided) — explicit values are used verbatim and skip auto-routing/auto-assignment for whatever was specified. Set autoRoute:false to skip AI routing and place the task directly in the "General" workflow. Tasks are stored as DB tasks under the chosen workflow by default; only legacy workflows that still have a file-backed project library store the task as a phase file tagged "task".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | Task title — short, actionable description. | |
| dueDate | No | Optional due date — a calendar date "YYYY-MM-DD" or a full ISO 8601 datetime. Once set, the task surfaces in due-soon / overdue nudges. | |
| priority | No | Task priority — high, medium, or low. AI agents should set this based on urgency and importance. | |
| autoRoute | No | When true (the default) and no workflow is given, the task is auto-routed to the best-fit workflow, falling back to the workspace's "General" workflow if none relates. Set false to skip AI routing and place it directly in the "General" workflow. Ignored when an explicit workflowId/workflowName is provided. | |
| assignedTo | No | User ID to assign the task to. Overrides the workflow default assignee when provided. | |
| autoAssign | No | When true (the default) and no explicit assignee is given, the task is auto-assigned to the team member(s) whose job role best fits it. Set false to leave it unassigned. | |
| workflowId | No | Exact workflow ID. Use this when you already know the ID. | |
| assigneeIds | No | User IDs to assign this task to as a SHARED task that any one of them can complete (max 5). Only assign multiple people when the task genuinely needs more than one owner — do not blanket-assign. Prefer one assignee unless the task spans several roles. | |
| description | No | Optional longer description or context for the task. | |
| phaseFileId | No | Legacy: phase file ID to link this task to, for workflows still using a file-backed project library. New workflows use DB-backed phases (add_phase) and do not need this. | |
| workspaceId | No | Workspace ID. Defaults to your configured workspace. | |
| workflowName | No | Workflow name or partial name. Used to look up the workflow when you don't know the ID. If multiple workflows match, candidates are returned so the user can pick. |