← All MCP tools

Get next task

next_task
Write

What it does

Atomically pick AND claim the single highest-priority task ready for you to work — the queue's dequeue. Returns one task (already claimed and set to in_progress) or {task:null} when nothing is workable. Prefer this over list_my_tasks+claim_task in a fleet: it closes the race where two agents grab the same task between listing and claiming. Skips done/wont_do/pending_approval/plan_proposed tasks, tasks blocked by an unfinished dependency, paused tasks, and tasks another agent holds an active lease on. When {task:null}, the response includes a hidden breakdown (blocked/done/wont_do/pending_approval/plan_proposed/needs_input/paused/claimed_by_other counts) so you know whether to stop, go unblock something, or wait for a lease to lapse. There is no way to make this hand out a paused task: list_my_tasks({include_paused:true}) can show you one for reporting, but nothing claims one. Like list_my_tasks, this ranks across every workspace the account belongs to unless you pass workspace_id (from list_workspaces).

Parameters

NameTypeRequiredDescription
agentstringOptional

Your agent/model id (e.g. "ChatGPT", "Claude", or a worker name). Used for the claim lease so a fleet doesn't double-book.

notestringOptional

Optional note posted to the task's activity when claimed.

  • Up to 20000 characters
workspace_idstringOptional

Only tasks in this workspace. Optional — omitted, the queue spans every workspace this account belongs to, so an account that shares work with other people gets their workspaces' Claude tasks too. Ids come from list_workspaces.

Annotations

The hints the server sends with this tool. A host reads them to decide whether to ask you before a call.

Read-onlyreadOnlyHint: false
Changes data in your Done account.
DestructivedestructiveHint: false
Only adds or reads; nothing already there is removed or overwritten.
IdempotentidempotentHint: false
Each call can add something new, such as a comment, a run or a task.
Open worldopenWorldHint: false
Touches only your own Done account.

Which tokens can call it

A connection made with OAuth has full access. A token from Settings → Agent access → Extra MCP tokens can be narrowed, and a narrowed token never sees beyond its project or workspace.

  • Full accessAllowed
  • Read-only tokenRefused
  • Single-project tokenAllowed
  • Single-workspace tokenAllowed

Try it

With Done connected, ask your assistant something like:

“Take your next task from Done and start on it.”

Connect Done to your assistant

One MCP endpoint per account, over OAuth or a token. Step-by-step setup for each client:

MCP setup overview →