Skip to main content
Glama

Act on the screen

qa_act

Perform a single mobile UI action—tap, type, clear, swipe, scroll, press, open a URL, or wait—then wait for the screen to settle and report changed elements and snapshot health.

Instructions

Tap, type, clear, swipe, scroll, press a key, open a URL or wait: one UI step, then it waits for the screen to settle and reports changed/settled, snapshot quality, health, new elements. Target: an @eN ref from qa_snapshot, text, id, a native selector (WDA iOS), or x/y. For 3+ known steps, batch them in one qa_flow_run {flowYaml}. Details: docs/tools.md#qa_act.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "sessionId": "<sessionId>",
      "action": "<action>"
    },
    "name": "qa_act"
  }
}

Input Schema

NameRequiredDescriptionDefault
forNowait: {settled:true} (default), or until an element (ref/text/id/selector) is visible; gone:true waits until it is not.
keyNopress (required)
urlNoopen_url (required)
modeNotype: replace (default) clears first.
textNotype (required)
actionYes
submitNotype: press enter after.
targetNotap/type/clear (required); swipe: optional start point.
observeNodiff (default after a snapshot): elements added/removed; full: capped list; none: verdicts only.
directionNoswipe/scroll (required)
sessionIdYes
timeoutMsNowait: max ms (default 8000, max 50000; larger values are clamped); others: settle-wait cap.
durationMsNotap: press duration (coordinate taps default ~100ms).
maxScrollsNoscroll: max swipes (default 8).
untilVisibleNoscroll: stop once visible (checked before the first swipe).
ignoreOverlayNotap: tap even if an overlay/keyboard covers the target.

Output Schema

NameRequiredDescriptionDefault
okYes
actionNo
changedNo
settledNo
elementsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations only declare readOnly=false, destructive=false, idempotent=false, openWorld=false; the description adds real behavior beyond that — every call performs one step, then blocks until the screen settles and returns verdicts (changed/settled), snapshot quality, health, and new elements. The implicit retry hazard of a non-idempotent mutation is not spelled out, and failure/error semantics are only hinted at via 'health'.

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 action set and the post-action contract, then targets, then the batching alternative, then a doc pointer — a sensible priority order with no filler. The semicolon-dense second sentence packs action-target pairing tightly enough that it takes a re-read, costing a point.

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 16-parameter tool with nested target/for/untilVisible objects, the description covers the essentials: what a call does, where targets come from, the settle-and-report contract, and the batching alternative. An output schema exists so return details need not be repeated, and the doc anchor covers the rest; only the session lifecycle (sessionId origin) is left implicit.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 88% schema description coverage the schema already carries most parameter meaning, but the description adds the target-resolution model ('@eN ref from qa_snapshot, text, id, a native selector (WDA iOS), or x/y'), which the schema only enumerates field-by-field. It also flags the platform caveat that native selectors are WDA/iOS, information the schema does not convey.

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?

Opens with a concrete verb list (tap, type, clear, swipe, scroll, press, open_url, wait) applied to a single UI step, then states what happens after (waits for settle, reports changed/settled, snapshot quality, health, new elements). This is far more specific than the title 'Act on the screen' and lets an agent distinguish it from qa_snapshot (observation) and qa_flow_run (multi-step batching).

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?

Explicitly routes multi-step work away: 'For 3+ known steps, batch them in one qa_flow_run {flowYaml}' — a named alternative plus the condition that selects it. It also names qa_snapshot as the source of @eN refs, establishing the natural preceding tool. It stops short of an explicit 'when not to use' (e.g. for reading state without acting, use qa_snapshot), so not a full 5.

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