Cancel a workflow run
cancel_workflow_runCancel a pending or running Actions workflow run by owner, repo, and run_id; then inspect the returned status to confirm whether it was cancelled.
Instructions
Cancel a pending or running Actions workflow run (owner/repo/run_id; requires write mode), on Forgejo 16+ or Gitea. Answers with the run as it now stands, in list_workflow_runs' shape — read the outcome from its status. Forgejo accepts a run that had already finished and leaves it as it was, so the returned status is what says whether anything was cancelled; Gitea may refuse one instead.
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": {
"owner": "<owner>",
"repo": "<repo>",
"run_id": "<run_id>"
},
"name": "cancel_workflow_run"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository name. | |
| owner | Yes | Repository owner — user or organization. | |
| run_id | Yes | Workflow run id (the `id` field from `list_workflow_runs`). |