Skip to main content
Glama

Run a workflow

run_workflow

Start a workflow run and wait up to 45 seconds for completion; returns final output or a run_id for checking status without resubmitting.

Instructions

Start a workflow run (one submit) and wait up to wait_seconds (≤ 45) for it to finish. Completed → the final output; still running → run_id: call check_workflow_run with it, never resubmit (a new run bills again). Each step is billed as an ordinary request. webhook_url gets ONE signed workflow.completed / workflow.failed delivery when the run ends. Get workflow_id and the inputs shape from list_workflows. Needs a Relay credential.

Input Schema

NameRequiredDescriptionDefault
inputsYesTemplate inputs, an object matching the workflow's input_schema.
webhook_urlNoHTTPS URL for one signed workflow.completed / workflow.failed delivery when the run ends.
workflow_idYesWorkflow template id from list_workflows, e.g. `script-voiceover`.
store_outputNoRun-level storage for every media step: `provider` (default, 1 h link) or `relay1d` / `relay7d` / `relay30d` (billed per file, see get_pricing).
wait_secondsNoSeconds to wait for it to finish (0–45, default 45); 0 returns the run_id at once.
idempotency_keyNoIdempotency-Key for the submit: the same key and inputs within 24 h return the same run_id instead of a new run. Generated when omitted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.8

TDQS

A4.8/5.0
Behavior5/5

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

With annotations only covering safety/openness flags, the description adds substantial behavioral context the annotations cannot: per-step billing ("each step is billed as an ordinary request"), the cost of a mistaken resubmit, the single signed webhook.completed / workflow.failed delivery, and the Relay credential requirement. These are exactly the cost- and side-effect facts an agent needs before invoking a billable, non-idempotent submit.

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 most decision-relevant facts (submit, wait, follow-up, billing) are front-loaded in two dense sentences with semicolons and no filler. It is slightly run-on and could be split, but essentially every clause carries information the agent needs.

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?

For a billable async submit with six parameters, nested inputs, and no output schema, the description covers the return dichotomy (final output vs. run_id), the follow-up path, idempotency-adjacent behavior, webhook semantics, credential prerequisites, and where to obtain inputs. Nothing needed to call it correctly is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; the description still adds cross-tool guidance the schema cannot supply, telling the agent that workflow_id and the inputs shape come from list_workflows, and framing wait_seconds as a wait budget rather than a bare integer. It adds modest but real semantic value on top of the well-documented schema.

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 first clause gives a specific verb + resource + scope ("Start a workflow run (one submit) and wait up to wait_seconds (≤ 45)"), which immediately distinguishes it from siblings like run_model (single model call) and check_workflow_run (status polling). An agent knows exactly what operation this is without opening the schema.

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

Usage Guidelines5/5

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

It explicitly routes the agent: if the run is still going, "call check_workflow_run with it, never resubmit (a new run bills again)", and it points to list_workflows for workflow_id and input shape. It names the alternative tool and the condition that selects it, plus the correct behavior on the negative outcome.

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