Skip to main content
Glama

Publish a new template version

update_template

Publish a new immutable version of an existing template. Versions are never edited in place: invoice@2 keeps rendering exactly as it did, and anything pinned to it is unaffected. Renders cached against the old version stay valid, and the new version starts with a cold cache. engine, schema, options and example are inherited from the previous version unless you send them, so a source-only change needs only template and source. Free.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
engineNoEngine for the new version. Inherited from the previous version when omitted.
schemaNoJSON Schema for the `data` payload. Inherited from the previous version when omitted — send `{}` only if you really want a version that validates nothing.
sourceYesOne self-contained HTML document with inline CSS and Liquid expressions (`{{ customer.name }}`, `{% for line in line_items %}`). No file includes: everything the render needs must be in this string, or at a public https URL. Two extra filters ship by default: `money` and `date_medium`. For a PDF, use `@page { size: Letter; margin: 18mm }` to control pagination.
exampleNoA payload that renders correctly under the new version. Inherited when omitted.
messageNoChange note for this version, like a commit message.
optionsNoDefault render options. Inherited from the previous version when omitted.
templateYesName of an existing template. A new immutable version is published; earlier versions keep rendering, so anything pinned to `name@2` is unaffected.
descriptionNoReplaces the template description.
expected_pagesNoHow many PDF pages a typical payload renders. Inherited from the previous version when omitted. This is the estimate the free tier and the spend cap are checked against before the render starts, so a template that runs to several pages must say so or a render that cannot fit the allowance will be started and then go over. It is not a limit: the render is billed on the pages it actually produced.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / options / properties / margin / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "properties": {
      -      "bottom": {
      -        "type": "string"
      -      },
      -      "left": {
      -        "type": "string"
      -      },
      -      "right": {
      -        "type": "string"
      -      },
      -      "top": {
      -        "type": "string"
      -      }
      -    },
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "properties": {
      +      "bottom": {
      +        "type": [
      +          "string",
      +          "number"
      +        ]
      +      },
      +      "left": {
      +        "type": [
      +          "string",
      +          "number"
      +        ]
      +      },
      +      "right": {
      +        "type": [
      +          "string",
      +          "number"
      +        ]
      +      },
      +      "top": {
      +        "type": [
      +          "string",
      +          "number"
      +        ]
      +      }
      +    },
      +    "type": "object"
      +  }
      +]
    • changedInput schema / properties / options / properties / margin / description
      Previous value: -"PDF margins, CSS lengths: `18mm`, or per side."New value: +"PDF margins, CSS lengths in `in`, `px`, `cm` or `mm`: `18mm`, or per side. A bare number is px."
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations, the description discloses important side effects: old versions remain unaffected, cached renders stay valid, the new version starts with a cold cache, and engine/schema/options/example are inherited unless sent. It also states that publishing is free, which is useful open-world context. There is no contradiction with 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is four tight sentences with the core purpose first, then behavioral guarantees, then the minimal-invocation rule, then the cost signal. Every sentence earns its place and there is no redundant wording.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 9 parameters and a nested options object, the description plus the fully documented schema covers the publishing workflow, versioning semantics, caching, inheritance, and pricing. The main gap is that it never describes the success return value or how to reference the newly published version, and there is no output schema to fill that in.

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?

With 100% schema coverage, the schema already documents each parameter, so the baseline is 3. The description adds cross-parameter meaning by naming which fields are inherited (`engine`, `schema`, `options`, `example`) and by stating that a source-only change requires only `template` and `source`. This is useful but modest; most per-parameter detail is correctly left to the schema.

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?

The description leads with a specific verb and resource: 'Publish a new immutable version of an existing template.' It further distinguishes the tool from a plain update by explaining versions are never edited in place, and it uses `invoice@2` as a concrete anchor, so an agent can tell this apart from create_template even 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 Guidelines4/5

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

It gives clear context for when the tool applies: publishing a new immutable version rather than editing an existing one, and it tells agents that a source-only change needs only `template` and `source`. It does not explicitly name alternatives like create_template or state when not to use it, so it stops short of full routing guidance.

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.

Resources