Skip to main content
Glama

Save a captured browser download to a file

download_file

Capture a Twine game's browser download by clicking its button or choosing an existing file, then copy it to a target path.

Instructions

Browser file control for any game: every download is captured into the tool's download folder (see list_downloads). Three modes: (a) pass trigger_text/trigger_ref/trigger_selector to click the game's download button and take that file; (b) pass name or index to take an already-captured file from the folder; (c) pass none of those to take the newest file in the folder. Without path the file stays in the download folder (path = its location); with path (a file or a directory) a copy is placed there too. Returns the path, size and the new observation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoName of an already-captured file from list_downloads (exact, suffix, or unique substring).
pathNoDestination file or directory (default <cwd>/downloads/<name>).
indexNo1-based index from list_downloads (newest first).
formatNoOutput format: "text" (default, human-readable) or "json" (JSON string for programmatic use).
game_idYesSession id returned by open_game.
timeout_msNoHow long to wait for the download after clicking (default 30000).
trigger_refNoRef of the download button (alternative to trigger_text).
trigger_textNoVisible text of the button that starts the download (optional).
trigger_selectorNoCSS selector of the download button (alternative to trigger_text).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.3

TDQS

A4.6/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 largely meets it: it discloses where downloads land, that path produces a copy (not a move), and that it returns path, size, and the new observation. It does not state whether the operation can fail/timeout behavior beyond timeout_ms, or whether re-invoking re-downloads versus reuses a captured file.

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?

Front-loaded with purpose, then organized into labeled modes (a)/(b)/(c), so the reader can parse by branch. It is dense and somewhat run-on, but essentially every sentence earns its place; minor tightening on the path/return sentence would help.

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

Completeness5/5

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

For a 9-parameter, no-output-schema tool, the description supplies the missing return-value summary (path, size, observation) and the mode logic tying the optional parameters together, plus points to list_downloads for name/index sources. Nothing an agent needs to invoke it correctly is absent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the parameter baseline is 3, but the description adds genuine value beyond the schema by explaining how parameters combine into mutually exclusive modes (trigger_* vs name/index vs neither) and clarifying copy semantics of path, which the schema only describes as 'destination'.

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?

States a specific verb+resource ('take/copy a captured browser download to a file') and enumerates three distinct operating modes. It names the sibling it depends on (list_downloads) so the agent can place it in the workflow 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?

Gives explicit when-to-use branches: (a) trigger_* to click and capture, (b) name/index to take an already-captured file, (c) neither to take the newest file. It also states the condition for path (omit to leave in folder, supply to copy out). This is exactly the guidance an agent needs to pick parameters.

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