set_thread_result
Store a task's structured JSON result in its thread, notify waiters, and let requesters read the output; calls are fenced by the claim lease to reject stale work.
Instructions
Attach a task's structured result (arbitrary JSON). Upserts one result per thread and notifies waiters via a thread_result_set event. Use when finishing a task so a requester or parent can read the output. Fenced by your claim: pass claim_lease_id from the claim response; if the lease lapsed and someone else took the thread (or it was released), the call is refused (claim_lost) and nothing is stored, so stop the work. When the server sets MAIDAN_CHANGE_REFUSE_WORKFLOW_PATHS (its GitHub token cannot push workflow files), a maidan.change.result/1 with status changed, a github_branch target and a diff touching .github/workflows/ is refused with invalid params naming the files and nothing is stored: drop the workflow edit and set the result again.
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": {
"thread_id": "<thread_id>",
"result": "<result>",
"claim_lease_id": "<claim_lease_id>"
},
"name": "set_thread_result"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes | structured JSON result payload (an object) | |
| thread_id | Yes | ||
| claim_lease_id | Yes | the fencing token from the claim response's thread.claim_lease_id |