Skip to main content
Glama
appium

MCP Appium

Official
by appium

appium_gesture

Perform a touch gesture. Use 'action' to choose: tap, double_tap, long_press, scroll, swipe, pinch_zoom, scroll_to_element, back.

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

TableJSON 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. Scale < 1 zooms out (fingers close); scale > 1 zooms in (fingers spread). Examples: 0.5 zooms out; 2.0 zooms in 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.
actionYesGesture to perform: - tap: tap an element or a coordinate. - double_tap: double-tap, for example to zoom an image or favorite a post. - long_press: press and hold to open a context menu or initiate a drag. For tap/double_tap/long_press, provide elementUUID or both x and y. - 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). For scroll/swipe, provide direction or all four custom coordinates: x, y, endX, endY. - pinch_zoom: zoom in (scale > 1) or out (scale < 1) on maps, images, or other zoomable views. Requires scale. - scroll_to_element: scroll to find a target using strategy and selector. Direction is up/down, default down. Stops when the element is found, page source is unchanged after a scroll (likely end of content), or maxScrollAttempts is reached. Adjust distance with scrollDistance (0.05–1) or scrollDistancePreset (small/medium/large). - back: trigger 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.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."
  2. 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."
  3. First observedv1.92.11

TDQS

Score is being calculated.