browser_upload_file
Upload one or more files to a file input element in Chrome/Chromium via CDP. Enables AI agents and developers to automate file selection for browser tasks.
Instructions
Upload one or more files to an element via CDP.
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>",
"files": "<files>"
},
"name": "browser_upload_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | Yes | List of absolute file paths to upload | |
| selector | Yes | CSS selector for the file input |