Skip to main content
Glama
formfeed-dev

formfeed

Official

Save a template as a draft

save_template

Saves template changes as a draft version, so renders keep the published version until a person publishes it; also creates new templates as drafts and returns a review URL.

Instructions

Saves a template as a draft, never published: renders keep using the published version until a person publishes the draft in Formfeed. With template and base_checksum it saves a new version of that template: read it with get_template_source first, change what the user asked for, and pass only the parts you changed (the others are kept from the version you read). With new_template and html it creates a template whose version 1 is the draft. change_note says what changed; the person reads it before publishing. Returns the saved version, the check of the draft with its sample data (fix every error and save again) and review_url, the page where the person reviews and publishes it: hand that to the user. Needs an API key with template:write, or, for a signed-in agent, the person's permission under Account → Connected agents in Formfeed. Word and PowerPoint templates cannot be saved here. Free; a new template counts towards the plan's template limit.

Input Schema

NameRequiredDescriptionDefault
cssNoThe stylesheet; up to 1 MB
headNoExtra markup for <head>, such as font links
htmlNoThe body markup in the template language, without <html>, <head> or <body>; up to 2 MB
i18nNoTranslations: locale → key → text, read by the t helper
partialsNoPartials the template includes (name → source)
settingsNoPaper, margins, header, footer, fonts and the other settings, as get_template_source returns them; replaces the stored settings as a whole
templateNoSlug or tpl_ id of the template to save a new draft of; pass this or new_template
data_setsNoNamed sample data sets besides sample_data (name → data)
change_noteYesWhat the draft changes, in one sentence, shown in the version history
data_schemaNoJSON Schema of data; null removes the stored one
sample_dataNoThe data the editor previews with and the draft is checked with; never used by a render
new_templateNoCreates a template whose version 1 is this draft; pass this and html, or template
base_checksumNoWith template: the checksum get_template_source returned. When someone saved a newer version since, nothing is saved: read the source again and redo the change on it

Output Schema

NameRequiredDescriptionDefault
okYesfalse when the check of the draft found an error; null when the check could not run
nextYes
versionYes
templateYes
review_urlNoThe page in Formfeed where the person reviews and publishes the draft
diagnosticsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.21

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the annotations, it discloses the key behavioral trait that the save is draft-only and does not affect renders until a person publishes. It also covers authorization requirements, the return contents including review_url, the validation loop with sample data, base_checksum conflict behavior, and plan-limit implications.

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 appropriately sized for a 13-parameter mutation tool with nested objects. The most important fact, that this saves a draft and never publishes, is front-loaded, and each subsequent sentence adds operational guidance rather than repeating schema details.

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?

It covers the essential context an agent needs: draft semantics, the two invocation modes, prerequisite read via get_template_source, authorization, unsupported template types, validation expectations, and the review workflow. Although an output schema exists, the description's mention of review_url and validation errors is still useful for agent behavior.

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 already 100%, so the schema carries most parameter documentation. The description still adds meaningful semantics beyond the schema for the central parameters: partial updates keep unchanged parts from the read version, base_checksum detects newer versions, and change_note is read by the person before publishing.

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 verb and resource ('Saves a template as a draft') and immediately distinguishes it from publishing or rendering by noting that renders keep using the published version. It also clearly separates the two save modes: updating an existing template versus creating a new one.

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 explicit workflow guidance: read with get_template_source first, change only what the user asked for, and pass template plus base_checksum for an existing template, or new_template plus html for a new one. It also names a limitation (Word and PowerPoint templates cannot be saved here), which helps the agent avoid misuse.

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