browser_upload_file
Upload local files to a file input element in the browser using a CSS selector, simulating the user file pick dialog.
Instructions
Put local files into an selected by CSS selector, as if the user picked them in the file dialog (fires change). Mutating. files are absolute paths on the user's machine; the input must already exist in the DOM.
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": {
"tabId": "<tabId>",
"selector": "<selector>",
"files": "<files>"
},
"name": "browser_upload_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | Yes | absolute file paths on the user's machine | |
| tabId | Yes | tab id from browser_tabs_list or browser_tab_create | |
| selector | Yes | CSS selector of the <input type="file"> |