Skip to main content
Glama

Create Document

create_document
Destructive

Create a document and send it for electronic signature. Provide either templateId (from list_templates) or fileId (from upload_file) — not both. When using a template: call get_template to see signee slots and pre-configured signature settings, then get_template_fields for form fields. When using a file: call get_file_fields to discover form fields. Signature placement defaults to new_page unless explicitly configured via signatureBox. The document name is visible to signees and should be a clear, human-readable title, not the uploaded filename. If deriving it from a PDF filename, strip the file extension unless the user explicitly wants to keep it. BEFORE calling this tool, always ask the user: (1) invitation language, (2) optional personal message, (3) signature placement — only when using a file, not a template: new_page (default, recommended) or existing page with coordinates, (4) signature type — only if get_account_capabilities shows non-default types available and no template default applies, (5) AI assistant — only if get_account_capabilities confirms the aiAssistant capability. ALSO when using a file: ask the user whether they want a preview before sending. If yes, save the configuration as a draft via create_draft, share a one-time preview via get_draft_file_url, and send via send_draft after the user confirms — instead of calling create_document directly. Recommend a preview whenever signaturePlacement is 'existing' or when custom coordinates have been used.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesHuman-readable document title visible to signees. If deriving from an uploaded PDF filename, strip the file extension (e.g. 'contract.pdf' → 'contract') unless the user explicitly wants the extension.
fieldsNoForm fields to pre-fill at document creation time. This is the preferred way to fill fields — always use this when you have the values, rather than set_document_field_values after creation.
fileIdNoFile ID from upload_file. Required if templateId is not provided.
userIdNoUser ID to assign as document owner. Defaults to the authenticated user.
languageNoLanguage for the signing invitation
templateIdNoTemplate ID from list_templates. Required if fileId is not provided.
aiAssistantNoOptional AI assistant that helps signees while reviewing the document. Requires the aiAssistant capability.
signeeDetailsYesList of signees. At least 1 is always required. The number of signees should match what the template expects — call get_template first to see how many signee slots it defines. The user decides the final count; some templates are pre-configured for a specific number.
sharingSettingNoWhether the document is private or shared with other users on the account
personalMessageNoOptional personal message included in the signing invitation. Maximum 500 characters.
enableSigningOrderNoEnable sequential signing order (default false)
fieldsReadonlyModeNoAlways set to 'filled' when providing field values — this locks pre-filled fields so signers cannot change them. Options: keepOriginal (default — no locking), filled (pre-filled fields become read-only), all (all fields become read-only).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false and destructiveHint=true, so the description inherits a mutation/send profile. It adds context beyond annotations: the document name is visible to signees, signature placement defaults to new_page, and preview is recommended for risky placement. It could explicitly state that sending is immediate and irreversible, but the workflow warning about preview conveys it without contradiction.

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?

The description is long, but every block earns its place for a tool with 12 parameters and branching orchestration. It is front-loaded with the core action, then provides clear mandatory pre-call questions and alternate paths. It could be tightened slightly, but it is dense, not redundant.

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 complex tool with nested objects and no output schema, the description covers the full decision tree: template vs file, preview vs direct send, questions to ask, capability gates, and parameter origins. The only minor gap is not explicitly describing the return value, though the action 'create and send' strongly implies the outcome.

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 meaningfully adds cross-tool semantics: templateId comes from list_templates, fileId from upload_file, field names from get_template_fields/get_file_fields, and capabilities from get_account_capabilities. It also clarifies the mutually exclusive templateId/fileId relationship beyond raw schema fields.

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 opens with a specific action and resource: 'Create a document and send it for electronic signature.' It clearly distinguishes this from sibling tools like create_draft and upload_file, and highlights the template/file source trade-off. An agent can immediately tell this is the direct-send creation tool.

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 when-to-use vs alternatives: use create_draft/get_draft_file_url/send_draft when a preview is needed; use get_template and get_template_fields when using a template; use get_file_fields when using a file. It also requires querying the user for specific preconditions and lists conditions with their dependencies.

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