Action payload · devices:control
long_press
Hold a normalized point. ms is an integer from 200 to 1500; default 600.
Payload
{
"type": "long_press",
"x": 0.5,
"y": 0.6,
"ms": 600
}Payload fields
typestringrequiredDiscriminator that selects the action or content shape.
"long_press"xnumberrequiredHorizontal position: 0 is the left edge and 1 is the right edge of the current screen.
0.5ynumberrequiredVertical position: 0 is the top edge and 1 is the bottom edge of the current screen.
0.6msintegeroptionalGesture duration in milliseconds. The valid range depends on the action type.
600600Unknown fields are rejected.
View JSON Schema
{
"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.
