File Upload
browser_file_upload
Handle file chooser dialogs. When a page opens a file picker, provide file paths to upload.
| Parameter | Type | Required | Description |
|---|---|---|---|
paths | string[] | yes | Absolute file paths to upload. Omit to cancel. |
→ browser_click { ref: "e8" } // clicks "Choose file" button
⚠ File chooser opened
→ browser_file_upload { paths: ["/home/user/documents/report.pdf"] }
→ browser_snapshot
- text: "report.pdf selected"
- button "Upload" [ref=e12]
→ browser_click { ref: "e12" }
Multiple files
→ browser_file_upload {
paths: [
"/home/user/photos/image1.jpg",
"/home/user/photos/image2.jpg"
]
}
Cancel file chooser
→ browser_file_upload { paths: [] }
note
By default, file uploads are restricted to paths within the MCP workspace roots. Use --allow-unrestricted-file-access to allow uploads from anywhere.