expect
Verify that an action landed as intended or was soft-blocked by checking element state, page text, URL, and challenge walls in one call, returning pass/fail failures.
Instructions
ONE-CALL verification gate. Assert the page reached an expected state — composes element-state / page-text / URL checks plus a native challenge-wall check into a single {passed, failures[]} verdict. Use after an action to confirm it landed (or that you got soft-blocked) instead of stitching several wait and read calls together. Every check is optional.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "expect"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lease | No | Optional lease token to present if the target session is leased (0.7.0). Threaded per-call; never read from the server's env. | |
| state | No | Expected element state (default 'visible'): visible|hidden|attached|detached. | |
| target | No | Element to assert — @eN / @text: / @label: / CSS. | |
| session | No | Optional session name to target (omit for the shared 'default'). On a daemon shared with other agents, pass a UNIQUE name for stateful multi-step work (go→click→fill) so you don't collide on 'default'. | |
| screenshot | No | auto = capture only on failure (evidence); always; never. | auto |
| timeout_ms | No | Per-wait budget. | |
| allow_walled | No | If false (default), a detected Cloudflare/DataDome challenge wall is a failure. | |
| url_contains | No | Current URL must contain this substring. | |
| text_contains | No | Page text must contain this substring. |