Skip to main content
Glama

download_file

Destructive

Download an Overleaf document or binary file to a specified local path, refusing to replace existing files unless overwrite is enabled.

Instructions

Download one Overleaf document or binary file to an explicit local path. Refuses to replace an existing local file unless overwrite is set. The local path is checked before anything is fetched: an existing file without overwrite, or a folder (or a link to one) at localPath, is INVALID_ARGUMENT, a missing parent folder is NOT_FOUND, and a folder that cannot be written is INVALID_ARGUMENT with details.errno. With overwrite, an existing file is replaced atomically, keeping its permissions, so its folder must be writable.

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": {
      "projectId": "<projectId>",
      "filePath": "<filePath>",
      "localPath": "<localPath>"
    },
    "name": "download_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
filePathYesProject-relative path using forward slashes
localPathYes
overwriteNoReplace localPath if it already exists
projectIdYesOverleaf project ID

Output Schema

NameRequiredDescriptionDefault
bytesYes
localPathYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.0

TDQS

A4.6/5.0
Behavior5/5

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

The annotations only declare destructiveHint=true and idempotentHint=false; the description goes far beyond them by disclosing the pre-flight validation order (path is checked before anything is fetched), the specific error codes per failure mode (INVALID_ARGUMENT, NOT_FOUND, details.errno), and the atomic-replace-with-permission-preservation semantics. That is exactly the kind of mutation-safety context an agent needs and that structured fields cannot carry.

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?

Three sentences, front-loaded with purpose before the validation and overwrite details. The error-code enumeration is dense but each clause carries operational information an agent would otherwise have to discover by failing; the only cost is a slightly legalistic reading rhythm.

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 destructive local-filesystem write with an output schema already present, nothing an agent needs is missing: failure modes are named, ordering of checks is stated, and the overwrite contract is fully specified. Return values need not be described because the output schema covers them.

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 75%, and the description compensates well for the weak spots: it explains precisely what overwrite does (atomic replacement that retains file permissions) and enumerates the conditions under which localPath is invalid. projectId and filePath rely on their schema descriptions, so the added meaning is strong but not complete across all four parameters.

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 first sentence states a specific verb (download), a specific resource (one Overleaf document or binary file) and an explicit destination (an explicit local path). The scope word 'one' implicitly separates it from the bulk siblings download_project_zip and download_compile_output, so an agent can tell what class of operation this is without opening the schema.

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 unusually concrete: it says exactly when the call will be refused (existing file without overwrite) and what must be true to succeed (writable parent folder). It does not, however, explicitly route the agent among the sibling download tools or state when not to use this tool in favor of them, which keeps it below a 5.

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