输入文本
browser_typeTypes text into a specified textbox or contenteditable element by ref, optionally clearing it first and pressing Enter to submit searches or forms.
Instructions
Type text into a textbox/contenteditable by ref. Use submit:true to press Enter after typing (e.g. submit a search box). Use clear:true to empty the field first.
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": {
"ref": "<ref>",
"text": "<text>"
},
"name": "browser_type"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | Yes | Element ref of the textbox | |
| text | Yes | Text to type | |
| clear | No | Clear the field before typing (default false) | |
| tabId | No | Tab id (default: active tab) | |
| submit | No | Press Enter after typing (default false) | |
| snapshot | No | Return an incremental snapshot after the action (default true) |