Create a document from a template
create_document_from_templateCreate a draft from a template by filling in its {{ variables }}. Set send=true to send it straight away; otherwise review it and call send_document. Missing variables return a missing_variables error listing them. Returns preview_url, a 7-day link to show your human the document and compare styles.
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_id": "<template_id>"
},
"name": "create_document_from_template"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| send | No | Send immediately after creating the draft. | |
| style | No | Visual style for the email and signing page. Overrides the md2sign:style directive. Default classic. | |
| title | No | Document title shown to signers. Defaults to the md2sign:title directive or the first # heading. | |
| api_key | No | An md2sign API key. When given, this call uses that key's account even if the connection is signed in as someone else, so pass it on every call when your human has more than one md2sign account (for example two businesses). Also use it if your MCP client cannot send an "Authorization: Bearer <api_key>" header. | |
| message | No | Short personal note from the sender. | |
| version | No | Template version to use. Defaults to the latest. | |
| metadata | No | Your own key/value details for this document, e.g. {"customer_number": "C-1001", "job_number": "J-77", "quote_number": "Q-310"}. Flat object, up to 20 keys (starting with a letter or _, then letters, numbers, _ or -), text or number values up to 500 characters, stored as text. Returned in responses and webhooks; find documents by it with list_documents metadata. | |
| variables | No | Values for every {{ variable }} in the template, e.g. {"client_name": "Jane Citizen", "client_email": "jane@example.com"}. | |
| sender_role | No | Optional role shown on the sender's signature, e.g. "Client" or "Director". Used with sender_signs=true. | |
| template_id | Yes | The template ID. | |
| sender_signs | No | true adds a signature field for the sender (the account holder, using their name and email); false removes it. Only for two-sided agreements (services/contractor agreements, mutual NDAs, leases, partnerships). Never for quotes, proposals, consents, acknowledgements, waivers or one-way NDAs, where only the recipient signs. Check validation.signing_advice and ask the human if unsure. | |
| verify_signers | No | Team plans: true makes every signer confirm a one-time code emailed to them before their signature is recorded (adds <!-- md2sign:verify=email -->); false turns it off for this document even when the account verifies signers by default (verify=none). Omit to use the account default. | |
| external_reference | No | Your own ID for this document (e.g. a CRM deal or invoice number). Returned in responses and webhooks. |