Skip to main content
Glama

Swipe Android display

mobile_input_swipe

Simulate a touchscreen swipe on a chosen Android display for a given duration, using coordinates or refs from the latest UI snapshot.

Instructions

Inject a display-targeted touchscreen swipe with explicit duration. startRef and endRef come from the latest UI read and win over start and end.

Input Schema

NameRequiredDescriptionDefault
endNo
startNo
endRefNoRef from the latest mobile_ui_snapshot, mobile_ui_find, or mobile_ui_wait on this serial and display.
serialYesExact ADB serial from mobile_devices_list; never inferred when multiple devices exist
startRefNoRef from the latest mobile_ui_snapshot, mobile_ui_find, or mobile_ui_wait on this serial and display.
displayIdYesAndroid framework logical display ID, not a SurfaceFlinger physical ID
durationMsNo

Output Schema

NameRequiredDescriptionDefault
dataYes
deviceYes
backendYes
displayNo
warningsYes
durationMsYes
operationIdYes
schemaVersionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.9.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / properties / endRef
      Added value: +{
      +  "description": "Ref from the latest mobile_ui_snapshot, mobile_ui_find, or mobile_ui_wait on this serial and display.",
      +  "pattern": "^@n\\d+$",
      +  "type": "string"
      +}
    • addedInput schema / properties / startRef
      Added value: +{
      +  "description": "Ref from the latest mobile_ui_snapshot, mobile_ui_find, or mobile_ui_wait on this serial and display.",
      +  "pattern": "^@n\\d+$",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "serial",
      -  "displayId",
      -  "start",
      -  "end"
      -]New value: +[
      +  "serial",
      +  "displayId"
      +]
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. First observedv0.5.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false, openWorldHint=false, so the agent knows this is a state-changing, non-repeatable on-device operation. The description adds 'display-targeted' and 'explicit duration' but says nothing about what UI/app state the gesture affects, stale-ref failure modes, or permission needs.

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?

Two sentences, both load-bearing, with the core action stated first and the ref-precedence rule second. There is no redundancy or filler.

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?

An output schema exists, so return values need no prose, and the precedence rule covers the trickiest ambiguity among 7 parameters. However, for a non-idempotent injection tool with stale-ref risk, the description omits failure behavior and where the gesture lands, leaving meaningful gaps.

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?

Schema coverage is 57%, and the description compensates by stating a real semantic rule absent from the schema: startRef/endRef 'win over' start and end when both are supplied. It does not clarify displayId (framework vs SurfaceFlinger is only in the schema) or the durationMs default, so it is not fully compensating.

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: 'Inject a display-targeted touchscreen swipe with explicit duration.' An agent can tell it apart from mobile_input_tap or mobile_input_long_press, though the boundary with the sibling mobile_input_drag (which likely also expresses a move gesture) is not addressed.

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

Usage Guidelines2/5

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

No when-to-use/when-not guidance and no alternative named; the agent is left to infer that a swipe differs from drag. The only routing-style statement is the startRef/endRef precedence, which is closer to parameter semantics than usage guidance.

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