Skip to main content
Glama

Create a template

create_template

Create a new custom PDF template owned by this account: a name, a unique slug, a Handlebars/HTML body, and optional CSS and JSON Schema. The slug is what render_pdf then takes as template. Custom templates are a paid feature — on the Free plan this returns 403 FORBIDDEN before anything is created. The slug must be unique within the account and must not collide with a built-in system slug (invoice, receipt, quote, …); both cases come back 422, and the fix for an already-taken slug is update_template rather than a retry. A brand-new template has no published version, so it renders straight from what you supply here — publish_template only becomes necessary once you start cutting versions. Requires a Kamy API key with the templates:write scope; without a key, returns dashboard setup instructions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cssNoStylesheet applied at render time. Max 1 MB.
htmlYesHandlebars/HTML body of the document. Max 5 MB.
nameYesHuman-readable template name.
slugYesStable identifier the render tools take as `template`. Unique per account, and it may not collide with a built-in system slug (invoice, receipt, quote, …) — both cases are rejected with 422.
tagsNoUp to 10 free-form labels.
schemaNoJSON Schema describing the data payload the template expects. Defaults to {}.
isPublicNoWhen true, other accounts can list and render it. Defaults to false.
descriptionNoWhat this template is for.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations provide readOnlyHint=false, destructiveHint=false. The description adds extensive behavioral context: it's a paid feature (403 on Free), name collision handling (422 with remediation), no published version on first creation, and requires a 'templates:write' scope API key. All of this goes well beyond the annotations alone.

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 a single paragraph of 6 sentences, which is efficient and front-loaded with the core action. Each sentence adds value. It could potentially be split into a short intro plus usage notes, but it's not overly verbose.

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

Completeness5/5

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

The description fully covers the tool's behavior for 8 parameters, 3 required, nested objects (schema), no output schema (not needed since creation returns a version or status). It explains error cases, auth prerequisites, and the versioning lifecycle, making it complete for a complex tool with many siblings.

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?

Schema description coverage is 100%, so baseline is 3. The description adds meaning by explaining the purpose of the slug (what render_pdf uses) and the relationship between create_template and publish_template. However, it doesn't elaborate on all 8 parameters beyond what the schema says; a bit more on 'isPublic' or 'tags' could push this to 5.

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 opens with 'Create a new custom PDF template owned by this account' which is a specific verb and resource. It lists the key fields (name, slug, HTML body, optional CSS and JSON Schema) and explicitly distinguishes the tool's outcome from siblings like update_template and publish_template.

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?

The description gives explicit guidance on when to use this tool versus update_template (alternative for a taken slug) and publish_template (not needed for first version). It also states the Free plan returns 403, and explains error conditions for duplicate/conflicting slugs with specific HTTP codes and remediation.

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