Skip to main content
Glama

create_document_from_template

Fill a data template's placeholder fields to create a document in one step. If a timeout occurs, check list_documents first to avoid duplicate creation.

Instructions

PREFERRED way to create a document: fills a data template's placeholder fields and creates the document in one step. Get field machine names from get_data_template (content_type.fields → lowercase name, spaces to underscores, e.g. "Client Name" → client_name). NOT idempotent: if the call times out, the document may still have been created — list_documents before retrying.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
metaNoOptional document metadata (contract content types: start_date, expiry_date, contract_value)
titleNoOptional title override; defaults to the template's title_template with [Field] placeholders filled
fieldsYesField values keyed by machine name, e.g. {"client_name": "Acme Corp", "effective_date": "2026-08-02"}
data_template_idYesData template id (UUID) — see list_data_templates
Behavior4/5

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

With no annotations, the description carries the full burden and discloses a critical behavioral trait: the tool is NOT idempotent and may have created the document even if the call times out, advising to list_documents before retrying. This is valuable and goes beyond a generic description, but it does not cover other potential behaviors like auth requirements, rate limits, or return format, so it is not a 5.

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 three sentences, each earning its place: the first states the core purpose, the second gives essential field-naming instructions, and the third provides a critical idempotency warning. It is front-loaded with the main purpose and contains no fluff or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a creation tool with 4 parameters, nested objects, and no output schema, the description covers the core workflow: filling placeholders, getting machine names, and cautioning about non-idempotency. It lacks an explicit statement about return values, but given the absence of an output schema and the tool's complexity, it is reasonably complete. It does not fully anticipate all edge cases but is strong overall.

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 coverage is 100%, so the baseline is 3. The description adds meaningful semantics by explaining how to derive field machine names (lowercase, underscores, from get_data_template) and gives a concrete example for fields. This exceeds the schema's generic example, but it does not explain meta or title properties beyond what the schema already provides, so not a 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool creates a document by filling a data template's placeholder fields, naming a specific verb and resource. It positions itself as the 'PREFERRED way' to create a document, which implies distinction from siblings, but it does not explicitly name alternatives like create_document or build_document, so it stops short of a 5.

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 provides clear usage context: it is the preferred one-step template-based creation method, and it gives explicit instructions to obtain field machine names from get_data_template. It also warns about non-idempotency and suggests listing documents before retrying. However, it does not explicitly state when not to use this tool or name alternative tools, missing the 'when-not/alternatives' bar for a 5.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/salsabeeljamal/wraft-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server