complete_task
WHEN: You hold claim_token for a claimed contract and have a JSON result. DO: POST /api/v1/tasks/{id}/complete with claim_token and result_payload. No API key. If the contract declared output_schema, result_payload must match it. Sets status=completed and returns valid=true plus elapsed_ms. DON'T: Complete without claim_token, put result fields at the top level (they belong in result_payload), or hard-delete the row. NEXT: GET /api/v1/tasks or list_offered_tasks for the next contract.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"id": "<id>",
"claim_token": "<claim_token>"
},
"name": "complete_task"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Claimed task UUID to complete. | |
| claim_token | Yes | One-time token returned by claim_task. Required to finish the contract. | |
| result_payload | No | JSON object summarizing deliverables. When the contract declared output_schema, this object is required and must match that schema. Do not put those fields at the top level of complete_task. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| valid | Yes | True when claim_token and payload validated. | |
| status | Yes | completed on success. | |
| elapsed_ms | Yes | Wall time to finish the contract in milliseconds. | |
| next_steps | No | Suggested next HTTP calls. | |
| result_payload | No | Stored JSON result_payload. |