Skip to main content
Glama

upload_file

Upload one or more files through a specified page element by providing its UID and local file paths, enabling file selection and upload actions during browser automation.

Instructions

Upload a file through a provided element.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uidYesThe uid of the file input element or an element that will open file chooser on the page from the page content snapshot
pageIdYesTargets a specific page by ID.
filePathsYesOne or more files paths to upload. File paths have to be local to the browser instance (not the MCP).
includeSnapshotNoWhether to include a snapshot in the response. Default is false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

With only readOnlyHint=false and no description-level detail, the agent gets no information about side effects, whether a file chooser may open, or how multiple files are handled. 'Upload a file through a provided element' states the action but adds no behavioral context beyond the annotation.

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 a single, front-loaded sentence with no filler. It is concise, though arguably too spare to be maximally useful.

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

Completeness2/5

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

This is a mutating browser-automation tool with four parameters and no output schema, but the description leaves the workflow (element targeting, local path requirement, snapshot behavior) to the schema. Some of that is in the schema, yet the overall tool context is under-specified for an agent deciding whether to invoke it.

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

Parameters3/5

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

Schema coverage is 100%, so the schema already documents uid, pageId, filePaths, and includeSnapshot. The description's 'provided element' maps weakly to uid, but it does not add meaning beyond what the schema gives.

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

Purpose4/5

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

The description names a specific verb ('upload') and resource ('a provided element'), which differentiates it from sibling actions like click or fill. It doesn't explicitly contrast with siblings, but the action is clear.

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

Usage Guidelines2/5

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

No guidance is given about when upload_file should be used instead of fill, fill_form, or type_text, nor when a file input vs. file-chooser element is appropriate. The phrase 'provided element' is implied context, not explicit usage direction.

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