upload_file
Upload files to a web page's file input element by providing absolute file paths, bypassing the operating system file picker.
Instructions
Set file(s) on an element by path, without the OS file picker. Returns {success}. Provide absolute paths that exist on the server. For a picker opened by a button, target the underlying file input's selector.
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": {
"session_id": "<session_id>",
"selector": "<selector>",
"files": "<files>"
},
"name": "upload_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | Yes | File paths to upload | |
| selector | Yes | CSS selector for the file input | |
| session_id | Yes | Session ID |