Skip to main content
Glama

Robot Actions — Remote Device Control

flow_recording_replace_step

Replace one step of an in-progress recording (before flow_recording_save) with a freshly-captured action, without changing its position. Performs the action live on the device — same as flow_recording_action — then overwrites the step at stepIndex instead of appending. Use this to fix a mis-recorded step (wrong element bound, wrong action) in place rather than deleting + re-recording + reordering. Replacing the appLaunch step (index 1) is rejected. Accepts the same action params as flow_recording_action.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xNoX coordinate (tap/doubleTap/longPress/swipe start; assert & scrollToElement target element)
yNoY coordinate (tap/doubleTap/longPress/swipe start; assert & scrollToElement target element)
toXNoSwipe end X
toYNoSwipe end Y
textNoText to type (sendKeys)
appIdNoApp to launch for an appLaunch step: Android package name, iOS bundle id. Required when action=appLaunch.
actionYesAction type
waitMsNoWait duration ms (for wait action)
keyCodeNoAndroid keycode (keyPress, e.g. 3=HOME, 4=BACK)
keyNameNoHardware button name for pressButton (e.g. 'home', 'volumeUp', 'volumeDown', 'lock'). Required when action=pressButton.
expectedNoExpected value (required for textEquals and textContains assertions).
optionalNoMark this step as one whose target is EXPECTED to be absent sometimes — a cookie banner, a first-run tutorial, an occasional interstitial. When the element cannot be found at replay the step is SKIPPED instead of failing, and no gesture is dispatched at the recorded position. Leave it off for anything whose absence is a bug: a step that is NOT optional now FAILS the replay when its element is missing, which is what tells a real regression apart from a banner that simply did not appear this run.
attributeNoAttribute to read for text assertions. iOS: label, value, name. Android: text, content-desc, resource-id. Defaults to the platform primary text attribute when omitted.
stepIndexYes1-based index of the step to replace
assertTypeNoAssertion type (required when action=assert). exists/notExists check element presence; textEquals/textContains compare an attribute value; visualMatch compares the whole screen against the screenshot captured now (takes no x/y and no expected).
durationMsNoSwipe/longPress duration ms (default 300)
appActivityNoOptional Android activity to launch with appId. Ignored on iOS.
recordingIdYesRecording ID from flow_recording_start
visionFallbackNoLet a vision model settle this assertion when the accessibility tree cannot find the element. Off by default, and only honoured for assertType 'exists' and 'notExists'. Turn it on for UI the tree cannot describe — canvas/WebGL screens, game engines, image-only controls with their text baked into the bitmap — where 'a person can see it' is the only check available. Leave it off for ordinary native UI: an assertion's value is that it reports what is really there, and a model asked to find something tends to find it. Ignored for text assertions, which compare exact strings that OCR cannot supply reliably.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changed
    • changedInput schema / properties / action / description
      Previous value: -"Action type to record in place of the existing step"New value: +"Action type"
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "tap",
      -  "doubleTap",
      -  "longPress",
      -  "swipe",
      -  "sendKeys",
      -  "keyPress",
      -  "wait",
      -  "assert",
      -  "pressButton"
      -]New value: +[
      +  "tap",
      +  "doubleTap",
      +  "longPress",
      +  "swipe",
      +  "sendKeys",
      +  "keyPress",
      +  "wait",
      +  "assert",
      +  "pressButton",
      +  "scrollToElement",
      +  "appLaunch"
      +]
    • addedInput schema / properties / appActivity
      Added value: +{
      +  "description": "Optional Android activity to launch with appId. Ignored on iOS.",
      +  "type": "string"
      +}
    • addedInput schema / properties / appId
      Added value: +{
      +  "description": "App to launch for an appLaunch step: Android package name, iOS bundle id. Required when action=appLaunch.",
      +  "type": "string"
      +}
    • changedInput schema / properties / assertType / description
      Previous value: -"Assertion type (required when action=assert)."New value: +"Assertion type (required when action=assert). exists/notExists check element presence; textEquals/textContains compare an attribute value; visualMatch compares the whole screen against the screenshot captured now (takes no x/y and no expected)."
    • changedInput schema / properties / assertType / enum
      Previous value: -[
      -  "exists",
      -  "notExists",
      -  "textEquals",
      -  "textContains"
      -]New value: +[
      +  "exists",
      +  "notExists",
      +  "textEquals",
      +  "textContains",
      +  "visualMatch"
      +]
    • changedInput schema / properties / attribute / description
      Previous value: -"Attribute to read for text assertions. iOS: label, value, name. Android: text, content-desc, resource-id."New value: +"Attribute to read for text assertions. iOS: label, value, name. Android: text, content-desc, resource-id. Defaults to the platform primary text attribute when omitted."
    • changedInput schema / properties / keyName / description
      Previous value: -"Hardware button name for pressButton. Required when action=pressButton."New value: +"Hardware button name for pressButton (e.g. 'home', 'volumeUp', 'volumeDown', 'lock'). Required when action=pressButton."
    • addedInput schema / properties / optional
      Added value: +{
      +  "description": "Mark this step as one whose target is EXPECTED to be absent sometimes — a cookie banner, a first-run tutorial, an occasional interstitial. When the element cannot be found at replay the step is SKIPPED instead of failing, and no gesture is dispatched at the recorded position. Leave it off for anything whose absence is a bug: a step that is NOT optional now FAILS the replay when its element is missing, which is what tells a real regression apart from a banner that simply did not appear this run.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / visionFallback
      Added value: +{
      +  "description": "Let a vision model settle this assertion when the accessibility tree cannot find the element. Off by default, and only honoured for assertType 'exists' and 'notExists'. Turn it on for UI the tree cannot describe — canvas/WebGL screens, game engines, image-only controls with their text baked into the bitmap — where 'a person can see it' is the only check available. Leave it off for ordinary native UI: an assertion's value is that it reports what is really there, and a model asked to find something tends to find it. Ignored for text assertions, which compare exact strings that OCR cannot supply reliably.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / x / description
      Previous value: -"X coordinate (tap/doubleTap/longPress/swipe start; assert target element)"New value: +"X coordinate (tap/doubleTap/longPress/swipe start; assert & scrollToElement target element)"
    • changedInput schema / properties / y / description
      Previous value: -"Y coordinate (tap/doubleTap/longPress/swipe start; assert target element)"New value: +"Y coordinate (tap/doubleTap/longPress/swipe start; assert & scrollToElement target element)"
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

No annotations are provided, so the description carries the behavioral disclosure burden. It discloses that the tool 'Performs the action live on the device' and 'overwrites the step at stepIndex instead of appending,' which reveals it is a live execution and a mutating operation. It also discloses the rejection condition for the appLaunch step. It could further clarify irreversibility or side effects, but the core behavior is adequately exposed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact (two sentences plus a final reference clause) and front-loaded with the core purpose. Every sentence earns its place: it states what it does, the alternative it replaces, a key constraint, and a pointer to a sibling tool for parameter details. No redundant or filler wording.

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?

Given the tool's complexity (19 parameters, no output schema, no annotations), the description covers the essential operational context: when it applies (in-progress before save), how it behaves (live action, overwrites in place), a critical constraint (appLaunch rejection), and a reference to sibling tool for action params. It does not describe return values, but no output schema exists, and the absence is not a critical gap for invocation.

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 the parameter descriptions in the schema already carry the main semantic weight. The description adds the note 'Accepts the same action params as flow_recording_action,' which is a useful cross-reference, and the appLaunch rejection constraint is additional context. However, it does not add new meaning for the individual parameters beyond what the schema already provides.

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 states a specific verb ('Replace'), a specific resource ('one step of an in-progress recording (before flow_recording_save)'), and the key semantics of preserving position. It also explicitly differentiates from appending (flow_recording_action) and from the delete + re-record + reorder workflow, making it easy for an agent to distinguish from related siblings.

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?

The description explicitly states when to use this tool: 'Use this to fix a mis-recorded step (wrong element bound, wrong action) in place rather than deleting + re-recording + reordering.' It also notes a critical constraint: 'Replacing the appLaunch step (index 1) is rejected.' This gives clear context and an exclusion, leaving no ambiguity about when to choose this tool.

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.

Resources