Skip to main content
Glama
MCP Appium

MCP Appium

Official
by appium

appium_gesture

Performs mobile touch gestures—tap, double tap, long press, scroll, swipe, pinch zoom, scroll to element, and back—to automate iOS and Android interactions.

Instructions

Perform a touch gesture. Use 'action' to choose: tap, double_tap, long_press, scroll, swipe, pinch_zoom, scroll_to_element, back. Choose scroll vs swipe by intent: scroll to browse content in a list or feed; swipe to dismiss, switch screens, navigate carousels, or pull-to-refresh (speed=fast). For drag-and-drop use appium_drag_and_drop. For custom multi-touch use appium_perform_actions.

Input Schema

NameRequiredDescriptionDefault
xNoX pixel coordinate, paired with y: tap location, pinch center, or scroll/swipe start (requires endX/endY). elementUUID overrides x/y for tap/double_tap/long_press/pinch_zoom.
yNoY pixel coordinate, paired with x; same action meanings and elementUUID precedence as x.
endXNoEnding X coordinate in pixels for scroll/swipe; requires x, y, endY.
endYNoEnding Y coordinate in pixels for scroll/swipe; requires x, y, endX.
scaleNoRequired for pinch_zoom: <1 zooms out, >1 zooms in (e.g. 0.5 or 2 for 2x).
speedNoSwipe only. slow: deliberate drag; normal: default navigation speed; fast: flick without an initial hold. Use fast for pull-to-refresh and other velocity-sensitive interfaces.
actionYestap/double_tap/long_press: requires elementUUID or both x/y. scroll/swipe: requires direction or x/y/endX/endY. pinch_zoom: requires scale (<1 out, >1 in). scroll_to_element: requires strategy/selector; direction up/down (default down). Stops on a match, unchanged page source, or maxScrollAttempts. Adjust distance with scrollDistance or scrollDistancePreset. back: system back navigation.
durationNoDuration in milliseconds. long_press defaults to 2000 (range 500–10000); scroll defaults to 800. For swipe, prefer speed unless a custom movement duration is needed. For W3C swipe, overrides movement time; speed still sets the initial hold. Ignored by iOS native mobile: swipe (direction, no elementUUID, speed != fast).
selectorNoLocator selector value. Required for: scroll_to_element.
strategyNoRequired for scroll_to_element. Prefer accessibility id > id > platform-native (iOS: -ios predicate string / -ios class chain; Android: -android uiautomator) > xpath (last resort: slow/brittle). name is legacy; class name may match multiple elements; css selector is webview-only. Same priorities as appium_find_element.
velocityNoPinch velocity in scale factor per second. Default 2.2. Used by pinch_zoom.
directionNoDirection for scroll/swipe. Coordinates are calculated from the screen or element bounds. Provide either direction or custom coordinates (x, y, endX, endY); direction takes precedence if both are given. For scroll_to_element, use up/down; default down.
sessionIdNoSession ID; defaults to the active session.
elementUUIDNoElement UUID for tap, double_tap, long_press, or pinch_zoom; overrides x/y for these actions. For scroll/swipe with direction, coordinates are calculated relative to this element instead of the whole screen.
scrollDistanceNoscroll_to_element only: vertical swipe distance fraction (0.05–1). Ignored when scrollDistancePreset is set. Default 0.45 when neither option is supplied.
maxScrollAttemptsNoscroll_to_element only: maximum scroll attempts after the initial lookup fails. Default 10.
scrollDistancePresetNoscroll_to_element only: small is a light nudge (0.25), medium is 0.45, large is the full default swipe (1). Overrides scrollDistance when set.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.99.1
    • changedInput schema / properties / action / description
      Previous value: -"Gesture to perform:\n- tap: tap an element or a coordinate.\n- double_tap: double-tap, for example to zoom an image or favorite a post.\n- long_press: press and hold to open a context menu or initiate a drag.\nFor tap/double_tap/long_press, provide elementUUID or both x and y.\n- scroll: browse a list, feed, or page to reveal content.\n- swipe: dismiss a card, switch screens or tabs, navigate a carousel, or pull-to-refresh (use speed=fast).\nFor scroll/swipe, provide direction or all four custom coordinates: x, y, endX, endY.\n- pinch_zoom: zoom in (scale > 1) or out (scale < 1) on maps, images, or other zoomable views. Requires scale.\n- scroll_to_element: scroll to find a target using strategy and selector. Direction is up/down, default down.\nStops when the element is found, page source is unchanged after a scroll (likely end of content), or maxScrollAttempts is reached.\nAdjust distance with scrollDistance (0.05–1) or scrollDistancePreset (small/medium/large).\n- back: trigger system back navigation."New value: +"tap/double_tap/long_press: requires elementUUID or both x/y.\nscroll/swipe: requires direction or x/y/endX/endY.\npinch_zoom: requires scale (<1 out, >1 in).\nscroll_to_element: requires strategy/selector; direction up/down (default down).\nStops on a match, unchanged page source, or maxScrollAttempts. Adjust distance with scrollDistance or scrollDistancePreset.\nback: system back navigation."
    • changedInput schema / properties / scale / description
      Previous value: -"Required for pinch_zoom. Scale < 1 zooms out (fingers close); scale > 1 zooms in (fingers spread). Examples: 0.5 zooms out; 2.0 zooms in 2x."New value: +"Required for pinch_zoom: <1 zooms out, >1 zooms in (e.g. 0.5 or 2 for 2x)."
  2. Changed2 schema fields changedv1.97.1
    • changedInput schema / properties / x / description
      Previous value: -"X coordinate in pixels. For tap/double_tap/long_press: tap location, paired with y. For scroll/swipe: starting X in custom-coordinate mode; requires y, endX, endY. For pinch_zoom: center X, paired with y. Tap/double_tap/long_press/pinch_zoom ignore x/y when elementUUID is set."New value: +"X pixel coordinate, paired with y: tap location, pinch center, or scroll/swipe start (requires endX/endY). elementUUID overrides x/y for tap/double_tap/long_press/pinch_zoom."
    • changedInput schema / properties / y / description
      Previous value: -"Y coordinate in pixels, paired with x. For tap/double_tap/long_press: tap location. For scroll/swipe: starting Y in custom-coordinate mode. For pinch_zoom: center Y. The same elementUUID precedence as x applies."New value: +"Y pixel coordinate, paired with x; same action meanings and elementUUID precedence as x."
  3. Changed16 schema fields changedv1.95.0
    • changedInput schema / properties / action / description
      Previous value: -"Gesture to perform. tap: tap an element or a coordinate. double_tap: trigger a double-tap action (e.g. zoom in on an image, favorite a post). long_press: press and hold to open a context menu or initiate drag. scroll: browse a list, feed, or page to reveal content. swipe: dismiss a card, switch screens or tabs, navigate a carousel, or pull-to-refresh (use speed=fast). pinch_zoom: zoom in (scale > 1) or out (scale < 1) on maps, images, or any zoomable view. scroll_to_element: scroll until a specific element is on screen (strategy + selector + direction up|down). Stops when the element is found, page source is unchanged after a scroll (end of scrollable content), or maxScrollAttempts is reached. Optional scrollDistance (0.05–1) or scrollDistancePreset (small|medium|large). back: triggers the system back navigation (e.g., Android back button or iOS navigation controller pop)."New value: +"Gesture to perform:\n- tap: tap an element or a coordinate.\n- double_tap: double-tap, for example to zoom an image or favorite a post.\n- long_press: press and hold to open a context menu or initiate a drag.\nFor tap/double_tap/long_press, provide elementUUID or both x and y.\n- scroll: browse a list, feed, or page to reveal content.\n- swipe: dismiss a card, switch screens or tabs, navigate a carousel, or pull-to-refresh (use speed=fast).\nFor scroll/swipe, provide direction or all four custom coordinates: x, y, endX, endY.\n- pinch_zoom: zoom in (scale > 1) or out (scale < 1) on maps, images, or other zoomable views. Requires scale.\n- scroll_to_element: scroll to find a target using strategy and selector. Direction is up/down, default down.\nStops when the element is found, page source is unchanged after a scroll (likely end of content), or maxScrollAttempts is reached.\nAdjust distance with scrollDistance (0.05–1) or scrollDistancePreset (small/medium/large).\n- back: trigger system back navigation."
    • changedInput schema / properties / direction / description
      Previous value: -"Direction for scroll or swipe. Coordinates are auto-calculated from screen or element bounds. Either direction OR custom coordinates (x, y, endX, endY) must be provided for these actions."New value: +"Direction for scroll/swipe. Coordinates are calculated from the screen or element bounds. Provide either direction or custom coordinates (x, y, endX, endY); direction takes precedence if both are given. For scroll_to_element, use up/down; default down."
    • changedInput schema / properties / duration / description
      Previous value: -"Duration in milliseconds. long_press default 2000 (range 500-10000). scroll default 800. For swipe, prefer the speed parameter; duration overrides it if both are provided."New value: +"Duration in milliseconds. long_press defaults to 2000 (range 500–10000); scroll defaults to 800. For swipe, prefer speed unless a custom movement duration is needed. For W3C swipe, overrides movement time; speed still sets the initial hold. Ignored by iOS native mobile: swipe (direction, no elementUUID, speed != fast)."
    • changedInput schema / properties / elementUUID / description
      Previous value: -"UUID of the element to act on. Used by: tap, double_tap, long_press, pinch_zoom. For scroll/swipe, when provided with direction, the gesture is calculated relative to this element instead of the whole screen."New value: +"Element UUID for tap, double_tap, long_press, or pinch_zoom; overrides x/y for these actions. For scroll/swipe with direction, coordinates are calculated relative to this element instead of the whole screen."
    • changedInput schema / properties / endX / description
      Previous value: -"Ending X coordinate. Used by: scroll, swipe (custom-coordinate mode)."New value: +"Ending X coordinate in pixels for scroll/swipe; requires x, y, endY."
    • changedInput schema / properties / endY / description
      Previous value: -"Ending Y coordinate. Used by: scroll, swipe (custom-coordinate mode)."New value: +"Ending Y coordinate in pixels for scroll/swipe; requires x, y, endX."
    • changedInput schema / properties / maxScrollAttempts / description
      Previous value: -"scroll_to_element only: maximum scroll attempts after the element is not yet visible (default 10)."New value: +"scroll_to_element only: maximum scroll attempts after the initial lookup fails. Default 10."
    • changedInput schema / properties / scale / description
      Previous value: -"Pinch scale factor. < 1 = zoom out (pinch close), > 1 = zoom in (pinch open). Example: 0.5 = zoom out 50%, 2.0 = zoom in 2x. Required for: pinch_zoom."New value: +"Required for pinch_zoom. Scale < 1 zooms out (fingers close); scale > 1 zooms in (fingers spread). Examples: 0.5 zooms out; 2.0 zooms in 2x."
    • changedInput schema / properties / scrollDistance / description
      Previous value: -"scroll_to_element only: vertical swipe length as a fraction 0.05–1 (same scale as legacy scroll). Ignored when scrollDistancePreset is set. Default 0.45 if neither preset nor scrollDistance is set."New value: +"scroll_to_element only: vertical swipe distance fraction (0.05–1). Ignored when scrollDistancePreset is set. Default 0.45 when neither option is supplied."
    • changedInput schema / properties / scrollDistancePreset / description
      Previous value: -"scroll_to_element only: convenience preset — small ≈ light nudge (0.25), medium ≈ 0.45, large = full default swipe (1). When set, overrides scrollDistance."New value: +"scroll_to_element only: small is a light nudge (0.25), medium is 0.45, large is the full default swipe (1). Overrides scrollDistance when set."
    • changedInput schema / properties / sessionId / description
      Previous value: -"Session ID to target. If omitted, uses the active session."New value: +"Session ID; defaults to the active session."
    • changedInput schema / properties / speed / description
      Previous value: -"Swipe speed. slow = deliberate drag; normal = default navigation speed; fast = flick with no hold, use for pull-to-refresh and other velocity-sensitive UIs. Used by: swipe."New value: +"Swipe only. slow: deliberate drag; normal: default navigation speed; fast: flick without an initial hold. Use fast for pull-to-refresh and other velocity-sensitive interfaces."
    • changedInput schema / properties / strategy / description
      Previous value: -"Locator strategy. Required for: scroll_to_element. Priority: accessibility id > id > platform-native (-ios predicate string / -ios class chain on iOS, -android uiautomator on Android) > xpath (LAST RESORT — slow on iOS XCUITest, brittle) > name > class name > css selector (webview only). Same ranking as appium_find_element."New value: +"Required for scroll_to_element. Prefer accessibility id > id > platform-native (iOS: -ios predicate string / -ios class chain; Android: -android uiautomator) > xpath (last resort: slow/brittle). name is legacy; class name may match multiple elements; css selector is webview-only. Same priorities as appium_find_element."
    • changedInput schema / properties / velocity / description
      Previous value: -"Pinch velocity in scale factor per second. Default 2.2. Used by: pinch_zoom."New value: +"Pinch velocity in scale factor per second. Default 2.2. Used by pinch_zoom."
    • changedInput schema / properties / x / description
      Previous value: -"X coordinate. For tap/double_tap/long_press: tap location (alternative to elementUUID). For scroll/swipe: starting X for custom-coordinate mode (requires y, endX, endY). For pinch_zoom: center X of the pinch. Requires y. Ignored if elementUUID is set."New value: +"X coordinate in pixels. For tap/double_tap/long_press: tap location, paired with y. For scroll/swipe: starting X in custom-coordinate mode; requires y, endX, endY. For pinch_zoom: center X, paired with y. Tap/double_tap/long_press/pinch_zoom ignore x/y when elementUUID is set."
    • changedInput schema / properties / y / description
      Previous value: -"Y coordinate. For tap/double_tap/long_press: tap location. For scroll/swipe: starting Y for custom-coordinate mode. For pinch_zoom: center Y of the pinch. Requires x. Ignored if elementUUID is set."New value: +"Y coordinate in pixels, paired with x. For tap/double_tap/long_press: tap location. For scroll/swipe: starting Y in custom-coordinate mode. For pinch_zoom: center Y. The same elementUUID precedence as x applies."
  4. First observedv1.92.11

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and openWorldHint=false, so the safety profile is clear. The description adds action-level intent such as browse versus dismiss versus pull-to-refresh, but it does not describe side effects, waits, or failure behavior beyond what the schema already covers.

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 three tight sentences, front-loaded with the core action and followed by action selection and sibling routing guidance. It contains no filler and does not redundantly restate the long schema.

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 17-parameter gesture tool, the description provides the high-level action model and sibling routing while the schema carries the detailed mechanics. It is nearly complete, though a complex eight-action tool could briefly mention session or element-precedence behavior at a high level.

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 100% and every parameter is documented in detail, so the description does not need to repeat coordinate, duration, or locator mechanics. It does add useful action-selection semantics that the schema does not fully capture, especially scroll versus swipe intent.

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 and resource, then enumerates the supported touch actions. It also distinguishes this tool from appium_drag_and_drop and appium_perform_actions, so an agent can route correctly without opening the schema.

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?

It explicitly explains when to use scroll versus swipe by intent and names the two sibling alternatives for drag-and-drop and custom multi-touch. The pull-to-refresh speed hint further reduces ambiguity.

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