run_workflow
What it does
Executes a workflow template, threading outputs between steps via dot-path references (input.X, previous.X, item.X). Returns a per-step log plus the final aggregated output.
Workflows respect a soft 25-second budget per Cloudflare request; long runs that hit the budget return status: "partial" with a resume cursor (cron continuation is partially shipped — see Limitations).
Input schema
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| template | string | required | — |
Template key from list_workflow_templates. |
| input | object | optional | {} |
Top-level input bag — referenced from steps as input.<key>. Shape depends on the template. |
| dry_run | boolean | optional | false |
Validate and resolve args without invoking tools. Returns the planned step list. |
Example call
json{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "run_workflow", "arguments": { "template": "ads_pipeline", "input": { "video_url": "https://veo.example/cdn/v3.mp4", "title": "Coffee morning v3", "brand": "CorpoSostenibile" } } } }
Response shape
json{ "ok": true, "template": "ads_pipeline", "execution_id": "exec_4f2a...", "started_at": 1716301200, "completed_at": 1716301223, "duration_sec": 23, "status": "success", "abort_reason": null, "resume_cursor": null, "steps": [ { "step": 1, "tool": "upload_video", "status": "success", "duration_ms": 5400, "result": { } }, { "step": 2, "tool": "analyze_video", "status": "success", "duration_ms": 8900 }, { "step": 3, "tool": "compliance_scan", "status": "success", "duration_ms": 4100 } ], "final_output": { "ok": true, "id": "c_abc123", "new_stato": "Attesa Approvazione" } }
Usage from Claude Desktop
prompt"Run the ads_pipeline workflow on this Veo URL: https://veo.example/cdn/v3.mp4 — title 'Coffee morning v3', brand CorpoSostenibile."
Usage from Python
pythonimport requests LUMIQA = "https://lumiqa.io/mcp/your-slug" HEADERS = {"Authorization": "Bearer lk_live_xxxxxxxxxxxx"} r = requests.post(LUMIQA, headers=HEADERS, json={ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "run_workflow", "arguments": {"template": "ads_pipeline", "input": {"video_url": "https://...", "title": "v3"}} }, }) print(r.json())
Usage from Node
javascriptconst r = await fetch("https://lumiqa.io/mcp/your-slug", { method: "POST", headers: { "Authorization": "Bearer lk_live_xxxxxxxxxxxx", "Content-Type": "application/json", }, body: JSON.stringify({ jsonrpc: "2.0", id: 1, method: "tools/call", params: { name: "run_workflow", arguments: { template: "ads_pipeline", input: { video_url: "https://...", title: "v3" } }, }, }), }); const data = await r.json(); console.log(data);
Required env vars / integrations
- Inherits the secrets of every tool the template calls (e.g.
ANTHROPIC_API_KEY+OPENAI_API_KEYforads_pipeline). - D1 table
workflow_executionsis written best-effort — missing table doesn't break a run.
Known limitations
- 25-second soft budget per request. Long workflows return
status: "partial"with aresume_cursor; the cron continuation worker is shipped partially — budget-aware retries are on the v1.1 roadmap. _for_eachiterations are capped at 50 per run; bigger fan-outs need a paginated template.on_error: "abort"(default) halts the workflow;continueswallows the error and moves on.dry_run: truereturns resolved args without invoking any tool — useful for plan inspection.