create_template
Develop reusable contract templates for eSignature workflows. Customize content with headers, text, images, and signer fields, while organizing templates with labels for efficient contract management.
Instructions
Creates a reusable contract template for contracts to be based on.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| document_elements | Yes | Customize template content with headers, text, images. Owners can manually replace {{placeholder fields}} in the eSignatures contract editor, and signers can fill in Signer fields when signing the document. Use placeholders for signer names if needed, instead of Signer fields. Contract title auto-inserts as the first line. | |
| labels | No | Assign labels for organizing templates and contracts; labels are inherited by contracts. | |
| title | Yes | Title for the new template; used for contracts based on this template. |
Implementation Reference
- Handler for create_template tool: makes POST request to /api/templates with arguments and returns the API response.if name == "create_template": response = await httpxClient.post(f"/api/templates?token={secret_token}", json=arguments) return [types.TextContent(type="text", text=f"Response code: {response.status_code}, response: {response.json()}")]
- Input schema definition for create_template tool.INPUT_SCHEMA_CREATE_TEMPLATE = { "type": "object", "properties": { "title": {"type": "string", "description": "Title for the new template; used for contracts based on this template."}, "labels": {"type": "array", "description": "Assign labels for organizing templates and contracts; labels are inherited by contracts.", "items": {"type": "string"}}, "document_elements": { "type": "array", "description": "Customize template content with headers, text, images. Owners can manually replace {{placeholder fields}} in the eSignatures contract editor, and signers can fill in Signer fields when signing the document. Use placeholders for signer names if needed, instead of Signer fields. Contract title auto-inserts as the first line.", "items": INPUT_SCHEMA_DOCUMENT_ELEMENTS_ITEMS } }, "required": ["title", "document_elements"] }
- src/mcp_server_esignatures/server.py:55-59 (registration)Registration of create_template tool in the list_tools handler.types.Tool( name="create_template", description="Creates a reusable contract template for contracts to be based on.", inputSchema=INPUT_SCHEMA_CREATE_TEMPLATE ),