Skip to main content
Glama
Fwmouomu
by Fwmouomu

run_and_assert

Run a Maestro flow on a device, then assert the resulting screen state. Skips assertions when the flow fails so the original failure stays clear.

Instructions

Run a Maestro flow, then check assertions against the screen it left behind.

The flow's own result is always reported, even when assertions cannot run. Assertions are skipped entirely when the flow failed, because checking expectations after a known-broken run produces a second, noisier failure that buries the first one.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
envNoMaestro -e variables for the flow.
flowYesMaestro flow file to run.
deviceNoDevice serial. Omit to take any single free device from the pool.
timeoutNoFlow timeout in seconds.
assertionsYesExpectations checked against the screen once the flow finishes.
screenshotNoCapture the resulting screen as evidence.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It does disclose genuinely non-obvious behavior: the flow result is always reported and assertions are deliberately skipped after a failed flow. However, it says nothing about device allocation/side effects of running a flow on a pooled device, nor what the result payload looks like.

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?

Front-loaded with the core action, followed by two short sentences that justify the skipping behavior. Efficient overall, though the final causal clause is slightly more verbose than strictly needed.

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

Completeness3/5

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

For a flow-executor/asserter with no output schema and no annotations, the description covers failure semantics but omits return shape and device-pool side effects. The rich input schema compensates on the input side, leaving a moderate output/behavior gap.

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 including the nested ElementAssertion fields is already documented. The description adds no parameter-level meaning (e.g., how 'flow' paths resolve or how 'device' interacts with the pool), so the baseline 3 applies.

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

Purpose4/5

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

States a specific verb and resource: 'Run a Maestro flow, then check assertions against the screen it left behind.' This clearly distinguishes it from a plain runner, and the assertion-on-final-screen framing hints at separation from assert_visual. It stops short of explicitly naming which sibling to prefer, so it lands at 4 rather than 5.

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

Usage Guidelines3/5

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

The description explains the conditional behavior rule (assertions skipped when the flow failed) but never states when to choose this tool over run_parallel, assert_visual, or debug_failure. Usage must be inferred from the action itself.

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