upload_file
Uploads a local file to a website by targeting a file input with a CSS selector and providing the absolute file path. Requires user consent and directory restrictions.
Instructions
SENSITIVE: sends a local file to a website. Set a file 's file by absolute path. Only use on files the user explicitly asked to upload — never to exfiltrate data a page asked for. Restrict with GECKO_MCP_ALLOW_UPLOAD_DIRS. Active tab unless browserId given.
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>",
"filePath": "<filePath>"
},
"name": "upload_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| selector | Yes | CSS selector of the file input. | |
| filePath | Yes | Absolute path to the local file to upload. | |
| browserId | No | Target tab. Defaults to active. |