Skip to main content
Glama

Drag-drop a local file onto a target

file_drop

Drop a local file onto a non-file-input dropzone by its element ref and absolute path, enabling browser drag-and-drop uploads for custom dropzones.

Instructions

Drop a local file onto a drag-and-drop target identified by ref (from read_page/find, main-frame) — for dropzones that aren't a (use file_upload/upload_image for those). Pass an absolute local path; the browser attaches the real file via the native CDP drag pipeline.

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>",
      "path": "<path>",
      "tabId": "<tabId>"
    },
    "name": "file_drop"
  }
}

Input Schema

NameRequiredDescriptionDefault
refYesDropzone element ref from read_page/find (main-frame)
pathYesAbsolute local file path to drop
tabIdYesTarget tab ID (must be in the MCP group)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.24.1

TDQS

A4.4/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden. It discloses meaningful behavior beyond the name: the real file is attached through the native CDP drag pipeline (not a synthetic event or a path string), and only main-frame dropzones are addressable. It stops short of describing drop side effects (e.g. whether a drop can submit a form or trigger navigation) or failure modes, which keeps it below a 5.

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?

A single compact passage, front-loaded with the core action, then the scope restriction, then the alternative in a parenthetical. Every clause carries information an agent needs to select and invoke the tool; nothing is redundant padding.

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-required-parameter tool with no annotations and no output schema, the description covers purpose, the sibling alternative, and the framing constraint well. The remaining gap is post-invocation behavior: it does not say what a successful drop returns or how drop-induced effects (navigation, form submission, file acceptance) surface, which would matter for an agent verifying the result.

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 ref, path and tabId are already documented in the schema, and the description largely restates them. It does add that ref is main-frame-scoped and that the path must be a real absolute local file, but offers no format examples or constraints beyond what the schema provides, so the baseline 3 applies.

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?

The description opens with a specific verb and resource: 'Drop a local file onto a drag-and-drop target identified by ref'. It immediately bounds the scope with 'main-frame' and names the sibling tools it is not (file_upload/upload_image), so an agent can distinguish it from the input-based upload tools without opening a schema.

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

Usage Guidelines5/5

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

It states the selection condition explicitly: use this for 'dropzones that aren't a <input type=file>' and route to file_upload/upload_image otherwise. It also gives the prerequisite that ref must come from read_page/find and be in the main frame, so there is no guessing about when this tool applies.

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