Troupeby AliveDocsSign in

Reference

input

Actions. Locator and ref targets auto-wait on the runtime side. Index · shared schemas · errors.

ProcedureSummaryRESTMCP toolStability
input.tapTap an element or a point after auto-waitingPOSTinput_tapstable
input.doubleTapDouble-tapPOSTinput_doubleTapstable
input.longPressPress and holdPOSTinput_longPressstable
input.swipeSwipe on a target or the screen. direction is the finger's direction of travel.POSTinput_swipestable
input.dragDrag from one target to anotherPOST—stable
input.pinchTwo-finger pinch; scale above 1 zooms inPOST—stable
input.typeType text as key events into the target (tapped first) or the focused elementPOSTinput_typestable
input.fillClear an editable element, then set its valuePOSTinput_fillstable
input.pressKeyPress one key (W3C KeyboardEvent.key names)POSTinput_pressKeystable
input.pressButtonPress a hardware buttonPOSTinput_pressButtonstable
input.scrollScroll a container. direction is the content direction (down reveals content below). until scrolls until a locator is visible.POSTinput_scrollstable
input.setOrientationRotate the devicePOSTinput_setOrientationstable
input.gesturePlay a multi-finger gesture: each contact follows its timed pointsPOST—stable
input.hideKeyboardDismiss the software keyboardPOSTinput_hideKeyboardstable

input.tap

Tap an element or a point after auto-waiting

RESTPOST /v1/input/tap (input as a JSON body)
RPC/rpc/v2/input/tap
MCPtool input_tap; hints: none
Authdevices:drive
Tenancyproject
Requiresinput.touch or input.semantic
Troupe Cloudrelayed through the host agent to the device host’s runtime
Stabilitystable, since 1.0

Input:

TypeScript
{
  sessionId: SessionId
  target: Target
  position?: Point
  timeoutMs?: TimeoutMs  // default 5000
  force?: boolean  // default false
}

Output:

TypeScript
ActionResult

Errors: L.

Named types: ActionResult, Point, SessionId, Target, TimeoutMs.

input.doubleTap

Double-tap

RESTPOST /v1/input/double-tap (input as a JSON body)
RPC/rpc/v2/input/doubleTap
MCPtool input_doubleTap; hints: none
Authdevices:drive
Tenancyproject
Requiresinput.touch
Troupe Cloudrelayed through the host agent to the device host’s runtime
Stabilitystable, since 1.0

Input:

TypeScript
{
  sessionId: SessionId
  target: Target
  position?: Point
  timeoutMs?: TimeoutMs  // default 5000
  force?: boolean  // default false
}

Output:

TypeScript
ActionResult

Errors: L.

Named types: ActionResult, Point, SessionId, Target, TimeoutMs.

input.longPress

Press and hold

RESTPOST /v1/input/long-press (input as a JSON body)
RPC/rpc/v2/input/longPress
MCPtool input_longPress; hints: none
Authdevices:drive
Tenancyproject
Requiresinput.touch
Troupe Cloudrelayed through the host agent to the device host’s runtime
Stabilitystable, since 1.0

Input:

TypeScript
{
  sessionId: SessionId
  target: Target
  position?: Point
  timeoutMs?: TimeoutMs  // default 5000
  force?: boolean  // default false
  durationMs?: DurationMs  // default 800
}

Output:

TypeScript
ActionResult

Errors: L.

Named types: ActionResult, DurationMs, Point, SessionId, Target, TimeoutMs.

input.swipe

Swipe on a target or the screen. direction is the finger's direction of travel.

RESTPOST /v1/input/swipe (input as a JSON body)
RPC/rpc/v2/input/swipe
MCPtool input_swipe; hints: none
Authdevices:drive
Tenancyproject
Requiresinput.touch
Troupe Cloudrelayed through the host agent to the device host’s runtime
Stabilitystable, since 1.0

Input:

TypeScript
{
  sessionId: SessionId
  target?: Target
  direction: 'up' | 'down' | 'left' | 'right'
  distance?: number  // default 0.6; > 0 and ≤ 1
  durationMs?: DurationMs  // default 300
  timeoutMs?: TimeoutMs  // default 5000
}

Output:

TypeScript
ActionResult

Errors: L.

Named types: ActionResult, DurationMs, SessionId, Target, TimeoutMs.

input.drag

Drag from one target to another

RESTPOST /v1/input/drag (input as a JSON body)
RPC/rpc/v2/input/drag
MCPnot a tool (low value or high risk for agents); hints: none
Authdevices:drive
Tenancyproject
Requiresinput.touch
Troupe Cloudrelayed through the host agent to the device host’s runtime
Stabilitystable, since 1.0

Input:

TypeScript
{
  sessionId: SessionId
  from: Target
  to: Target
  holdMs?: DurationMs  // default 0
  durationMs?: DurationMs  // default 500
  timeoutMs?: TimeoutMs  // default 5000
}

Output:

TypeScript
ActionResult

Errors: L.

Named types: ActionResult, DurationMs, SessionId, Target, TimeoutMs.

input.pinch

Two-finger pinch; scale above 1 zooms in

RESTPOST /v1/input/pinch (input as a JSON body)
RPC/rpc/v2/input/pinch
MCPnot a tool (low value or high risk for agents); hints: none
Authdevices:drive
Tenancyproject
Requiresinput.touch; input.maxContacts ≥ 2
Troupe Cloudrelayed through the host agent to the device host’s runtime
Stabilitystable, since 1.0

Input:

TypeScript
{
  sessionId: SessionId
  target?: Target
  scale: number  // 0.1–10
  durationMs?: DurationMs  // default 400
}

Output:

TypeScript
ActionResult

Errors: L.

Named types: ActionResult, DurationMs, SessionId, Target.

input.type

Type text as key events into the target (tapped first) or the focused element

RESTPOST /v1/input/type (input as a JSON body)
RPC/rpc/v2/input/type
MCPtool input_type; hints: none
Authdevices:drive
Tenancyproject
Requiresinput.keyboard
Troupe Cloudrelayed through the host agent to the device host’s runtime
Stabilitystable, since 1.0

Input:

TypeScript
{
  sessionId: SessionId
  target?: Target
  text: string  // ≤ 4096 chars
  delayMs?: DurationMs
  timeoutMs?: TimeoutMs  // default 5000
}

Output:

TypeScript
ActionResult

Errors: L, SECRET_UNAVAILABLE.

Named types: ActionResult, DurationMs, SessionId, Target, TimeoutMs.

input.fill

Clear an editable element, then set its value

RESTPOST /v1/input/fill (input as a JSON body)
RPC/rpc/v2/input/fill
MCPtool input_fill; hints: idempotent
Authdevices:drive
Tenancyproject
Requiresinput.keyboard
Troupe Cloudrelayed through the host agent to the device host’s runtime
Stabilitystable, since 1.0

Input:

TypeScript
{
  sessionId: SessionId
  target: Target
  value: string  // ≤ 65536 chars
  timeoutMs?: TimeoutMs  // default 5000
}

Output:

TypeScript
ActionResult

Errors: L, SECRET_UNAVAILABLE.

Named types: ActionResult, SessionId, Target, TimeoutMs.

input.pressKey

Press one key (W3C KeyboardEvent.key names)

RESTPOST /v1/input/press-key (input as a JSON body)
RPC/rpc/v2/input/pressKey
MCPtool input_pressKey; hints: none
Authdevices:drive
Tenancyproject
Requiresinput.keyboard = 'keys'
Troupe Cloudrelayed through the host agent to the device host’s runtime
Stabilitystable, since 1.0

Input:

TypeScript
{
  sessionId: SessionId
  key: string  // 1–32 chars
  modifiers?: ('Alt' | 'Control' | 'Meta' | 'Shift')[]  // ≤ 4 items
}

Output:

TypeScript
ActionResult

Errors: D, TIMEOUT.

Named types: ActionResult, SessionId.

input.pressButton

Press a hardware button

RESTPOST /v1/input/press-button (input as a JSON body)
RPC/rpc/v2/input/pressButton
MCPtool input_pressButton; hints: none
Authdevices:drive
Tenancyproject
Requiresinput.buttons contains the input's button
Troupe Cloudrelayed through the host agent to the device host’s runtime
Stabilitystable, since 1.0

Input:

TypeScript
{ sessionId: SessionId; button: ButtonName; durationMs?: DurationMs }

Output:

TypeScript
ActionResult

Errors: D, TIMEOUT.

Named types: ActionResult, ButtonName, DurationMs, SessionId.

input.scroll

Scroll a container. direction is the content direction (down reveals content below). until scrolls until a locator is visible.

RESTPOST /v1/input/scroll (input as a JSON body)
RPC/rpc/v2/input/scroll
MCPtool input_scroll; hints: none
Authdevices:drive
Tenancyproject
Requiresinput.touch or input.semantic
Troupe Cloudrelayed through the host agent to the device host’s runtime
Stabilitystable, since 1.0

Input:

TypeScript
{
  sessionId: SessionId
  target?: Target
  direction: 'up' | 'down' | 'left' | 'right'
  distance?: number  // > 0 and ≤ 1
  until?: Locator
  maxScrolls?: integer  // default 10; 1–100
  timeoutMs?: TimeoutMs  // default 5000
}

Output:

TypeScript
{ scrolls: integer; found?: A11yNode }

Errors: L.

Named types: A11yNode, Locator, SessionId, Target, TimeoutMs.

input.setOrientation

Rotate the device

RESTPOST /v1/input/set-orientation (input as a JSON body)
RPC/rpc/v2/input/setOrientation
MCPtool input_setOrientation; hints: idempotent
Authdevices:drive
Tenancyproject
Requiresinput.rotate
Troupe Cloudrelayed through the host agent to the device host’s runtime
Stabilitystable, since 1.0

Input:

TypeScript
{ sessionId: SessionId; orientation: Orientation }

Output:

TypeScript
{ orientation: OrientationOut; width: number; height: number }

Errors: D, TIMEOUT.

Named types: Orientation, OrientationOut, SessionId.

input.gesture

Play a multi-finger gesture: each contact follows its timed points

RESTPOST /v1/input/gesture (input as a JSON body)
RPC/rpc/v2/input/gesture
MCPnot a tool (runner and inspector plumbing); hints: none
Authdevices:drive
Tenancyproject
Requiresinput.touch; input.maxContacts ≥ the length of the input's contacts
Troupe Cloudrelayed through the host agent to the device host’s runtime
Stabilitystable, since 1.0

Input:

TypeScript
{
  sessionId: SessionId
  contacts: {
    id: integer  // 0–9
    points: {
      x: number
      y: number
      t: number  // ≥ 0
    }[]  // 1–1000 items
  }[]  // 1–10 items
}

Output:

TypeScript
{ durationMs: number }

Errors: D, TIMEOUT.

Named types: SessionId.

input.hideKeyboard

Dismiss the software keyboard

RESTPOST /v1/input/hide-keyboard (input as a JSON body)
RPC/rpc/v2/input/hideKeyboard
MCPtool input_hideKeyboard; hints: idempotent
Authdevices:drive
Tenancyproject
Requiresinput.hideKeyboard
Troupe Cloudrelayed through the host agent to the device host’s runtime
Stabilitystable, since 1.0

Input:

TypeScript
{ sessionId: SessionId }

Output:

TypeScript
{ wasVisible: boolean }

Errors: D, TIMEOUT.

Named types: SessionId.

esc

    Type to search every page, the protocol reference and the cloud API.