focus
Makes an element the keyboard input target without clicking, useful before typing in form fields or triggering JavaScript events tied to keyboard targeting.
Instructions
[Agent Browser] Set keyboard focus on an element without clicking. Use for form fields before typing, or to trigger focus-based JS events. Prefer fill() for inputs - it handles focus automatically.
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": {
"selector": "<selector>"
},
"name": "focus"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| selector | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| hints | No | ||
| message | No | ||
| success | No | ||
| suggestions | No |