Skip to main content
Glama

Galley Render

Create a template

create_template

Create a new template at version 1 from an HTML document with Liquid expressions, plus a JSON Schema for its data. Use this when nothing in list_templates fits. The name must be free on this account — publishing a change to an existing template is update_template, not this. Free.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesTemplate name: lowercase letters, digits, dot, dash or underscore, 1-63 characters. Unique per account. Versions are separate — do not put `@1` here.
engineNoRendering engine. `chromium` (default) is full HTML and CSS and is required for PDF. `satori` is a fast PNG path for simple flexbox card layouts — no page breaks, no floats, no external CSS — and costs us less, so prefer it for OG images and social cards.
schemaNoJSON Schema (2020-12) for the `data` payload this template accepts. Strongly recommended: it is what turns a bad payload into a field-level error with a path, an expected type and a working example instead of a blank page. Use `required` and give each property a `description`.
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. It is echoed back in validation errors, so include one.
messageNoChange note for this version, like a commit message.
optionsNoRender options, merged over the template's own defaults. Options are part of the cache key, so two calls that differ only here are two different renders.
descriptionNoOne line on what this template is for. Shown in list_templates.
expected_pagesNoHow many PDF pages a typical payload renders. Default 1. 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. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already convey that this is not read-only and not idempotent. The description adds useful behavioral context beyond them: the tool creates at version 1, requires an unused name, and is not for updating existing templates. 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.

Conciseness4/5

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

The description is tight and front-loaded, with clear selection guidance and no redundant restatement of the title. The trailing 'Free.' is slightly ambiguous and adds only marginal value, keeping it from a perfect score.

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?

Given the 9-parameter nested schema, the description plus the exhaustive schema is sufficient for an agent to select and invoke the tool correctly. The sibling differentiation is handled, and no critical invocation detail appears missing, although the lack of an output schema means response behavior is left unspecified.

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 description coverage is 100%, and the schema provides rich explanations for parameters including engine trade-offs, source expectations, options semantics, and expected_pages. The tool description itself adds little parameter-level detail, which is fine because the schema carries the burden.

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 names a specific verb and resource: 'Create a new template at version 1 from an HTML document with Liquid expressions, plus a JSON Schema for its data.' It also distinguishes itself from siblings by explicitly marking 'update_template' as the alternative for publishing changes to existing templates.

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?

It gives an explicit selection rule: 'Use this when nothing in list_templates fits.' It also states the precondition that the name must be free and the alternative tool to use for existing templates, which fully orients the agent.

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