Finish agent run
finish_agent_runFinishes a Working agent run as Done or Failed. Returns true when the run was finished, false when it was no longer Working - a person cancelled it, so stop working on it. Requires canEdit on the issue.
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": {
"runId": "<runId>",
"state": "<state>"
},
"name": "finish_agent_run"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| runId | Yes | The run's id, from list_agent_runs. | |
| state | Yes | Done when the work is finished, Failed when the agent gave up. | |
| reason | No | Why the run failed, max 4096 characters - kept with a Failed run, ignored for Done. Omit for Done. |