ui_upload_file
ui_upload_fileUploads the built-in default_draft.png test file to the file input or file-chooser trigger matching a CSS selector, enabling browser upload testing.
Instructions
Upload the built-in test file default_draft.png (a tiny PNG) to the single element matching the selector: an input[type=file] (hidden ones work), or a button/label whose click opens the file chooser. Takes no path: this is the only file it can ever upload. If the input's accept excludes images the response says so. Selectors containing "nth=" are positional: call ui_get_page_state again after the page changes before reusing them.
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>"
},
"name": "ui_upload_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| selector | Yes | CSS selector, or the `selector` value of an element from ui_get_page_state, passed unchanged | |
| session_id | No | Which open session to act on, as returned by ui_start_session. Optional with one open session; required when several are open. |