Skip to main content
Glama

Dispatch workflow at exact ref

gh_run_workflow_exact
Destructive

Dispatch 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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refYesExact ref path relative to refs/, as heads/<branch> or tags/<tag>.
repoYesGitHub repository name without the owner prefix.
ownerYesGitHub repository owner or organization login.
inputsNoOptional workflow_dispatch input object with at most 25 string entries and at most 65,535 aggregate key/value characters.
workflow_idYesExact positive GitHub workflow ID to dispatch.
expected_ref_shaYesExact commit SHA the ref must resolve to before dispatch.
expected_workflow_pathYesExact canonical case-sensitive workflow path that the numeric workflow ID must identify immediately before dispatch.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
refYes
run_idNo
run_urlNo
warningNo
run_eventNo
request_idNo
run_statusNo
workflow_idYes
run_head_shaNo
write_completedYes
expected_ref_shaYes
resolved_ref_shaYes
matching_run_countNo
readback_completedYes
precondition_checkedYes
state_matches_requestedYes
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The annotations already say destructive and non-readonly, but the description goes much further: it discloses active-state verification, expected_ref_sha binding, branch/tag ambiguity rejection, existing-run rejection, bounded input enforcement, request of return_run_details, and no automatic re-dispatch. This is substantial extra behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description front-loads the critical 'Destructive write' warning and wastes no words on filler. However, it is a dense run-on sentence with repeated policy terminology, so slightly more structured formatting could improve scannability without sacrificing the important safety caveats.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity and safety-sensitive nature, the description is exceptionally thorough: it covers the exact authorization context, validation checks, duplicate-run rejection, input bounds, and idempotency behavior. Since an output schema exists, the description does not need to enumerate return fields.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Although the schema fully documents each parameter, the description adds meaningful relational constraints: expected_workflow_path must match workflow_id, expected_ref_sha must match ref, inputs must be bounded, and duplicate runs are rejected. This clarifies why the mandatory parameters exist together and how the tool's guarantees are achieved.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names the concrete action: 'dispatch exactly one positive workflow ID' at a verified ref, with the word 'exact' repeated throughout to make the tool's specialty unmistakable. It also distinguishes this mutating dispatch tool from the many read-only workflow inspection siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear context for when this dangerous action is allowed: after authorization gates, exact-path verification, ref SHA matching, and duplicate-run rejection. It does not explicitly name alternatives or exclusions, but the sibling list contains no other workflow-dispatch tool, so the usage context is reasonably clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/fvanevski/gh_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server