interact
Drive a UI element into a new state by clicking, hovering, or focusing. Leaves the resulting state for inspection—no recording or teardown. Target by uid, selector, or coordinates.
Instructions
Perform ONE action (click/hover/focus) at a target and LEAVE the resulting state in place — no recording, no teardown. Use this to DRIVE the UI into a state — open a popup/menu/modal, reveal a tab or dropdown — so you can then inspect_element / annotated_screenshot / explain_styles the NEW state: "open the menu then tell me why it overflows", "click the tab and check the panel". Reports the target's post-action visibility + content box so you learn immediately whether it opened. Target by uid, selector, or x+y. For the causal TIMELINE of an interaction — which handler ran, what mutated, which transitions were cancelled — use record_interaction instead; interact only leaves you in the state, it does not explain the transition.
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": "interact"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Viewport x coordinate (use with y) | |
| y | No | Viewport y coordinate (use with x) | |
| uid | No | Element uid from a prior page_snapshot (e.g. "e5") | |
| action | No | What to do at the target — default "click". hover moves the mouse over it; focus focuses it. | |
| selector | No | CSS selector — first match is used | |
| settleMs | No | How long to wait for the UI to react before reporting the target's new state; default 250, clamped 0–5000 |