tap
Tap a button, link or choice by ref. Returns the new screen, or only the lines that changed when the screen stayed the same one. The result starts with 'Change: none | content changed | new screen | scrolled'. Work that starts on a tap (paying, saving, loading) can finish after this returns, so the screen may show 'Paying...' or a spinner. Do not report that as the result: pass wait_for with the text you expect (and gone: true for the spinner), or settle: true, before you read the outcome or do anything else. To tap a known path in one call, pass then with the next things to tap, by visible name or ref.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"session": "<session>",
"ref": "<ref>"
},
"name": "tap"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | Yes | Element ref from the screen, e.g. e42. After a restart refs can carry a prefix, such as f1e42; use them exactly as the screen shows them. | |
| then | No | More taps to make after this one, in order: each is the visible name of the element to tap on the screen that follows (for example ["Settings", "Dark theme"]) or a ref. The path stops at the first step that is not on the screen. | |
| settle | No | Wait until the screen stops changing (two equal reads 100 ms apart), up to timeout_ms. Use after any action that starts work. A slow result can still follow a pause, so prefer wait_for when you know the expected text. | |
| compact | No | When the change is 'content changed', the result lists only the lines that changed (+ added, - removed, ~ changed), with refs as on the full screen. This is the default. Pass false to get the whole screen. | |
| session | Yes | Session from open_app | |
| approved | No | Only after a tap answered approval_needed and the person said yes in chat: true repeats the tap with their approval. Never set it on your own. | |
| wait_for | No | Use after any action that starts work. Wait until this appears (a ref, a text, or role+name), or disappears with gone: true. The result says Waited: matched or timed out. | |
| timeout_ms | No | How long wait_for and settle may take, in ms (default 2000) |