Skip to main content
Glama

Dispatch a workflow

dispatch_workflow

Triggers a Forgejo or Gitea Actions workflow via workflow_dispatch using owner, repo, workflow file, and ref, with optional inputs; requires write access.

Instructions

Trigger an Actions workflow via workflow_dispatch (owner/repo/workflow/ref, optional inputs; requires write mode), on Forgejo or Gitea. workflow is the file name, e.g. ci.yml — discover it by reading .forgejo/workflows, .gitea/workflows or .github/workflows with get_file_contents. The workflow must declare an on: workflow_dispatch trigger. Forgejo returns the created run; Gitea returns only an acknowledgement, so find the run with list_workflow_runs.

Input Schema

NameRequiredDescriptionDefault
refYesGit ref to run on — a branch or tag, e.g. `main`.
repoYesRepository name.
ownerYesRepository owner.
inputsNoOptional `workflow_dispatch` inputs (key/value), matching the workflow's `inputs:`.
workflowYesWorkflow file name as it appears in `.forgejo/workflows/`, `.gitea/workflows/` or `.github/workflows/`, e.g. `ci.yml`. This server exposes no list-workflows tool (Forgejo has no such endpoint) — read the directory with `get_file_contents` if you don't know the name. The workflow must declare an `on: workflow_dispatch` trigger.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.22.0

TDQS

A4.4/5.0
Behavior5/5

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

Adds real information beyond the annotations: an auth/permission requirement (write mode), a precondition on the workflow file itself, and divergent return behavior per host (Forgejo returns the created run, Gitea returns only an acknowledgement). Annotations only cover write/idempotency hints, which this description supplements rather than repeats.

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?

Dense but front-loaded: trigger, addressing, precondition, discovery path, then return behavior. A few clauses duplicate the schema's `workflow` description, which is minor waste but not padding.

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?

With no output schema, the description correctly fills the gap by explaining what each host returns and how to locate the run afterwards via list_workflow_runs. Nothing an agent needs to invoke this correctly is missing.

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

Parameters3/5

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

Schema description coverage is 100%, so every parameter is already documented. The description's note that `workflow` is a file name and where to find it largely restates the schema's own text, adding little beyond the baseline.

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?

States a specific verb and resource ('Trigger an Actions workflow via workflow_dispatch') plus the exact addressing tuple (owner/repo/workflow/ref). Clearly separates it from siblings like rerun_workflow by tying it to a fresh workflow_dispatch trigger rather than an existing run.

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?

Gives concrete preconditions ('requires write mode', 'must declare an on: workflow_dispatch trigger') and routes the agent to get_file_contents when the workflow name is unknown. It stops short of explicitly contrasting with rerun_workflow or cancel_workflow_run, which the sibling list makes relevant.

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