Skip to main content
Glama

download_file

Click a trigger to capture the downloaded file's path, size, SHA-256, text preview, and response headers; it flags navigation instead of download for precise must-download assertions.

Instructions

Click a trigger and capture the file it downloads: path, size, sha256, text preview, plus the response's content_type and content_disposition. If the click NAVIGATES to the file instead (no Content-Disposition: attachment), the result says navigated_instead=true with the final_url — the precise assertion for "must download, not open" fixes. Falls back to a context refetch (flagged capture_method) when the browser artifact is empty

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": {
      "session_id": "<session_id>",
      "selector": "<selector>"
    },
    "name": "download_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
timeoutNoMax ms to wait for the download to start (default: 30000)
selectorYesCSS selector of the element whose click starts the download
session_idYesSession ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.10.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it discloses the returned fields, the navigated_instead flag with final_url, and the context-refetch fallback flagged via capture_method. It does not state what happens when no download ever starts (timeout/error behavior) or any permission prerequisites, so a small gap remains.

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?

The key claim — capture the downloaded file and its metadata — is front-loaded, with the navigated case and the fallback following in order of importance. The prose is dense and slightly run-on in the enumerations, but nearly every clause conveys behavior an agent needs.

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?

There is no output schema, and the description compensates by enumerating the returned fields and the navigated_instead/capture_method signals, which is exactly what an agent needs to interpret results. Only failure modes (download never starting, invalid selector) are left unaddressed.

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 session_id, selector and timeout are already fully documented in the schema. The description confirms the click-trigger semantics of selector but adds no format, default, or edge-case detail beyond the structured fields, so the baseline of 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 states a specific action and resource: click a trigger element and capture the resulting download, returning path, size, sha256, text preview, content_type and content_disposition. It also carves out a distinct scope versus a plain click by explicitly contrasting 'download' with 'navigates to the file', so an agent can tell it apart from click_element.

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

Usage Guidelines4/5

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

Usage context is clear and even tied to a concrete testing scenario ('must download, not open' fixes), which tells the agent when this tool is the right assertion. What is missing is an explicit alternative or when-not condition — it never names click_element or upload_file, so routing is inferred rather than stated.

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