Skip to main content
Glama

Wait For Download

wait_for_download

Waits for a new file in a download directory, then returns its path and size once the file stops growing, so you can process it only after download completion.

Instructions

Wait for new file in dir, return path once size stable. Pair w/ setup_downloads.

Ex: wait_for_download('t0', '/tmp/dl', 30) → {"path":"/tmp/dl/file.pdf","size_bytes":102400,"name":"file.pdf"}

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": {
      "tab_id": "<tab_id>",
      "download_dir": "<download_dir>"
    },
    "name": "wait_for_download"
  }
}

Input Schema

NameRequiredDescriptionDefault
tab_idYes
min_bytesNo
timeout_sNo
download_dirYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It does disclose the central mechanism (poll until file size is stable) and shows the return shape with path, size_bytes, and name, which is real behavioral content. It omits the critical edge case for a waiting tool: what happens when timeout_s elapses with no file, and whether min_bytes acts as a filter or a hard gate.

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?

Two short lines: the core behavior is front-loaded, the setup dependency follows, and the example conveys argument order and return payload with no filler.

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?

An output schema exists, so return values needn't be explained, and the example covers them anyway. What's missing is timeout and failure semantics plus any explanation of tab_id and min_bytes. For a four-parameter blocking wait with zero annotation coverage and zero schema descriptions, the definition is workable but leaves the agent guessing on the failure path.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate and only partly does. The example maps positionally onto tab_id, download_dir, and timeout_s, but none of them are explained in prose, and min_bytes is never mentioned at all despite being the stability threshold most likely to be misconfigured.

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?

States a specific verb and resource: waits for a new file in a directory and returns the path once the size stabilizes. That scope clearly separates it from generic waiters like wait_for and wait_for_text. It stops short of explicitly naming those siblings as alternatives, but the pairing hint with setup_downloads signals its niche.

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?

"Pair w/ `setup_downloads`" implies the correct setup precondition and the example shows a concrete call sequence. There is no guidance on when not to use it, what to do on timeout, or whether it blocks the tab, so usage is implied rather than spelled out.

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