Dispatch workflow at exact ref
gh_run_workflow_exactDispatch a GitHub workflow only after verifying the exact workflow path, ref SHA, and no existing run; returns the run ID for authoritative confirmation.
Instructions
Destructive write: after ordinary write authorization, exact workflow-target policy, and the separate workflow-dispatch fine gate, dispatch exactly one positive workflow ID only when GitHub immediately re-verifies the caller's exact canonical workflow path and active state. The tool also verifies the exact branch/tag ref against expected_ref_sha, rejects same-name branch/tag ambiguity and an existing workflow_dispatch run for the workflow/head, accepts only a bounded typed input object, requests return_run_details, and binds authoritative readback to the exact returned run ID. It never redispatches automatically.
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>",
"workflow_id": "<workflow_id>",
"expected_workflow_path": "<expected_workflow_path>",
"ref": "<ref>",
"expected_ref_sha": "<expected_ref_sha>"
},
"name": "gh_run_workflow_exact"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | Yes | Exact ref path relative to refs/, as heads/<branch> or tags/<tag>. | |
| repo | Yes | GitHub repository name without the owner prefix. | |
| owner | Yes | GitHub repository owner or organization login. | |
| inputs | No | Optional workflow_dispatch input object with at most 25 string entries and at most 65,535 aggregate key/value characters. | |
| workflow_id | Yes | Exact positive GitHub workflow ID to dispatch. | |
| expected_ref_sha | Yes | Exact commit SHA the ref must resolve to before dispatch. | |
| expected_workflow_path | Yes | Exact canonical case-sensitive workflow path that the numeric workflow ID must identify immediately before dispatch. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | Yes | ||
| run_id | No | ||
| run_url | No | ||
| warning | No | ||
| run_event | No | ||
| request_id | No | ||
| run_status | No | ||
| workflow_id | Yes | ||
| run_head_sha | No | ||
| write_completed | Yes | ||
| expected_ref_sha | Yes | ||
| resolved_ref_sha | Yes | ||
| matching_run_count | No | ||
| readback_completed | Yes | ||
| precondition_checked | Yes | ||
| state_matches_requested | Yes |