Skip to main content
Glama
Antigravity in Chrome MCP Server

Antigravity in Chrome MCP Server

by sxqib

upload_image

Uploads local images or files into a web page's file input or dispatches drag-and-drop file events to a target element or coordinate.

Instructions

Upload a local image or file into a page element (by ref) or dispatch a drag-and-drop file event onto a target coordinate/element.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

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

Input Schema

NameRequiredDescriptionDefault
refNoElement ref ID of the file input or drop target.
tabIdNoTarget tab ID (defaults to active managed tab).
filePathNoAbsolute local path to a file to upload.
filenameNoFilename to assign to the uploaded file (e.g., "screenshot.png").
mimeTypeNoMIME type (e.g., "image/png"). Inferred automatically from extension if omitted.
coordinateNo[x, y] viewport coordinate of a drag-and-drop target.
imageBase64NoBase64-encoded file contents (alternative to filePath).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It does disclose the important trait that the drop path is a synthesized 'drag-and-drop file event' rather than a real user gesture, which hints at framework-dependent reliability, but it omits permissions, whether the page must be focused/active, error behavior for invalid paths, and whether the event triggers native handlers.

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 dense sentence that front-loads the primary action and then splits into the two modes. The nested parentheticals ('(by ref)', '<input type="file">', 'coordinate/element') make it slightly harder to parse but nothing is wasted.

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

Completeness3/5

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

For a 7-parameter tool with no annotations and no output schema, the description covers the two core operating modes but says nothing about outcomes, failure modes, or constraints (e.g., tab must be managed/active, local path must be readable by the host). Adequate but with clear gaps an agent would want filled.

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 ref, filePath, imageBase64, mimeType, coordinate and tabId. The description only adds the framing that 'ref' means a file input or drop target and 'coordinate' means a drop point, which is a modest gloss over already-documented parameters.

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 uses a specific verb ('Upload') and resource ('local image or file') and enumerates the two concrete mechanisms: injection into a page '<input type="file">' by ref, or dispatching a drag-and-drop file event at a coordinate/element. That is specific enough to distinguish it from text-entry tools like fill_form or form_input, though it never names an alternative explicitly.

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 mechanism description (file inputs vs. drop targets), but there is no explicit when-to-use/when-not guidance and no routing to siblings such as fill_form for non-file inputs. It also does not say when the drag-and-drop path is preferable to the ref path.

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