Skip to main content
Glama

upload_file

Set a file on an input[type=file] element from the server's filesystem using DataTransfer. Ideal for testing file uploads without manual selection.

Instructions

Set a file on input[type=file] from the server filesystem via DataTransfer (max 200 MB; over 6 MB it travels in pieces). Keys and credentials (~/.ssh, ~/.aws, ~/.gnupg, .env*, *.pem, .key, id_…) are refused, and a --read-root on the server limits the readable tree: the call fails with an error, nothing is read.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path on the server machine; keys and credentials (~/.ssh, .env, *.pem) refused
tab_idNoTarget tab; omitted = last tab navigated in this session, else the active one
selectorYesThe file input to fill; ">>>" pierces shadow DOM
mime_typeNoDefault: inferred from extension

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.28.0
    • changedInput schema / properties / path / description
      Previous value: -"Absolute path on the server machine"New value: +"Absolute path on the server machine; keys and credentials (~/.ssh, .env, *.pem) refused"
  2. Changed2 schema fields changedv1.10.0
    • addedInput schema / properties / selector / description
      Added value: +"The file input to fill; \">>>\" pierces shadow DOM"
    • addedInput schema / properties / tab_id / description
      Added value: +"Target tab; omitted = last tab navigated in this session, else the active one"
  3. First observedv1.8.0

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnly=false, destructive=false, idempotent=false). It discloses a 200 MB ceiling, chunked transfer above 6 MB, refusal of key/credential paths, the effect of the server's --read-root limit, and that a refused call reads nothing. This is exactly the behavioral context an agent cannot get from structured fields.

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?

Front-loads the core action before pivoting to constraints. Dense and punctuation-heavy, but nearly every clause carries distinct, useful information rather than restating the name.

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

Completeness4/5

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

For a write tool with no output schema, it covers limits, security refusals, and failure behavior well. It stops short of describing success-side effects (e.g. whether change events fire or an existing file is replaced), which is a minor gap.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3. The description adds meaning beyond the schema by explaining the read-root tree restriction that governs the 'path' parameter and the failure mode when it is exceeded, plus the size/chunking behavior of the payload.

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?

States a specific verb and resource: 'Set a file on input[type=file] from the server filesystem via DataTransfer.' This distinguishes it from siblings like fill_form or type_text by naming the exact target element type and the transfer mechanism.

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

Usage Guidelines3/5

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

Usage is implied by the purpose (use this to populate a file input), and the size/credential constraints hint at conditions. However, no alternative is named and there is no explicit when-to-use versus fill_form or type_text guidance, leaving routing to inference.

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