Skip to main content
Glama

Create document from template

create-document-from-template
Destructive

Create a new document from a template, optionally pre-filling parties, signatories, and dynamic fields, and optionally starting the signing process immediately.

Use this tool when:

  • The user wants to generate a document based on an existing template

It is usually helpful to call get-template-info with include=["parties", "signatories", "dynamic_fields"] first to discover the template's parties, signatories, and dynamic fields so that the parties, signatories, and dynamic_field_values arguments can be populated correctly.

When completing dynamic fields, take note of the field's type when constructing the value. These are the rules to use when constructing the value string:

  • number: the numeric value in a string, using '.' as the decimal separator -> "1234.56"

  • currency: concatenate the ISO currency code and the numeric value with a ';' -> "EUR;1000.10" (for one thousand Euro and ten cents)

  • currency_duration: same as currency, but append another ';' followed by either monthly or yearly -> "EUR;1000.10;monthly" / "USD;1000.10;yearly"

  • select: one of the options from the field's select_values list -> "red"

  • multi_select: an array of the selected values in the values field -> ["red", "blue"]

  • bool: either of the strings "true" (displayed to the user as "Yes") or "false" (displayed to the user as "No") -> "true" / "false"

  • duration: a PHP-compatible duration specification -> "P6D" (6 days), "P2W" (2 weeks), "PT12H" (12 hours)

  • date: the date in the format "YYYY-MM-DD" -> "2026-12-31"

  • email, text, textarea, or any type not listed above: a string -> "test@example.com"

Setting start_signing=true will move the new document straight into the signing stage and invite the signatories to sign it; this fails if any required information (party data, mandatory dynamic field values, signature blocks) is missing.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "template_uuid": "<template_uuid>"
    },
    "name": "create-document-from-template"
  }
}

Input Schema

NameRequiredDescriptionDefault
partiesNoSpecifics of the parties involved in the document, additional to any information from the template.
signatoriesNoThe specific people who will sign the document
document_nameNoThe name of the new document. If omitted, the name of the template will be used
start_signingNoWhether to immediately start the signing process and invite the signatories to sign the document. This may fail if not all party or signatory data is completed, or mandatory dynamic fields do not have values
template_uuidYesUUID of the template to create the document from. Must be one of the template UUIDs returned by list-templates
dynamic_field_valuesNoValues for the template's dynamic fields. Signing can only start when all mandatory dynamic fields from the template have values provided.

Output Schema

NameRequiredDescriptionDefault
urlNoURL to open the document in fynk
nameNoName of the document
tagsNoThe tags on the document. 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.
uuidNoUnique identifier for the document. Do not show to the user unless they ask for it
stageNoWhat stage the document is in currently
teamsNoThe teams the document is assigned to.
localeNoLocale code, e.g. en-GB, de-AT. Absent when the document has none set. Prefer describing the locale in natural language (e.g. 'British English') rather than showing the raw code.
originNoHow the document was created.
partiesNoThe contracting entities on the document.
conditionsNoThe document's conditions: rules over its dynamic fields deciding whether a passage of the document applies, and whether each currently holds. Use them to explain why a clause is or is not part of the document, and what would have to change to flip it.
created_atNoWhen the document was created.
updated_atNoWhen the document was last updated.
archived_atNoWhen the document was archived. Absent when the document is not archived.
attachmentsNoThe files attached to the document. Attachments are part of the document itself and visible to external parties.
signatoriesNoThe individual people who sign the document. 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.
_entity_typeNoOnly relevant for tooling. Do not show to the user
stored_filesNoThe files in the document's internal file storage, as opposed to its attachments. It includes files uploaded in the document's comments. The app shows these files as "Internal file storage": call them that when talking to the user, never "stored files".
summary_textNoA summary of the document content. Absent when the document has no summary.
document_typeNoIf present, indicates what kind of document this is. Absent when the document has no type assigned
dynamic_fieldsNoThe document's dynamic fields and their values.
signature_typeNoeIDAS assurance level used when signing the document. Absent when none has been chosen.
workflow_stateNoGives an indication of which stage transitions, etc are possible to perform on this document. This object is technical state, not display content: when relaying it to the user, always render it as natural-language prose and never echo raw field names or snake_case values (e.g. say 'signing cannot be started yet because not every signature block has been assigned to a signatory' instead of mentioning 'can_start_signing' or 'signature_block_signatory').
metadata_valuesNoThe document's metadata fields and their values.
signature_blocksNoThe places in the document 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. Every signatory needs a block covering them before signing can be started.
sequential_signingNoWhen true, signatories sign one at a time, in ascending order of their signing_order.
source_template_uuidNoUUID of the template the document was created from. Absent when it was not created from a template.
external_signatory_invitation_messageNoText shown in the email inviting external signatories to sign. Absent when no message is set.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedOutput schema / properties / attachments
      Added value: +{
      +  "description": "The files attached to the document. Attachments are part of the document itself and visible to external parties.",
      +  "items": {
      +    "properties": {
      +      "_entity_type": {
      +        "description": "Only relevant for tooling. Do not show to the user",
      +        "enum": [
      +          "attachment"
      +        ],
      +        "type": "string"
      +      },
      +      "file_size": {
      +        "description": "Size of the file in bytes. Use file_size_display when telling the user the size",
      +        "type": "integer"
      +      },
      +      "file_size_display": {
      +        "description": "Size of the file formatted for display, e.g. \"2.4 MB\"",
      +        "type": "string"
      +      },
      +      "filename": {
      +        "description": "Name of the file",
      +        "type": "string"
      +      },
      +      "sha256": {
      +        "description": "SHA-256 digest of the file's bytes, as lowercase hex. Equal digests mean byte-identical files. Do not show to the user unless they ask for it",
      +        "type": "string"
      +      },
      +      "uuid": {
      +        "description": "Identifier for the attachment. Do not show to the user unless they ask for it",
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / stored_files
      Added value: +{
      +  "description": "The files in the document's internal file storage, as opposed to its attachments. It includes files uploaded in the document's comments. The app shows these files as \"Internal file storage\": call them that when talking to the user, never \"stored files\".",
      +  "items": {
      +    "properties": {
      +      "_entity_type": {
      +        "description": "Only relevant for tooling. Do not show to the user",
      +        "enum": [
      +          "stored_file"
      +        ],
      +        "type": "string"
      +      },
      +      "file_size": {
      +        "description": "Size of the file in bytes. Use file_size_display when telling the user the size",
      +        "type": "integer"
      +      },
      +      "file_size_display": {
      +        "description": "Size of the file formatted for display, e.g. \"2.4 MB\"",
      +        "type": "string"
      +      },
      +      "filename": {
      +        "description": "Name of the file",
      +        "type": "string"
      +      },
      +      "sha256": {
      +        "description": "SHA-256 digest of the file's bytes, as lowercase hex. Equal digests mean byte-identical files. Do not show to the user unless they ask for it",
      +        "type": "string"
      +      },
      +      "uuid": {
      +        "description": "Identifier for the stored file. Do not show to the user unless they ask for it",
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / properties / workflow_state / properties / stage_transitions / properties / done / properties / blockers / items / properties / records / items / properties / _entity_type / enum
      Previous value: -[
      -  "account",
      -  "account_party",
      -  "account_profile",
      -  "account_user",
      -  "automation",
      -  "condition",
      -  "custom_widget",
      -  "dashboard",
      -  "document",
      -  "document_type",
      -  "document_user",
      -  "document_user_suggestion",
      -  "dynamic_field",
      -  "import",
      -  "metadata",
      -  "metadata_value",
      -  "party",
      -  "party_suggestion",
      -  "playbook",
      -  "signature_block",
      -  "stored_file",
      -  "tag",
      -  "team",
      -  "template",
      -  "user"
      -]New value: +[
      +  "account",
      +  "account_party",
      +  "account_profile",
      +  "account_user",
      +  "attachment",
      +  "automation",
      +  "condition",
      +  "custom_widget",
      +  "dashboard",
      +  "document",
      +  "document_type",
      +  "document_user",
      +  "document_user_suggestion",
      +  "dynamic_field",
      +  "import",
      +  "metadata",
      +  "metadata_value",
      +  "party",
      +  "party_suggestion",
      +  "playbook",
      +  "signature_block",
      +  "stored_file",
      +  "tag",
      +  "team",
      +  "template",
      +  "user"
      +]
    • changedOutput schema / properties / workflow_state / properties / stage_transitions / properties / review / properties / blockers / items / properties / records / items / properties / _entity_type / enum
      Previous value: -[
      -  "account",
      -  "account_party",
      -  "account_profile",
      -  "account_user",
      -  "automation",
      -  "condition",
      -  "custom_widget",
      -  "dashboard",
      -  "document",
      -  "document_type",
      -  "document_user",
      -  "document_user_suggestion",
      -  "dynamic_field",
      -  "import",
      -  "metadata",
      -  "metadata_value",
      -  "party",
      -  "party_suggestion",
      -  "playbook",
      -  "signature_block",
      -  "stored_file",
      -  "tag",
      -  "team",
      -  "template",
      -  "user"
      -]New value: +[
      +  "account",
      +  "account_party",
      +  "account_profile",
      +  "account_user",
      +  "attachment",
      +  "automation",
      +  "condition",
      +  "custom_widget",
      +  "dashboard",
      +  "document",
      +  "document_type",
      +  "document_user",
      +  "document_user_suggestion",
      +  "dynamic_field",
      +  "import",
      +  "metadata",
      +  "metadata_value",
      +  "party",
      +  "party_suggestion",
      +  "playbook",
      +  "signature_block",
      +  "stored_file",
      +  "tag",
      +  "team",
      +  "template",
      +  "user"
      +]
    • changedOutput schema / properties / workflow_state / properties / stage_transitions / properties / signing / properties / blockers / items / properties / records / items / properties / _entity_type / enum
      Previous value: -[
      -  "account",
      -  "account_party",
      -  "account_profile",
      -  "account_user",
      -  "automation",
      -  "condition",
      -  "custom_widget",
      -  "dashboard",
      -  "document",
      -  "document_type",
      -  "document_user",
      -  "document_user_suggestion",
      -  "dynamic_field",
      -  "import",
      -  "metadata",
      -  "metadata_value",
      -  "party",
      -  "party_suggestion",
      -  "playbook",
      -  "signature_block",
      -  "stored_file",
      -  "tag",
      -  "team",
      -  "template",
      -  "user"
      -]New value: +[
      +  "account",
      +  "account_party",
      +  "account_profile",
      +  "account_user",
      +  "attachment",
      +  "automation",
      +  "condition",
      +  "custom_widget",
      +  "dashboard",
      +  "document",
      +  "document_type",
      +  "document_user",
      +  "document_user_suggestion",
      +  "dynamic_field",
      +  "import",
      +  "metadata",
      +  "metadata_value",
      +  "party",
      +  "party_suggestion",
      +  "playbook",
      +  "signature_block",
      +  "stored_file",
      +  "tag",
      +  "team",
      +  "template",
      +  "user"
      +]
  2. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare this is a non-read-only, non-idempotent, destructive, open-world mutation. The description adds useful behavioral detail: start_signing moves the document straight into the signing stage, invites signatories, and fails if required party data, mandatory dynamic fields, or signature blocks are missing. It does not discuss permissions, rate limits, or duplicate-creation risks on retry, so it is strong but not exhaustive.

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 front-loaded with purpose and usage, then structured into prerequisite guidance, dynamic-field value rules, and start_signing caveats. Despite its length, each section addresses a distinct agent need and the list formatting makes the complex formatting rules easy to apply.

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?

For a six-parameter creation tool with nested party, signatory, and dynamic-field inputs, the description covers when to use it, what to discover first, how to format values, and the side effects and failure conditions of start_signing. Return values are covered by the output schema, so no major contextual gap remains.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Although schema coverage is already 100%, the description adds critical semantics beyond the schema. It explains how to discover template parties, signatories, and dynamic fields, and gives type-specific construction rules for dynamic field values such as number, currency, currency_duration, select, multi_select, bool, duration, and date. This materially reduces incorrect invocations.

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 first sentence states a specific verb ('Create'), resource ('new document'), and source ('from a template'), plus optional pre-filling and immediate signing. This clearly distinguishes it from siblings such as create-document-from-scratch and create-document-from-pdf-upload by making the template the source.

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?

The description explicitly says to use this tool when the user wants to generate a document based on an existing template. It also advises calling get-template-info first with include=["parties", "signatories", "dynamic_fields"] to populate arguments correctly. It does not explicitly name when-not-to-use cases or alternative create tools, so it falls short of a full 5.

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