Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
refYesThe 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.
pathsYesOne 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.
tabIdYesThe 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full responsibility and does an excellent job. It discloses critical behaviors: path restrictions based on upload roots, symlink resolution, total size limit of 10 MB, read-back verification, and the lack of per-site approval (unlike Chrome). It also warns about Firefox's native picker opening on click. This is exceptionally transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but information-dense. Every sentence carries a distinct operational point—caveats, prerequisites, constraints, verification—so the length is justified. It is structured as flowing prose rather than bullet points, which is acceptable given the density of important behavioral warnings. A slight trim could make it more scannable, but it is not redundant.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is complex—file path restrictions, symlink behavior, size limits, ref lifecycle, and cross-browser differences—and the description covers all of it. It even explains the output (the input is read back and the result states file count) despite having no output schema. It provides enough context for an agent to use the tool correctly without needing additional external documentation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already covers all three parameters with detailed descriptions (100% coverage), so the baseline is 3. The tool description goes beyond the schema by explaining the semantic implications: ref belongs to a snapshot and becomes stale after navigation, paths cannot be folders and must resolve to upload roots, and tabId requires a live tab with no approval step. This adds meaningful context beyond the parameter descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: putting files from the machine into a file input on the page. It distinguishes itself from sibling tools by explicitly directing users away from clicking and toward read_page/find for locating the input, and by contrasting with Chrome's file-sharing model.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It provides explicit when-to-use guidance: never click the input, use read_page or find to get the ref, and call this tool with all three required arguments. It also explains when to use tabs_context_mcp for tabId and how to verify success by reading back the input's file count. It names alternatives (read_page, find, tabs_context_mcp) and conditions, leaving no ambiguity.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.