Skip to main content
Glama

Upload Template

upload_template

Upload and store a reusable Carbone template. Once uploaded, use render_document with the returned Template ID to generate documents from it. Supports versioning: multiple versions can live under a single stable Template ID, and rendering by Template ID uses the version with the most recent deployedAt. A result deployedAt of 0 means the version is not explicitly deployed: if another version of the same Template ID is deployed, renders by Template ID keep using that one. Accepted formats: DOCX, XLSX, PPTX, ODT, ODS, ODP, ODG, HTML, XHTML, XML, SVG, IDML, Markdown, TXT, CSV, RTF and PDF (not the legacy binary DOC, XLS or PPT).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoExisting Template ID (64-bit format) to add this upload to its version history. If omitted, a new Template ID is generated. Providing a Version ID (SHA-256) is not allowed and will cause an error.
nameNoDisplay name for the template, max 200 characters (e.g. "Invoice Template", "NDA Contract"). Optional but recommended: list_templates shows it and its search matches it.
tagsNoLabels shown by list_tags and on each list_templates result (e.g. ["sales", "billing", "v2"]). Duplicates are removed and the list is sorted; the whole list is limited to 100 characters (about 8 tags of 9 characters).
sampleNoSample input data attached to the template for testing in Carbone Studio: an array with at most ONE object, whose keys data, complement, translations and enum are all optional. Example: [{ "data": { "name": "Acme" } }].
commentNoFree-text comment to describe the template version or its purpose, max 200 characters.
categoryNoGroup templates into folders/categories, max 200 characters (e.g. "invoices", "legal", "hr").
expireAtNoSchedule deletion at a UTC Unix timestamp (seconds); 0 (default) means the template never expires. After that time it is no longer listed, downloadable or renderable (404), and the file is purged after the retention delay. To remove a template now, use delete_template.
templateYesThe template file. Two input forms are accepted: (1) HTTPS URL — the file is downloaded automatically, e.g. "https://example.com/file.pptx". (2) Base64-encoded string — the raw file content encoded as base64. Local file paths are NOT accepted — this server is reached over HTTP, so a path would resolve on the server's disk rather than yours and is rejected. Upload the bytes as base64, or host the file at a URL. Supported input formats: DOCX, XLSX, PPTX, ODT, ODS, ODP, ODG, HTML, XHTML, XML, SVG, IDML, MD, TXT, CSV, RTF, PDF. Carbone reads XML-based and text-based documents (plus PDF): the legacy binary Office formats DOC, XLS and PPT are rejected as input, although they are valid outputs. Re-save such a file as DOCX, XLSX or PPTX first.
deployedAtNoUTC Unix timestamp (seconds) to set as the deployment time for this version. Carbone uses the version with the most recent deployedAt when rendering via Template ID. Use 42000000000 to deploy immediately (special "NOW" sentinel value). Future values are not allowed.
versioningNoEnable template versioning (default: true). When true, a stable Template ID is generated and multiple versions can be managed under it. When false, behaves as legacy mode and returns only a templateId (SHA-256 hash) and templateExtension.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoStable Template ID (when versioning is enabled).
nameNoTemplate display name, when one was given.
sizeNoTemplate size in bytes.
typeNoDetected template file type.
createdAtNoUTC Unix timestamp (seconds) of the upload.
versionIdNoVersion ID (SHA-256) of this uploaded version.
deployedAtNoUTC Unix timestamp of deployment; 0 means this version is not explicitly deployed.
templateIdNoTemplate ID returned in legacy/non-versioned mode.
templateExtensionNoDetected file extension, e.g. "docx" (legacy/non-versioned mode).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed24 schema fields changed
    • 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 / category / description
      Previous value: -"Group templates into folders/categories (e.g. \"invoices\", \"legal\", \"hr\")."New value: +"Group templates into folders/categories, max 200 characters (e.g. \"invoices\", \"legal\", \"hr\")."
    • addedInput schema / properties / category / maxLength
      Added value: +200
    • changedInput schema / properties / comment / description
      Previous value: -"Free-text comment to describe the template version or its purpose."New value: +"Free-text comment to describe the template version or its purpose, max 200 characters."
    • addedInput schema / properties / comment / maxLength
      Added value: +200
    • changedInput schema / properties / deployedAt / description
      Previous value: -"UTC Unix timestamp (seconds) to set as the deployment time for this version. Carbone uses the version with the most recent deployedAt when rendering via Template ID. Use 42000000000 to deploy immediately (special \"NOW\" sentinel value)."New value: +"UTC Unix timestamp (seconds) to set as the deployment time for this version. Carbone uses the version with the most recent deployedAt when rendering via Template ID. Use 42000000000 to deploy immediately (special \"NOW\" sentinel value). Future values are not allowed."
    • changedInput schema / properties / expireAt / description
      Previous value: -"UTC Unix timestamp (seconds) at which this template will be automatically deleted. Use 42000000000 to delete immediately (special \"NOW\" sentinel value)."New value: +"Schedule deletion at a UTC Unix timestamp (seconds); 0 (default) means the template never expires. After that time it is no longer listed, downloadable or renderable (404), and the file is purged after the retention delay. To remove a template now, use delete_template."
    • changedInput schema / properties / expireAt / minimum
      Previous value: --9007199254740991New value: +0
    • changedInput schema / properties / name / description
      Previous value: -"Display name for the template (e.g. \"Invoice Template\", \"NDA Contract\")."New value: +"Display name for the template, max 200 characters (e.g. \"Invoice Template\", \"NDA Contract\"). Optional but recommended: list_templates shows it and its search matches it."
    • addedInput schema / properties / name / maxLength
      Added value: +200
    • changedInput schema / properties / sample / description
      Previous value: -"Sample input data attached to the template for testing in Carbone Studio. Each item must include data, complement, translations, and enum objects."New value: +"Sample input data attached to the template for testing in Carbone Studio: an array with at most ONE object, whose keys data, complement, translations and enum are all optional. Example: [{ \"data\": { \"name\": \"Acme\" } }]."
    • addedInput schema / properties / sample / items / additionalProperties
      Added value: +false
    • removedInput schema / properties / sample / items / required
      Removed value: -[
      -  "data",
      -  "complement",
      -  "translations",
      -  "enum"
      -]
    • addedInput schema / properties / sample / maxItems
      Added value: +1
    • changedInput schema / properties / tags / description
      Previous value: -"Tags for searchability and filtering (e.g. [\"sales\", \"billing\", \"v2\"])."New value: +"Labels shown by list_tags and on each list_templates result (e.g. [\"sales\", \"billing\", \"v2\"]). Duplicates are removed and the list is sorted; the whole list is limited to 100 characters (about 8 tags of 9 characters)."
    • changedInput schema / properties / template / description
      Previous value: -"The template file. Two input forms are accepted: (1) HTTPS URL — the file is downloaded automatically, e.g. \"https://example.com/file.pptx\". (2) Base64-encoded string — the raw file content encoded as base64. Local file paths are NOT accepted — this server is reached over HTTP, so a path would resolve on the server's disk rather than yours and is rejected. Upload the bytes as base64, or host the file at a URL. Supported formats: DOCX, XLSX, PPTX, ODT, ODS, ODP, ODG, HTML, XHTML, IDML, XML, Markdown (MD), PDF, and more. Full list: https://carbone.io/documentation/developer/http-api/generate-reports.md"New value: +"The template file. Two input forms are accepted: (1) HTTPS URL — the file is downloaded automatically, e.g. \"https://example.com/file.pptx\". (2) Base64-encoded string — the raw file content encoded as base64. Local file paths are NOT accepted — this server is reached over HTTP, so a path would resolve on the server's disk rather than yours and is rejected. Upload the bytes as base64, or host the file at a URL. Supported input formats: DOCX, XLSX, PPTX, ODT, ODS, ODP, ODG, HTML, XHTML, XML, SVG, IDML, MD, TXT, CSV, RTF, PDF. Carbone reads XML-based and text-based documents (plus PDF): the legacy binary Office formats DOC, XLS and PPT are rejected as input, although they are valid outputs. Re-save such a file as DOCX, XLSX or PPTX first."
    • changedInput schema / properties / versioning / description
      Previous value: -"Enable template versioning (default: true). When true, a stable Template ID is generated and multiple versions can be managed under it. When false, behaves as legacy mode and returns only a templateId (SHA-256 hash)."New value: +"Enable template versioning (default: true). When true, a stable Template ID is generated and multiple versions can be managed under it. When false, behaves as legacy mode and returns only a templateId (SHA-256 hash) and templateExtension."
    • changedInput schema / required
      Previous value: -[
      -  "template",
      -  "name"
      -]New value: +[
      +  "template"
      +]
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / properties / createdAt
      Added value: +{
      +  "description": "UTC Unix timestamp (seconds) of the upload.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / deployedAt
      Added value: +{
      +  "description": "UTC Unix timestamp of deployment; 0 means this version is not explicitly deployed.",
      +  "type": "number"
      +}
    • changedOutput schema / properties / name / description
      Previous value: -"Template display name."New value: +"Template display name, when one was given."
    • addedOutput schema / properties / templateExtension
      Added value: +{
      +  "description": "Detected file extension, e.g. \"docx\" (legacy/non-versioned mode).",
      +  "type": "string"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "name"
      -]
  2. Changed1 schema field changed
    • changedInput schema / properties / template / description
      Previous value: -"The template file. Accepts a local file path (e.g. /home/user/invoice.docx), a URL (https://example.com/template.docx), or a base64-encoded string. Supported formats: DOCX, XLSX, PPTX, ODT, ODS, ODP, ODG, HTML, XHTML, IDML, XML, Markdown (MD), PDF, and more. Full list: https://carbone.io/documentation/developer/http-api/generate-reports.md"New value: +"The template file. Two input forms are accepted: (1) HTTPS URL — the file is downloaded automatically, e.g. \"https://example.com/file.pptx\". (2) Base64-encoded string — the raw file content encoded as base64. Local file paths are NOT accepted — this server is reached over HTTP, so a path would resolve on the server's disk rather than yours and is rejected. Upload the bytes as base64, or host the file at a URL. Supported formats: DOCX, XLSX, PPTX, ODT, ODS, ODP, ODG, HTML, XHTML, IDML, XML, Markdown (MD), PDF, and more. Full list: https://carbone.io/documentation/developer/http-api/generate-reports.md"
  3. Changed1 schema field changed
    • changedInput schema / properties / template / description
      Previous value: -"The template file. Accepts a local file path (e.g. /home/user/invoice.docx), a URL (https://example.com/template.docx), or a base64-encoded string. Supported formats: DOCX, XLSX, PPTX, ODT, ODS, ODP, ODG, HTML, XHTML, IDML, XML, Markdown (MD), PDF, and more. Full list: https://carbone.io/documentation/developer/http-api/generate-reports.html#output-file-type"New value: +"The template file. Accepts a local file path (e.g. /home/user/invoice.docx), a URL (https://example.com/template.docx), or a base64-encoded string. Supported formats: DOCX, XLSX, PPTX, ODT, ODS, ODP, ODG, HTML, XHTML, IDML, XML, Markdown (MD), PDF, and more. Full list: https://carbone.io/documentation/developer/http-api/generate-reports.md"
  4. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "id": {
      +      "description": "Stable Template ID (when versioning is enabled).",
      +      "type": "string"
      +    },
      +    "name": {
      +      "description": "Template display name.",
      +      "type": "string"
      +    },
      +    "size": {
      +      "description": "Template size in bytes.",
      +      "type": "number"
      +    },
      +    "templateId": {
      +      "description": "Template ID returned in legacy/non-versioned mode.",
      +      "type": "string"
      +    },
      +    "type": {
      +      "description": "Detected template file type.",
      +      "type": "string"
      +    },
      +    "versionId": {
      +      "description": "Version ID (SHA-256) of this uploaded version.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "name"
      +  ],
      +  "type": "object"
      +}
  5. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations (readOnlyHint=false, idempotentHint=false, destructiveHint=false, openWorldHint=true) cover the safety profile, and the description adds genuinely non-obvious behavior on top: the deployedAt=0 fallback rule where an undeployed version defers to another deployed version under the same Template ID. That deployment-resolution semantics cannot be inferred from the annotations.

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?

Purpose is front-loaded in the first sentence, followed by the routing hint and the versioning rule in a logical order. The long accepted-format enumeration and its near-duplication in the schema's template parameter make the entry denser than necessary.

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?

With a rich 10-parameter schema, full description coverage, and an output schema present, the description need not explain return values. It still covers the key caller-facing facts: the output Template ID, its use in rendering, and the versioning/deployment resolution rule.

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 description coverage is already 100%, so the baseline is 3, but the description contributes meaning beyond it by explaining how the returned Template ID is consumed by render_document and how versioning/redeployment interact with a stable ID. Some overlap exists with the deployedAt and accepted-format text already present in the schema, keeping it short of a 5.

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?

"Upload and store a reusable Carbone template" gives a specific verb and resource, and the follow-on sentence ties it to render_document, cleanly separating it from siblings like update_template_metadata or delete_template. The description also distinguishes the versioning dimension of the resource itself, so an agent knows exactly what this tool creates.

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?

It explicitly states the downstream step ("use render_document with the returned Template ID") and constrains inputs (URL or base64 only, no local paths; legacy binary formats rejected). It does not, however, tell the agent when to prefer a sibling such as update_template_metadata for an already-uploaded template, so the exclusions are only partial.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.