Skip to main content
Glama
Fwmouomu
by Fwmouomu

debug_failure

Run a Maestro flow and, when it fails, collect screens, logs, and UI elements to attribute the fault, returning a JSON and HTML diagnostic bundle.

Instructions

Run a flow and, when it fails, gather the evidence needed to attribute the fault.

Collects the screen before the run, Maestro's own capture at the moment of failure, the screen after, the focused window, the relevant slice of logcat, and the elements present at failure — then applies an attribution heuristic and writes a JSON plus HTML bundle.

Returns diagnosed: false when the flow passes, because there is nothing to diagnose and inventing an analysis would be noise.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
envNoMaestro -e variables for the flow.
flowYesMaestro flow file to run and diagnose.
deviceNoDevice serial. Omit to take any single free device.
packageNoApp package to narrow logcat to, for example com.example.app. Omit to read the whole buffer.
timeoutNoFlow timeout in seconds.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it enumerates the artifacts collected (before/after screens, Maestro capture, focused window, logcat slice, elements at failure), discloses that an attribution heuristic runs, that a JSON plus HTML bundle is written, and the notable behavior of returning diagnosed: false on pass. It does not mention auth/permission needs or rate limits, so not a 5.

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, then the evidence list and the pass-case return behavior. The final sentence about diagnosed: false is arguably long-winded but it conveys a genuinely non-obvious behavior, so it earns its place.

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?

There is no output schema, so the description must explain returns — and it does highlight the diagnosed: false case, though it doesn't describe the success-path bundle structure or the shape of the attribution result. For a 5-parameter, side-effecting diagnostic tool with no annotations, that remaining gap keeps it at 4.

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 (env, flow, device, package, timeout) is already documented in the schema. The description adds no format or syntax detail beyond that, so the baseline of 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?

The description states a specific verb and resource: run a flow and, on failure, gather evidence to attribute fault. It clearly distinguishes itself from a simple assertion runner by emphasizing diagnosis and artifact production. It doesn't explicitly name the sibling tools it competes with (e.g. run_and_assert, run_parallel), so it stops short of a 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?

Usage is implied — reach for this when you want post-failure diagnosis — but there is no explicit 'use X instead when Y' guidance against run_and_assert, run_parallel, or explore_and_record. An agent can infer the context but is left to reason about alternatives on its own.

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