Skip to main content
Glama

flow_run

Run a flow — a recorded, editable JSON browser-session script — deterministically, with zero model tokens. Steps are {op, args, expect?, save?}: ops cover navigate/click/click_xy/input/scroll/eval/wait/screenshot/state/cookies; {{var}} placeholders in args are filled from vars; expect asserts (url_contains | selector | text_contains | eval_truthy) abort with evidence on failure; save collects a step's output into the receipt. Source the flow inline via "flow", or by "name" from the server's workflow//flow.json (unknown name → error lists installed workflows). Pass session_id to reuse a live session (e.g. from import_curl) so login state and flows compose. The receipt carries status ok/failed, saved outputs, the session_id (kept alive), and on failure the failing step, reason and a diagnostic screenshot — fix the flow or take the session over from there.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
flowNoInline flow document: {create?, vars?, steps:[{op, args, expect?, save?}]}
nameNoOr run a server-side workflow/<name>/flow.json asset. An unknown name errors back with the list of installed workflows — that error is the discovery call.
varsNoValues for {{placeholders}} in step args; wins over the flow's own vars defaults.
max_stepsNoOverride the run's step-execution budget (branch loops re-run steps, so every revisit counts). Default 1000, clamped 1..=100000. A flow document may also declare its own max_steps; this wins.
session_idNoReuse a live session (e.g. from import_curl) instead of creating a fresh one — that's how login state and flows compose.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / max_steps
      Added value: +{
      +  "default": null,
      +  "description": "Override the run's step-execution budget (branch loops re-run steps,\nso every revisit counts). Default 1000, clamped 1..=100000. A flow\ndocument may also declare its own max_steps; this wins.",
      +  "format": "uint64",
      +  "minimum": 0,
      +  "type": [
      +    "integer",
      +    "null"
      +  ]
      +}
  2. Changed1 schema field changed
    • removedInput schema / title
      Removed value: -"FlowRunParams"
  3. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations provide only a title, so the description carries the full behavioral burden. It discloses that execution is deterministic and uses zero model tokens, that expect assertions abort with evidence on failure, that save collects step output into the receipt, and that on failure a diagnostic screenshot is included. It also mentions session_id is kept alive after the run, implying side effects on session state. This is rich, honest disclosure of execution behavior and failure modes, though it doesn't detail permission needs or reversibility, which are less relevant for a sandboxed browser script.

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 is a single dense paragraph but front-loads the core concept, then expands into operational details. Every sentence serves a purpose: defining the script shape, ops, placeholders, expect/save semantics, sourcing options, session reuse, and receipt behavior. It avoids filler, though it could be slightly better structured with bullet points for ops or expectations. As is, it is efficient and scannable.

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

Completeness4/5

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

For a tool of this complexity (5 optional params, no output schema), the description covers the critical usage aspects: how to provide a flow, how to name it, how placeholders and vars work, how assertions and saving behave, and what the receipt contains on both success and failure. It also explains the session_id reuse mechanism. The only minor missing piece is an explicit list of supported 'op' values, though the description enumerates them inline (navigate/click/click_xy/etc.), so it is adequately complete for an agent to understand what it can do.

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?

Schema coverage is 100%, so a baseline 3 applies, but the description adds substantial meaning beyond the schema. It explains how 'flow' and 'name' are alternatives, what happens on unknown names, how 'vars' overrides defaults, and how 'max_steps' interacts with branch loops and document-level declarations. The schema descriptors are terse; the description resolves their operational intent (e.g., 'max_steps' becomes a budget with branch re-counting). This goes well beyond the raw JSON 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 description opens with 'Run a flow — a recorded, editable JSON browser-session script — deterministically, with zero model tokens.' This gives a precise verb (run), a specific resource (flow) and its characterization. It also distinguishes itself from sibling session_* tools by framing flows as composed scripts, not single operations. The explanation of ops, placeholders, and expect/save further clarifies what the tool does.

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 explains how to source flows (inline via 'flow' or by 'name' from server assets) and explicitly recommends passing session_id to reuse a live session (e.g., from import_curl) so login state and flows compose. It also states that an unknown name errors with a list of installed workflows — turning an error into a discovery call. While it doesn't explicitly say 'when not to use this versus session_* tools', the composition and determinism cues imply it is for scripted multi-step runs, which is enough context.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.