Read the source of a template
get_template_sourceReturns what a template version is made of: the body markup (html), css, head, settings (paper, margins, header, footer, fonts), sample data, data sets, data schema, translations and partials, with the version's checksum. Call it before save_template to change a template the user named, and save what you edited with that checksum as base_checksum. Reads the latest version by default, the newest draft a change builds on; published reads what renders use. Word and PowerPoint templates are documents: for them it returns the settings and data, not the document. Read-only and free.
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": {
"template": "<template>"
},
"name": "get_template_source"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| version | No | latest (default), published, a version number or a channel name | |
| template | Yes | Slug (e.g. invoice) or tpl_ id, as list_templates returns them |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| css | Yes | ||
| head | Yes | ||
| html | Yes | ||
| i18n | Yes | ||
| version | Yes | ||
| partials | Yes | ||
| settings | Yes | ||
| template | Yes | ||
| data_sets | Yes | ||
| data_schema | Yes | ||
| sample_data | Yes |