Skip to main content
Glama

Inspect Template

inspect_template
Read-onlyIdempotent

Lists Carbone tags used in a template and returns a sample JSON dataset matching its structure, so you can see what data to provide before rendering a document.

Instructions

List the Carbone tags a template uses and return a sample JSON dataset matching its structure. Call it before render_document when you do not know which data a template expects. Pass templateId (a stored template) or template (local path, HTTPS URL or base64). It counts as one render on the account; {t()} tags are not listed.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "inspect_template"
  }
}

Input Schema

NameRequiredDescriptionDefault
templateNoA template to inspect, not stored. An absolute local path ("/Users/me/report.docx", "~/report.docx"; a bare name like "report.docx" is read as base64), an HTTPS URL, or the file as base64. Formats: DOCX, XLSX, PPTX, ODT, ODS, ODP, ODG, HTML, XHTML, XML, SVG, IDML, MD, TXT, CSV, RTF, PDF; not the legacy binary DOC, XLS or PPT (re-save them as DOCX, XLSX, PPTX). Exclusive with templateId.
templateIdNoTemplate ID (its deployed version) or Version ID, from list_templates. Exclusive with template.

Output Schema

NameRequiredDescriptionDefault
tagsYesThe Carbone tags of the template, as written, e.g. "{d.customer.name}", "{d.items[i].label}", "{c.company}". {t()} translation tags are not listed.
errorNoError reported by Carbone while inspecting; only present when there is one.
sampleYesA sample dataset matching the template structure, with placeholder values: { "data": {...}, "complement": {...} }. Pass sample.data as render_document data, and sample.complement as complement.
signaturesNoSignature fields found in the template; only present when there are any.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.5.1
    • addedInput schema / properties / templateId / maxLength
      Added value: +256
  2. Changed2 schema fields changedv2.2.0
    • changedInput schema / properties / template / description
      Previous value: -"Inline template to inspect, without storing it. Three input forms are accepted: (1) Local file path — absolute, e.g. \"/Users/me/report.docx\" (or \"C:\\Users\\me\\report.docx\" on Windows), or under the home directory, e.g. \"~/report.docx\". A relative path must start with \"./\" or \"../\" and resolves against the server process's working directory, which is rarely yours: prefer an absolute path. A bare file name such as \"report.docx\" is NOT a path: it would be sent as base64 content. (2) HTTPS URL — the file is downloaded automatically, e.g. \"https://example.com/file.pptx\". (3) Base64-encoded string — the raw file content encoded as base64. 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. Mutually exclusive with templateId — provide exactly one, never both."New value: +"A template to inspect, not stored. An absolute local path (\"/Users/me/report.docx\", \"~/report.docx\"; a bare name like \"report.docx\" is read as base64), an HTTPS URL, or the file as base64. Formats: DOCX, XLSX, PPTX, ODT, ODS, ODP, ODG, HTML, XHTML, XML, SVG, IDML, MD, TXT, CSV, RTF, PDF; not the legacy binary DOC, XLS or PPT (re-save them as DOCX, XLSX, PPTX). Exclusive with templateId."
    • changedInput schema / properties / templateId / description
      Previous value: -"The ID of a stored template to inspect. Two ID formats are accepted: (1) Template ID (64-bit) — the deployed version is inspected. (2) Version ID (SHA-256) — that exact version is inspected. Both are returned by upload_template and list_templates. Mutually exclusive with template — provide exactly one, never both."New value: +"Template ID (its deployed version) or Version ID, from list_templates. Exclusive with template."
  3. Addedv2.0.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is covered. The description adds value beyond them by disclosing that the call 'counts as one render on the account' – a billing/quota side effect not visible in annotations – and by flagging that {t()} tags are excluded from results. Return-shape details are handled by the output schema.

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?

Four short sentences, front-loaded with purpose, then usage, then inputs, then caveats – no waste. The parameter sentence adds little beyond the schema, which keeps it just short of a 5.

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 two-parameter read tool with full schema coverage, an output schema, and complete annotations, nothing an agent needs is missing: purpose, when to call, mutually exclusive inputs, cost, and an explicit limitation are all present.

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 both parameters, their exclusivity, and the accepted formats and file types are already fully documented. The description's 'Pass templateId (a stored template) or template (local path, HTTPS URL or base64)' restates the schema rather than adding meaning, so the baseline 3 applies.

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: lists the Carbone tags a template uses and returns a matching sample JSON dataset. That is distinct from render_document, delete_template, and download_template, so an agent can identify it 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 Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says to call it before render_document 'when you do not know which data a template expects', which names the alternative and the condition that selects it. It also discloses a limitation ({t()} tags are not listed) so the agent knows what this tool will not answer.

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