Skip to main content
Glama

Upload an image to a file input

upload_image

Upload a local image, or capture and upload a fresh tab screenshot, to a file-input element by ref for automated Chrome form workflows.

Instructions

Upload an image to a by ref. With path: uploads that local image. Without: captures a screenshot of the tab, writes it to a temp PNG, and uploads that. Requires the debugger tier.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "ref": "<ref>",
      "tabId": "<tabId>"
    },
    "name": "upload_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
refYesFile-input element ref from read_page/find
pathNoLocal image path; omit to upload a fresh screenshot
tabIdYesTarget tab ID (must be in the MCP group)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.24.1

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden well: it discloses the implicit screenshot-and-temp-PNG side effect and the debugger-tier requirement, both non-obvious. It stops short of stating what the tool returns or what happens to a previously attached file.

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

Conciseness5/5

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

Front-loaded with the core action, then the two branches, then the prerequisite. Three short sentences with no filler or redundancy.

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 3-parameter tool with full schema coverage and no output schema, the description covers mechanism, mode selection, and access requirements. Only return behavior and failure handling are absent, which are minor for this scope.

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 ref, path, and tabId are already documented in the schema at the same level of detail the description provides. The description's added mode-switching framing is useful but largely restates the `path` schema text ('omit to upload a fresh screenshot'), so baseline 3 applies.

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?

States a specific verb and target: 'Upload an image to a <input type=file> by ref', which tells an agent exactly what element type it operates on. It does not name or distinguish itself from sibling tools like file_upload or file_drop, which likely handle non-image files, leaving that distinction to inference.

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?

It explains the two internal modes (with `path` vs. without, which triggers a screenshot) and the 'Requires the debugger tier' prerequisite, which is real usage context. However, it never says when to pick this over file_upload or file_drop, nor any exclusions or failure conditions.

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