Skip to main content
Glama

upload_file

Upload a file through a provided element.

Instructions

Upload a file through a provided element.

Input 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. Changed1 schema field changedv0.1.1
    • changedInput schema / additionalProperties
      Previous value: -{}New value: +false
  2. First observedv0.1.0

TDQS

C2.6/5.0
Behavior2/5

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

Annotations only supply readOnlyHint=false, so the description must carry the rest of the behavioral burden. It does not mention that this mutates page state, that files must be local to the browser instance (a critical, non-obvious constraint that lives only in the schema), or what happens on failure or with multiple file paths.

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?

A single short sentence with no filler and the action front-loaded. It is efficient, though its brevity reflects omission rather than disciplined editing.

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?

For a mutating browser-automation tool with no output schema and no meaningful annotations, the description is far too thin. An agent gets no guidance on the snapshot/uid workflow, file path semantics, or whether the page changes after upload.

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 description coverage is 100%, so the schema already explains every parameter including the important browser-local path constraint. The description adds no parameter meaning beyond what the schema provides, which lands at the baseline.

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

Purpose3/5

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

The description states a specific verb and resource ("Upload a file") but qualifies it with the vague phrase "through a provided element," which is only explained by the schema. It does nothing to distinguish this from siblings like fill, type_text, or evaluate_script, which an agent might otherwise consider for interacting with file inputs.

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?

There is no indication of when to use this tool versus alternatives, nor any prerequisite context such as needing the uid from a snapshot or requiring the target element to be a file input. The agent must infer the workflow entirely from the schema.

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