FleetDeckDocs

Action payload · devices:control

long_press

Hold a normalized point. ms is an integer from 200 to 1500; default 600.

Payload

json
{
  "type": "long_press",
  "x": 0.5,
  "y": 0.6,
  "ms": 600
}

Payload fields

typestringrequired

Discriminator that selects the action or content shape.

Allowed:"long_press"
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.6
msintegeroptional

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

min 200max 1,500default 600
Example: 600

Unknown fields are rejected.

View JSON Schema
json
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "long_press"
      ],
      "description": "Discriminator that selects the action or content shape."
    },
    "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."
    },
    "ms": {
      "type": "integer",
      "minimum": 200,
      "maximum": 1500,
      "default": 600,
      "description": "Gesture duration in milliseconds. The valid range depends on the action type."
    }
  },
  "required": [
    "type",
    "x",
    "y"
  ],
  "additionalProperties": false,
  "description": "Hold a normalized point. ms is an integer from 200 to 1500; default 600.",
  "example": {
    "type": "long_press",
    "x": 0.5,
    "y": 0.6,
    "ms": 600
  }
}

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

Hold a normalized point. ms is an integer from 200 to 1500; default 600.

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.