Upload file
upload_fileSets one or more files on a file input using absolute paths from the Chrome host, enabling automated form uploads via CDP.
Instructions
Set one or more files on an using absolute paths on the machine running Chrome. Requires CDP and the top frame.
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": {
"files": "<files>"
},
"name": "upload_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | ||
| files | Yes | ||
| tabId | No | ||
| frameId | No | ||
| selector | No |