Skip to main content
Glama

Create template from scratch

create-template-from-scratch

Create a new empty template with editable ProseMirror content.

Use this tool when:

  • The user wants to start building a new template from scratch (not from an existing PDF or template)

The new template is created empty and its content is authored in a later step. The body references parties, dynamic fields and signature blocks by ref_uuid, so those have to exist before the content can point at them. Build the template in this order:

  1. create-template-party for each contracting party.

  2. create-template-signature-block for each party that signs.

  3. create-template-dynamic-field for every value that varies per document - dates, amounts, notice periods, payment terms. A party's name or address is never one of them: both live on the party record and the content renders them from there.

  4. replace-template-content once, with a body that references all of them by their ref_uuids and wraps each clause in an ordered list node so fynk numbers it.

Authoring the content first and adding the parties, fields and signature blocks afterwards forces a second, destructive rewrite of the whole body to weave the references in, so plan them up front. This applies just as much when the content is derived from a source document such as a PDF: every filled-in blank in the source is a dynamic field unless it holds party identity, and its signature lines are signature blocks.

The locale defines the template's content language and default number formats. Never ask the user for it - a BCP 47 tag is not something they can be expected to know. Infer it from the conversation, e.g. the language the content is to be written in or a country or jurisdiction the user names, and otherwise omit it, which falls back to the account's locale.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesThe name of the new template
localeNoBCP 47 locale tag defining the template content language and default number formats (e.g. "de-AT"). Never ask the user for this tag: infer it from the conversation, or omit it to use the account locale.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoURL to open the template in fynk. Only present when your user has template editing permission
nameNoName of the template
tagsNoThe tags on the template. Tags are the account's own classification labels (e.g. relationship type, commercial significance, region), so they show which categories this account uses and can be filtered on with filter_tags. Only present when the 'tags' section is requested via the include parameter.
uuidNoUnique identifier for the template. Do not show to the user unless they ask for it
teamsNoThe teams the template is assigned to. Only present when the 'teams' section is requested via the include parameter.
localeNoLocale code, e.g. en-GB, de-AT. Prefer describing the locale in natural language (e.g. 'British English') rather than showing the raw code.
partiesNoThe contracting entities the template defines. Only present when the 'parties' section is requested via the include parameter.
publishedNoIndicates if the template is published (true) or a draft (false). Only published templates can be used by users without template management permission
conditionsNoThe template's conditions: rules over its dynamic fields deciding whether a passage of the template applies, and whether each currently holds. Use them to explain why a clause is or is not part of the template, and what would have to change to flip it. Only present when the 'conditions' section is requested via the include parameter.
created_atNoWhen the template was created. Only present when the 'timestamps' section is requested via the include parameter.
updated_atNoWhen the template was last updated. Only present when the 'timestamps' section is requested via the include parameter.
archived_atNoWhen the template was archived. Absent when the template is not archived. Only present when the 'timestamps' section is requested via the include parameter.
descriptionNoDescription of the template. Absent when the template has none. Only present when the 'details' section is requested via the include parameter.
signatoriesNoThe individual people who sign documents created from this template. Distinct from parties: a signatory often signs on behalf of a party (e.g. a business), so a person may be a signatory without appearing as a party. Only present when the 'signatories' section is requested via the include parameter.
_entity_typeNoOnly relevant for tooling. Do not show to the user
document_typeNoIf present, indicates what kind of document this template creates. Absent when the template has no type assigned
dynamic_fieldsNoThe template's dynamic fields and their values. Only present when the 'dynamic_fields' section is requested via the include parameter.
signature_typeNoThe eIDAS assurance level that will be used when signing documents created from this template. Absent when none has been chosen. Only present when the 'signing_settings' section is requested via the include parameter.
metadata_valuesNoThe template's metadata fields and their values. Only present when the 'metadata_values' section is requested via the include parameter.
signature_blocksNoThe places in the template that are signed. A block is bound either to a single signatory or to a party, in which case every signatory of that party signs it. Only present when the 'signature_blocks' section is requested via the include parameter.
sequential_signingNoWhether signatories must sign in a specific order. Only present when the 'signing_settings' section is requested via the include parameter.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only tell us this writes and is non-destructive. The description adds substantial behavioral context: the template is created empty with content authored later, ref_uuid references must pre-exist, and the key warning that authoring content first forces a destructive rewrite. This is exactly the extra context the annotations cannot carry.

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?

Front-loaded with the core purpose and trigger, then uses a numbered list for the workflow, so it is easy to scan. It is long for a two-parameter tool and the dynamic-field/party explanation borders on didactic, but nearly every sentence carries decision-relevant guidance.

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 values need no explanation. The description covers purpose, when-to-use, sibling sequencing, reference prerequisites, the destructive-rewrite pitfall, and locale inference/fallback—more than enough for an agent to call this correctly.

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%, so both parameters are already documented, and the description's locale guidance largely restates the schema's own text. The ordering instructions don't map to any input parameter. Baseline 3 is appropriate when the schema does the heavy lifting.

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 ("Create a new empty template with editable ProseMirror content") and immediately scopes it against siblings: "not from an existing PDF or template." An agent can distinguish it from create-document-from-scratch or duplicate-template without reading any schema.

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?

Provides an explicit "Use this tool when" trigger plus a full when-not clause. It goes further and prescribes the correct sibling call order (party, signature block, dynamic field, then replace-template-content), which is actionable routing guidance.

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