Skip to main content
Glama

document_create

Create a SignWell draft document from uploaded files, plain text, or Markdown, add recipients, and return an editor link to place signature fields.

Instructions

Create a SignWell document (always created as a draft).

CRITICAL RULES:

  • Do NOT read, parse, extract, or verify file contents before uploading. The user already knows what is in the file.

  • Do NOT convert files between formats (e.g. do NOT convert .docx to .pdf). SignWell handles conversion automatically.

  • The user will place signature fields in the SignWell editor. Just upload the file and return the editor link.

SUPPORTED FILE TYPES: .pdf, .doc, .docx, .pages, .ppt, .pptx, .key, .xls, .xlsx, .numbers, .jpg, .jpeg, .png, .tiff, .tif, .webp, .html, .htm

WORKFLOW FOR USER'S EXISTING FILES:

  1. file_store (call with NO arguments to open native file picker) → returns file_token

  2. document_create (pass file_token in files array) → creates draft, returns editor_url

WORKFLOW FOR CLAUDE-GENERATED FILES:

  1. document_create with content_text directly (RECOMMENDED) → MCP server converts to DOCX automatically Pass plain text or Markdown as content_text. The server generates a DOCX file without base64 overhead.

  2. document_create with file_base64 directly (skip file_store) → creates draft, returns editor_url Do NOT write the file to disk and pass a file_path — sandbox paths are inaccessible. Use file_base64.

    Example using content_text: { "name": "Service Agreement", "recipients": [{"id": "1", "email": "client@example.com", "name": "Jane Doe"}], "files": [{"name": "agreement.docx", "content_text": "# Service Agreement\n\nThis agreement between..."}] }

FILE ACCESS: Chat attachments and sandbox paths (/home/claude, /mnt/user-data) are inaccessible to the MCP server. Do NOT use resource_uri or sandbox file_path values. For existing files, call file_store with no arguments to open the native file picker.

REQUIRED PARAMETERS:

  1. name: Document name

  2. recipients: Array with at least one object containing "id" and "email". Always pass the signer's full name in "name" (or "first_name" and "last_name", which are joined into "name"); a recipient without a name is asked to type one when signing.

  3. files: Array with at least one file object containing:

    • "name": Filename (e.g., "contract.docx")

    • One content source (in order of preference):

      • "content_text": Plain text or Markdown to auto-convert to DOCX (RECOMMENDED for Claude-generated content)

      • "file_token": Token from file_store (recommended for user files)

      • "file_url": Public URL to the file

      • "file_base64": Base64-encoded file content

      • "resource_uri": MCP resource URI

EXAMPLE (docx via file_token — most common): { "name": "NDA Agreement", "recipients": [{"id": "1", "email": "signer@example.com", "name": "Jane Doe"}], "files": [{"name": "nda.docx", "file_token": ""}] }

EXAMPLE (pdf with text tags): { "name": "Contract", "text_tags": true, "recipients": [{"id": "1", "email": "signer@example.com", "name": "Jane Doe"}], "files": [{"name": "contract.pdf", "file_token": ""}] }

TEXT TAGS (optional): Set text_tags: true only if the document already contains signature placeholders like {{signature:1:y}}. The recipient "id" MUST match the number in text tags (id:"1" matches {{signature:1:y}}). SIGNING DATES: Use {{autofill_date_signed:1:y}} or {{date:1:y::::::y}} to populate and lock the signing date. Replace 1 with the signer number. Plain {{date:1:y}} is editable and is suitable for dates the signer must choose. ASYNC FIELD PARSING: SignWell may parse text tags after returning the create response. If the immediate response shows fields: [] or pages_number: 0, call document_get after a few seconds before treating the tags as failed.

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": {
      "name": "<name>",
      "recipients": "<recipients>",
      "files": "<files>"
    },
    "name": "document_create"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
filesYes
messageNoEmail message recipients will see.
subjectNoEmail subject line recipients will see.
metadataNoKey-value metadata (max 50 pairs, key max 40 chars, value max 500 chars).
remindersNoSend signing reminders on day 3, 6, and 10.
test_modeNoCreate a non-binding test document without API billing.
text_tagsNo
expires_inNoDays before the signature request expires (max 365).
recipientsYes
redirect_urlNoURL to redirect after successful signing.
allow_declineNoAllow recipients to decline signing.
allow_reassignNoAllow recipients to reassign to someone else.
copied_contactsNoCC recipients who receive the final signed document by email.
embedded_signingNoEnable embedded signing.
api_application_idNoAPI Application ID for settings isolation.
apply_signing_orderNoWhen true, recipients sign one at a time in the order of the recipients array.
decline_redirect_urlNoURL to redirect if document is declined.
custom_requester_nameNoCustom requester name on communications.
custom_requester_emailNoCustom requester email on communications.
embedded_signing_notificationsNoSend completion notifications when using embedded signing.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv0.3.9
    • addedInput schema / properties / api_application_id
      Added value: +{
      +  "description": "API Application ID for settings isolation.",
      +  "format": "uuid",
      +  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +  "type": "string"
      +}
    • changedInput schema / properties / copied_contacts / items / properties / email / pattern
      Previous value: -"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"New value: +"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
    • changedInput schema / properties / custom_requester_email / pattern
      Previous value: -"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"New value: +"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
    • changedInput schema / properties / recipients / items / properties / email / pattern
      Previous value: -"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"New value: +"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
    • addedInput schema / properties / recipients / items / properties / first_name / description
      Added value: +"Alternative to name: joined with last_name into name before sending."
    • addedInput schema / properties / recipients / items / properties / last_name / description
      Added value: +"Alternative to name: joined with first_name into name before sending."
    • addedInput schema / properties / recipients / items / properties / name
      Added value: +{
      +  "description": "Full name of the recipient, shown to the signer and on the audit report.",
      +  "type": "string"
      +}
    • removedInput schema / properties / recipients / items / properties / role
      Removed value: -{
      -  "type": "string"
      -}
    • addedInput schema / properties / test_mode
      Added value: +{
      +  "description": "Create a non-binding test document without API billing.",
      +  "type": "boolean"
      +}
  2. First observedv0.3.3

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=false and destructiveHint=false; the description adds substantial context beyond them: drafts are never auto-sent, the server performs DOCX conversion and handles format conversion, chat attachments and sandbox paths are inaccessible to the MCP server, and text-tag parsing may be asynchronous so fields may come back empty and require a document_get retry. These are exactly the non-obvious traits an agent needs to avoid wasted calls.

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 purpose followed by clearly labeled RULES, SUPPORTED FILE TYPES, WORKFLOW, REQUIRED PARAMETERS, and EXAMPLES sections, which makes a long description navigable. There is mild redundancy between the workflow bullets and the standalone examples, but given 21 parameters and multiple input paths the length is largely earned.

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 21-parameter creation tool with nested objects and no output schema, the description covers the calling paths, file-access constraints, text-tag semantics, async parsing caveat, and the fact that the response includes an editor_url. Nothing an agent needs in order to invoke it correctly appears to be missing.

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?

Schema coverage is already 81%, yet the description goes well beyond it: it ranks the five file content sources by preference (content_text > file_token > file_url > file_base64 > resource_uri), explains that first_name/last_name are joined into name and that an unnamed recipient is prompted at signing, documents text-tag syntax and the requirement that recipient id match the tag number, and gives two concrete request bodies.

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 plus a scope constraint: 'Create a SignWell document (always created as a draft).' The draft qualifier implicitly distinguishes it from siblings like document_send_draft and template_create_document, so an agent can pick the right tool without opening the 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?

Explicit when-to-use and when-not-to-use guidance: do not read/parse files, do not convert formats, use file_store with no arguments for user files, use content_text for Claude-generated content, never use sandbox paths or resource_uri. Two separate workflows are laid out step by step, covering the main decision branches an agent will face.

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