browser_upload_file
Upload a local file to a webpage via a hidden or visible file input element, enabling file selection through CSS selectors and absolute file paths.
Instructions
Upload a local file through a element.
Works even when the file input is visually hidden (the common pattern of hiding the native input and styling a custom button over it). The file must exist on the machine running the MCP server.
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>",
"path": "<path>"
},
"name": "browser_upload_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to the local file to upload | |
| selector | Yes | CSS selector of the <input type='file'> element |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |