Skip to main content
Glama

Download Template

download_template

Download the original source file (DOCX, XLSX, PPTX, HTML) of a Carbone template to inspect, edit, or back up. Use a Template ID or Version ID, or set sample to true for the JSON sample dataset.

Instructions

Download the original source file of a stored Carbone template (e.g. the DOCX, XLSX, PPTX, or HTML file that was uploaded). Use this to inspect, edit, or back up a template. Pass a Template ID to download the currently deployed version, or a Version ID to download a specific version. Set sample: true to get the JSON sample dataset stored with the template instead of the template file.

Input Schema

NameRequiredDescriptionDefault
sampleNoIf true, download the JSON SAMPLE DATASET saved with the template (the "sample" array passed to upload_template) instead of the template file, returned as inline JSON text by default, of the form [{ "data": {...}, "complement": {...}, "translations": {...}, "enum": {...} }] (each key optional). Use it to recover the example data a template expects before calling render_document. Errors if the template was uploaded without a sample.
outputPathNoOptional local file path to save the template file to (e.g. "/home/user/out.pdf" or "~/out.pdf"). When set, the file is written to disk and the tool returns the saved path + size instead of embedding the document inline — ideal for large files. The path must not exist yet: an existing file is never overwritten (the call fails and asks for a new file name).
templateIdYesTemplate ID (64-bit) or Version ID (SHA-256) to download. Template ID — downloads the currently deployed version of the template. Version ID — downloads that exact version regardless of deployment status. Both formats are returned by upload_template and list_templates.
asAttachmentNoIf true, return the template as a downloadable file attachment (base64 resource) instead of inline text/image. Useful in HTTP mode where outputPath is unavailable. Default: false. Ignored when outputPath is set.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv2.0.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedInput schema / properties / outputPath / description
      Previous value: -"Optional local file path to save the template file to (e.g. \"/home/user/out.pdf\" or \"~/out.pdf\"). When set, the file is written to disk and the tool returns the saved path + size instead of embedding the document inline — ideal for large files."New value: +"Optional local file path to save the template file to (e.g. \"/home/user/out.pdf\" or \"~/out.pdf\"). When set, the file is written to disk and the tool returns the saved path + size instead of embedding the document inline — ideal for large files. The path must not exist yet: an existing file is never overwritten (the call fails and asks for a new file name)."
    • changedInput schema / properties / sample / description
      Previous value: -"If true, download the JSON SAMPLE DATASET saved with the template (the \"sample\" array passed to upload_template) instead of the template file. Returns JSON of the form [{ \"data\": {...}, \"complement\": {...}, \"translations\": {...}, \"enum\": {...} }]. Use it to recover the example data a template expects — handy before calling render_document against an unfamiliar template. Errors if the template was uploaded without a sample."New value: +"If true, download the JSON SAMPLE DATASET saved with the template (the \"sample\" array passed to upload_template) instead of the template file, returned as inline JSON text by default, of the form [{ \"data\": {...}, \"complement\": {...}, \"translations\": {...}, \"enum\": {...} }] (each key optional). Use it to recover the example data a template expects before calling render_document. Errors if the template was uploaded without a sample."
  2. Changed2 schema fields changedv1.6.0
    • changedInput schema / properties / outputPath / description
      Previous value: -"Optional local file path to save the template file to (e.g. \"/home/user/template.docx\" or \"~/template.docx\"). When set, the file is written to disk and the tool returns the saved path + size instead of embedding the file inline. Local (stdio) mode only; rejected in HTTP mode."New value: +"Optional local file path to save the template file to (e.g. \"/home/user/out.pdf\" or \"~/out.pdf\"). When set, the file is written to disk and the tool returns the saved path + size instead of embedding the document inline — ideal for large files."
    • addedInput schema / properties / sample
      Added value: +{
      +  "description": "If true, download the JSON SAMPLE DATASET saved with the template (the \"sample\" array passed to upload_template) instead of the template file. Returns JSON of the form [{ \"data\": {...}, \"complement\": {...}, \"translations\": {...}, \"enum\": {...} }]. Use it to recover the example data a template expects — handy before calling render_document against an unfamiliar template. Errors if the template was uploaded without a sample.",
      +  "type": "boolean"
      +}
  3. Changed2 schema fields changedv1.2.2
    • addedInput schema / properties / asAttachment
      Added value: +{
      +  "description": "If true, return the template as a downloadable file attachment (base64 resource) instead of inline text/image. Useful in HTTP mode where outputPath is unavailable. Default: false. Ignored when outputPath is set.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / outputPath
      Added value: +{
      +  "description": "Optional local file path to save the template file to (e.g. \"/home/user/template.docx\" or \"~/template.docx\"). When set, the file is written to disk and the tool returns the saved path + size instead of embedding the file inline. Local (stdio) mode only; rejected in HTTP mode.",
      +  "type": "string"
      +}
  4. First observedv1.1.2

TDQS

A4/5.0
Behavior3/5

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

Annotations declare readOnlyHint=false while the description frames this as a passive 'download', which the disk-write behavior under outputPath justifies rather than contradicts. The description notes the no-overwrite guard and the sample error case, but both of those details are already spelled out in the schema, so genuine added behavioral context is limited.

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?

Three sentences, each doing distinct work, with the core action and file types front-loaded before the version-selection and sample-mode refinements.

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?

For a four-parameter tool with no output schema and one required parameter, the description covers the main modes (deployed vs versioned, file vs sample JSON) adequately. It could mention the attachment/inline return trade-off, though the schema handles that thoroughly.

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 the baseline is 3. The description restates the Template ID vs Version ID semantics and the sample flag, but adds no format or syntax detail beyond what the schema already provides.

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 ('Download the original source file of a stored Carbone template') and enumerates the file types involved, so it is immediately distinguishable from siblings like list_templates, render_document, and inspect_template.

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 concrete use cases ('inspect, edit, or back up a template') and clearly routes between Template ID (deployed version) and Version ID (specific version), plus when to use sample:true. It stops short of naming an actual alternative tool for the inspect/back-up workflow.

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