Skip to main content
Glama

Get the data schema of a template

get_template_schema
Read-only

Returns the JSON Schema of the data object a template expects and the sample data it was designed with, from its published version, else its latest draft. Call it after list_templates and before render or validate_template, to build data that fits; ad-hoc html has no stored schema to read. When the template stores no schema, one is inferred from the sample data: treat that as a guide, not a contract. Read-only and free; an unknown slug returns an error.

Input Schema

NameRequiredDescriptionDefault
templateYesSlug (e.g. invoice) or tpl_ id, as list_templates returns them

Output Schema

NameRequiredDescriptionDefault
schemaYesJSON Schema of data; inferred from sample_data when none is stored
statusYespublished, or draft when nothing is published yet
versionYesThe version the schema comes from
templateYes
sample_dataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the readOnly annotations it discloses the published-vs-draft fallback, that an inferred schema from sample data is a guide rather than a contract, that the call is free, and that an unknown slug errors. These are behaviors an agent cannot get from the structured fields.

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?

Three tight sentences: what is returned, when to call it, and the edge-case caveat. The return value is front-loaded and no sentence is filler.

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?

An output schema exists, so return shapes need not be spelled out, and the description covers the remaining ambiguities: version resolution, inference fallback quality, and error behavior. Nothing needed to call it correctly is missing.

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 coverage is 100% and the sole `template` parameter already documents slug-or-tpl_ id format. The description adds no parameter-level detail beyond naming the slug context implicitly, so the baseline 3 applies.

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?

States a specific verb and resource: returns the JSON Schema of a template's `data` object plus its sample data. It also pins the resolution rule (published version, else latest draft), which no sibling tool does.

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?

Gives explicit sequencing ('after list_templates and before render or validate_template') and a clear exclusion ('ad-hoc html has no stored schema to read'). The failure case for an unknown slug is also named.

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