Update template
update_templateUpdate a saved template's DSL, name, description, and/or sampleData. Revalidates the DSL when provided. A DSL that differs from the stored one is recorded in the template's revision history (History tab on /templates/:id); sending the same DSL again records nothing, and name, description and sampleData are overwritten without history. For description and sampleData: pass null to clear; omit to leave unchanged. Returns { templateId, name, updatedAt }. Mirrors PUT /api/v1/templates/:id.
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": {
"templateId": "<templateId>"
},
"name": "update_template"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dsl | No | Replacement builder DSL script; it is validated before saving. Omit to keep the current DSL. Up to 512KB. | |
| name | No | New display name. Omit to keep the current name. | |
| sampleData | No | Replacement sample binding data, stored alongside the template and returned by get_template (the web editor loads it into its Render data panel). It does not change what render_template uses without `data`: that is the DSL's own `const sampleData`. `null` clears the stored value; omit to leave it unchanged. | |
| templateId | Yes | Template ID — slug for library rows (e.g. 'invoice-classic') or UUID for user rows. | |
| description | No | New one-sentence summary. Pass `null` to clear the stored value; omit the key entirely to leave it unchanged. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The display name after the update. | |
| updatedAt | Yes | When the template was changed, as a UTC 'YYYY-MM-DD HH:MM:SS' timestamp. | |
| templateId | Yes | Template ID: a slug for library templates, a UUID for your own. |