FleetDeckDocs

Action payload · devices:control

swipe

Swipe between normalized points. ms is an integer from 100 to 1200; default 300.

Payload

json
{
  "type": "swipe",
  "from": {
    "x": 0.5,
    "y": 0.8
  },
  "to": {
    "x": 0.5,
    "y": 0.2
  },
  "ms": 300
}

Payload fields

typestringrequired

Discriminator that selects the action or content shape.

Allowed:"swipe"
fromobjectrequired

Start point of the gesture, using normalized screen coordinates.

View child fields
xnumberrequired

Horizontal position: 0 is the left edge and 1 is the right edge of the current screen.

min 0max 1
Example: 0.5
ynumberrequired

Vertical position: 0 is the top edge and 1 is the bottom edge of the current screen.

min 0max 1
Example: 0.8

Unknown fields are rejected.

toobjectrequired

End point of the gesture, using normalized screen coordinates.

View child fields
xnumberrequired

Horizontal position: 0 is the left edge and 1 is the right edge of the current screen.

min 0max 1
Example: 0.5
ynumberrequired

Vertical position: 0 is the top edge and 1 is the bottom edge of the current screen.

min 0max 1
Example: 0.2

Unknown fields are rejected.

msintegeroptional

Gesture duration in milliseconds. The valid range depends on the action type.

min 100max 1,200default 300
Example: 300

Unknown fields are rejected.

View JSON Schema
json
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "swipe"
      ],
      "description": "Discriminator that selects the action or content shape."
    },
    "from": {
      "type": "object",
      "properties": {
        "x": {
          "type": "number",
          "minimum": 0,
          "maximum": 1,
          "description": "Horizontal position: 0 is the left edge and 1 is the right edge of the current screen."
        },
        "y": {
          "type": "number",
          "minimum": 0,
          "maximum": 1,
          "description": "Vertical position: 0 is the top edge and 1 is the bottom edge of the current screen."
        }
      },
      "required": [
        "x",
        "y"
      ],
      "additionalProperties": false,
      "description": "Start point of the gesture, using normalized screen coordinates."
    },
    "to": {
      "type": "object",
      "properties": {
        "x": {
          "type": "number",
          "minimum": 0,
          "maximum": 1,
          "description": "Horizontal position: 0 is the left edge and 1 is the right edge of the current screen."
        },
        "y": {
          "type": "number",
          "minimum": 0,
          "maximum": 1,
          "description": "Vertical position: 0 is the top edge and 1 is the bottom edge of the current screen."
        }
      },
      "required": [
        "x",
        "y"
      ],
      "additionalProperties": false,
      "description": "End point of the gesture, using normalized screen coordinates."
    },
    "ms": {
      "type": "integer",
      "minimum": 100,
      "maximum": 1200,
      "default": 300,
      "description": "Gesture duration in milliseconds. The valid range depends on the action type."
    }
  },
  "required": [
    "type",
    "from",
    "to"
  ],
  "additionalProperties": false,
  "description": "Swipe between normalized points. ms is an integer from 100 to 1200; default 300.",
  "example": {
    "type": "swipe",
    "from": {
      "x": 0.5,
      "y": 0.8
    },
    "to": {
      "x": 0.5,
      "y": 0.2
    },
    "ms": 300
  }
}

REST wraps this payload inside {requestId, command}. The matching MCP tool takes sessionId and requestId plus these fields, without the type discriminator.

Contract

Submit this as command to POST /sessions/{sessionId}/actions, pass it as the CLI action JSON, or use the matching MCP convenience tool. Command objects are strict and reject unknown fields.

Execution

Swipe between normalized points. ms is an integer from 100 to 1200; default 300.

Action status and driver result remain separate. A completed result can still require a fresh screenshot or hierarchy check to prove the intended visible effect.