ApplesauceOS
Read Markdown ↗Download .md

POST /ui/action

Perform one action on an observed element.

This is a device HTTP route. Set DEVICE_URL to your reachable device URL; connection and examples explain how. Do not append this path to the public MCP URL.

Parameters

ParameterTypeMeaning
observationIdJSON stringRequired observation ID.
refJSON stringRequired reference from the same observation.
actionJSON stringread, tap, setText, typeText, clear, scroll or scrollIntoView.
textJSON stringRequired text for setText/typeText.
directionJSON stringOptional scroll direction: up, down, left or right; default down.

Response

JSON {backend,observationId,ref,action,value}. read returns fresh attributes; successful mutations return value:true.

Example

sh
curl --fail-with-body "$DEVICE_URL/ui/action" \
  -H 'Content-Type: application/json' \
  -d '{"observationId":"OBSERVATION_ID","ref":"e1","action":"tap"}'

Notes

Use actual observation values, not these placeholders. The inspector must be closed for mutations and the same app must remain foreground. Acknowledgement is not navigation completion. Mutations are not automatically retried. HTTP typeText does not accept the JS interval option.

Check the HTTP status and any JSON error. HTTP workflows and error handling explain shared limits. All endpoints.