Skip to main content
Glama

download_compile_output

Destructive

Save a build's compiled PDF or other output file, such as output.log or output.blg, to a local path, with optional build selection and overwrite control.

Instructions

Save a build's compiled PDF, or another output file such as output.log, output.blg, or output.synctex.gz, to a local path on the server's own disk, in one call. file defaults to output.pdf and must be a relative output path without "..". Without buildRef it uses the latest build compile_project made in this server process, else NO_BUILD; a file the build did not produce, an output.blg or output.bbl left over from an earlier build included, is NOT_FOUND, and an expired build is BUILD_NOT_FOUND. The folder must exist. An existing file is replaced only when overwrite is true, else CONFIRMATION_MISMATCH and nothing is downloaded; a replacement is atomic. A .pdf that does not start with %PDF- is PROTOCOL_UNSUPPORTED and nothing is written. Returns the absolute localPath, file, sizeBytes, buildId, and replaced.

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>",
      "localPath": "<localPath>"
    },
    "name": "download_compile_output"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileNoOutput file of the build; defaults to output.pdf
buildRefNoFrom compile_project; defaults to the latest build in this process
localPathYesLocal file to write, for example paper.pdf
overwriteNoReplace localPath if it already exists
projectIdYesOverleaf project ID

Output Schema

NameRequiredDescriptionDefault
fileYes
buildIdYes
replacedYes
localPathYes
sizeBytesYes

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?

Annotations already flag this as destructive and non-idempotent; the description goes well beyond them by explaining that an existing file is replaced only when overwrite is true, that the replacement is atomic, that the folder must pre-exist, and that a non-%PDF- payload is rejected before anything is written. It also enumerates the concrete failure modes (NO_BUILD, NOT_FOUND, BUILD_NOT_FOUND, CONFIRMATION_MISMATCH, PROTOCOL_UNSUPPORTED), which is exactly the behavioral detail an agent needs for a mutating tool.

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 the core action, then packed with constraints and error codes in a single dense paragraph where nearly every clause carries information. The sentences are long and run together slightly, but there is little wasted wording.

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?

Fully adequate for a five-parameter write tool: defaults, path constraints, overwrite gate, atomicity, validation rule, and every error branch are covered. An output schema exists, so the brief return-value listing (localPath, file, sizeBytes, buildId, replaced) is a helpful recap rather than a gap.

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?

With 100% schema coverage the baseline is 3, and the description adds real meaning on top: 'file defaults to output.pdf and must be a relative output path without ".."' and 'localPath on the server's own disk' are constraints the schema does not state. It also clarifies that buildRef comes from compile_project, tying the opaque ID to its producer.

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 and resource: save a build's compiled PDF (or output.log/output.blg/output.synctex.gz) to a local path on the server's own disk in one call. The build-scoped framing plus the 'server's own disk' qualifier distinguishes it from sibling download tools without ambiguity.

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?

Gives clear when-to-use context, including the default file (output.pdf), the default build (latest compile_project build in this process), and the fallback when buildRef is omitted (NO_BUILD). It does not name alternative siblings like download_file or download_project_zip, so the agent must infer those choices, which keeps it short of a 5.

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