Skip to main content
Glama

drop_file

Simulate file drop operations in Electron apps by dispatching synthetic drag/drop events with file contents for testing and automation purposes.

Instructions

Simulate dropping a file onto a target element by dispatching synthetic drag/drop events with a DataTransfer containing the file contents. Works for apps that read File via web APIs (FileReader, File.text, etc.). Does NOT populate file.path — apps that rely on webUtils.getPathForFile() or legacy file.path must use eval_main to invoke their IPC directly.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYesAbsolute path to a local file.
selectorNoCSS selector of the drop target. Defaults to document.body.
mimeTypeNoMIME type for the synthesized File object. Default text/plain.
Behavior4/5

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

With no annotations provided, the description carries the full burden and does well by disclosing key behavioral traits: it simulates drag/drop events, works with web APIs like FileReader, and has limitations regarding file.path and legacy systems. It doesn't mention error handling or performance aspects, but covers essential operational context.

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?

The description is front-loaded with the core purpose in the first sentence, followed by specific usage contexts and limitations. Every sentence earns its place by providing critical information without redundancy, making it efficient and well-structured.

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?

Given the tool's complexity (simulating drag/drop with file contents), no annotations, and no output schema, the description is mostly complete. It explains what the tool does, when to use it, and key limitations, but could benefit from mentioning potential side effects or error scenarios to be fully comprehensive.

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 fully documents the three parameters. The description adds no additional parameter semantics beyond what's in the schema, such as examples or edge cases, meeting the baseline score of 3 for high schema coverage.

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 clearly states the specific action ('Simulate dropping a file onto a target element') and resource ('file contents'), distinguishing it from siblings like 'set_input_files' or 'drag' by specifying it's for drag/drop events with DataTransfer. It explicitly mentions the web API context and limitations.

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?

The description provides explicit guidance on when to use this tool ('Works for apps that read File via web APIs') and when not to use it ('Does NOT populate file.path — apps that rely on webUtils.getPathForFile() or legacy file.path must use eval_main'), naming an alternative tool ('eval_main') for specific cases.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mesomya/electron-driver'

If you have feedback or need assistance with the MCP directory API, please join our Discord server