content_load_file
Loads a server-local file into a specified Firefox tab for upload/import without submitting it, returning a file_id and metadata for later script use.
Instructions
Load a server-local file for website uploads/imports; does not submit it.
Waits for downloading to finish, then returns JSON with file_id and metadata. In the SAME tab, use content_execute_script or a predefined script: const file = globalThis.foxmcpFiles.get(file_id); For file inputs, use cloneInto(file, window), the page's window.wrappedJSObject.DataTransfer, and input/change events. Return metadata, not the File. Release: globalThis.foxmcpFiles.delete(file_id). Handle expires five minutes after loading or on navigation; assigned inputs remain valid. Download timeout: 110s. Private tabs unsupported.
profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Regular file on the server's machine; only its basename reaches the tab. | |
| tab_id | Yes | Target tab ID. | |
| mime_type | No | Optional MIME override; otherwise inferred from the filename, falling back to application/octet-stream. | |
| profile_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |