file_upload
Upload files from this machine to a page's file input by referencing it from a page snapshot. Avoids OS picker by directly setting files, with path and size restrictions enforced.
Instructions
Puts one or more files from this machine into an on the page. Never try to click the input or the button that fronts it: Firefox answers a click with the operating system's own picker window, which sits outside the page where nothing here can reach it. Locate the input with read_page or find instead, then call this tool with the ref it was listed under. All three arguments - paths, ref and tabId - are required. Reading a file is gated: a path is accepted only when it resolves inside an upload root, meaning this session's download folder, the directory the server process was started in, or an absolute path named in the FIREFOX_USE_UPLOAD_ROOTS environment variable (separate several with the platform path separator). Symlinks are followed before that check, so a link parked in a root but aimed outside one is turned down as well, and the refusal lists the roots that would have worked. Chrome instead scopes uploads to whatever the user shared with the conversation; this server has no such notion. One call may carry less than 10 MB in total across every file named. Afterwards the input is read back and the result states how many files it now holds, which is how you catch an input with no multiple attribute keeping just one of several.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | Yes | The id read_page or find printed beside the file input, in the form ref_12. A ref belongs to the snapshot it came from, so read the page again after a navigation or a re-render rather than reusing an older one. | |
| paths | Yes | One absolute path per file, with a leading ~ expanded for you. Folders are turned down; name the files themselves. Each entry has to sit, after symlinks are resolved, in an upload root - this session's download folder, the directory the server was launched from, or an entry of FIREFOX_USE_UPLOAD_ROOTS. Sizes are added up and a total of 10 MB or more fails the call before the page is touched at all. | |
| tabId | Yes | The tab holding that input. Run tabs_context_mcp when you do not already have a live id. There is no per-site approval step as in Chrome - the file lands in the page straight away, in the dedicated Firefox profile this server drives. |