Inspect Template
inspect_templateLists 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
| Name | Required | Description | Default |
|---|---|---|---|
| template | No | 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. | |
| templateId | No | Template ID (its deployed version) or Version ID, from list_templates. Exclusive with template. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tags | Yes | The Carbone tags of the template, as written, e.g. "{d.customer.name}", "{d.items[i].label}", "{c.company}". {t()} translation tags are not listed. | |
| error | No | Error reported by Carbone while inspecting; only present when there is one. | |
| sample | Yes | A sample dataset matching the template structure, with placeholder values: { "data": {...}, "complement": {...} }. Pass sample.data as render_document data, and sample.complement as complement. | |
| signatures | No | Signature fields found in the template; only present when there are any. |