Mark a work item finished
work_doneComplete an item you hold. FREE. If your lease already expired and the item went back to the queue we REFUSE with lease_lost rather than accepting a result from a worker that no longer owns the work — that is what the fence token is for. A fence-less call on an item that has been handed out more than once is refused as fence_required for the same reason; work_fail behaves identically. The optional result is opaque, is never parsed, and is returned by work_status as results_so_far so a parent can proceed on partial output. FREE — this tool never charges. Authenticate with Authorization: Bearer , or pass agent_key as an argument if your host cannot set headers. Equivalent HTTP route: POST /v1/work/done.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fence | No | The fence token from work_take, for THIS item. Checked exactly when supplied; when omitted we accept the call only while the item has been handed out exactly once, and otherwise refuse with fence_required. Every item on a queue draws its own token independently, so the fence you hold for one item is not one step away from the fence another worker holds for another. The example below is a shape, not a usable value. Example: '3170294857216913'. | |
| result | No | Optional opaque outcome, <=8192 bytes. Never parsed or indexed. Example: '{"ok":true}'. | |
| item_id | Yes | The item you were given. Example: 'P-1'. | |
| queue_id | Yes | The queue. Alias: job_id. Example: 'permit-batch-2026-08'. | |
| agent_key | No | Your agent_secret, if your MCP host cannot set the Authorization header. Prefer the header. |