Skip to main content
Glama
formfeed-dev

formfeed

Official

Read the source of a template

get_template_source
Read-only

Retrieve a template version’s HTML, CSS, settings, data, schema, translations, and checksum before editing; use the checksum as base_checksum when saving changes.

Instructions

Returns what a template version is made of: the body markup (html), css, head, settings (paper, margins, header, footer, fonts), sample data, data sets, data schema, translations and partials, with the version's checksum. Call it before save_template to change a template the user named, and save what you edited with that checksum as base_checksum. Reads the latest version by default, the newest draft a change builds on; published reads what renders use. Word and PowerPoint templates are documents: for them it returns the settings and data, not the document. Read-only and free.

Input Schema

NameRequiredDescriptionDefault
versionNolatest (default), published, a version number or a channel name
templateYesSlug (e.g. invoice) or tpl_ id, as list_templates returns them

Output Schema

NameRequiredDescriptionDefault
cssYes
headYes
htmlYes
i18nYes
versionYes
partialsYes
settingsYes
templateYes
data_setsYes
data_schemaYes
sample_dataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.21

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the readOnlyHint, destructiveHint, and openWorldHint annotations, it discloses important behavior: the full set of returned components, checksum usage for subsequent saves, version resolution semantics, and the Word/PowerPoint limitation. It also notes that the operation is read-only and free.

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 dense but well-structured and front-loaded with what is returned. Every sentence contributes operational information: return contents, save workflow, version semantics, and the document-format caveat.

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?

Given the presence of an output schema, full schema description coverage, and clear read-only annotations, the description is complete enough for an agent to invoke the tool correctly. It covers return scope, version behavior, downstream save workflow, and an important edge case for Word and PowerPoint templates.

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?

The schema fully documents both parameters, so the baseline is 3, but the description adds meaningful semantics for the version parameter: what latest means, what published means, and how draft/build versions are selected. It does not further explain the template slug or tpl_ id beyond the schema, but the added version behavior is valuable.

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 states a specific resource and verb: it returns the source composition of a template version, enumerating body markup, css, head, settings, data, translations, partials, and checksum. This is specific enough to distinguish it from siblings like get_template_schema and list_templates.

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 workflow guidance: call before save_template when editing a user-named template and pass the returned checksum as base_checksum. It also explains version selection behavior for latest, published, version numbers, and channels, though it does not explicitly name alternative read tools such as get_template_schema.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.