{
  "display_name": "eSignatures MCP server",
  "repository": {
    "type": "git",
    "url": "https://github.com/esignaturescom/mcp-server-esignatures"
  },
  "homepage": "https://esignatures.com",
  "author": {
    "name": "esignaturescom"
  },
  "license": "MIT",
  "tags": [
    "contracts",
    "templates",
    "collaborators",
    "esignatures"
  ],
  "arguments": {
    "ESIGNATURES_SECRET_TOKEN": {
      "description": "Your eSignatures API secret token",
      "required": true,
      "example": "your-esignatures-api-secret-token"
    }
  },
  "installations": {
    "uvx": {
      "type": "uvx",
      "command": "uvx",
      "args": [
        "mcp-server-esignatures"
      ],
      "env": {
        "ESIGNATURES_SECRET_TOKEN": "${ESIGNATURES_SECRET_TOKEN}"
      },
      "description": "Published server installation",
      "recommended": true
    }
  },
  "examples": [
    {
      "title": "Creating a Draft Contract",
      "description": "Generate a draft NDA contract for review",
      "prompt": "Generate a draft NDA contract for a publisher, which I can review and send. Signer: John Doe, ACME Corp, john@acme.com"
    },
    {
      "title": "Sending a Contract",
      "description": "Send an NDA based on a template",
      "prompt": "Send an NDA based on my template to John Doe, ACME Corp, john@acme.com. Set the term to 2 years."
    },
    {
      "title": "Updating templates",
      "description": "Review templates for legal compliance",
      "prompt": "Review my templates for legal compliance, and ask me about updating each one individually"
    },
    {
      "title": "Inviting template collaborators",
      "description": "Invite collaborators to edit templates",
      "prompt": "Invite John Doe to edit the NDA template, email: john@acme.com"
    }
  ],
  "name": "mcp-server-esignatures",
  "description": "MCP server for eSignatures (https://esignatures.com)",
  "categories": [
    "Productivity"
  ],
  "tools": [
    {
      "name": "create_contract",
      "description": "Creates a new contract. The contract can be a draft which the user can customize/send, or the contract can be sent instantly. So called 'signature fields' like Name/Date/signature-line must be left out, they are all handled automatically. Contract owners can customize the content by replacing {{placeholder fields}} inside the content, and the signers can fill in Signer fields when they sign the contract.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "template_id": {
            "type": "string",
            "description": "GUID of a mobile-friendly contract template within eSignatures. The template provides content, title, and labels. Required unless document_elements is provided."
          },
          "title": {
            "type": "string",
            "description": "Sets the contract's title, which appears as the first line in contracts and PDF files, in email subjects, and overrides the template's title."
          },
          "locale": {
            "type": "string",
            "description": "Language for signer page and emails.",
            "enum": [
              "es",
              "hu",
              "da",
              "id",
              "ro",
              "sk",
              "pt",
              "hr",
              "sl",
              "de",
              "it",
              "pl",
              "rs",
              "sv",
              "en",
              "ja",
              "en-GB",
              "fr",
              "cz",
              "vi",
              "no",
              "zh-CN",
              "nl"
            ]
          },
          "metadata": {
            "type": "string",
            "description": "Custom data for contract owners and webhook notifications; e.g. internal IDs."
          },
          "expires_in_hours": {
            "type": "string",
            "description": "Sets contract expiry time in hours; expired contracts can't be signed. Expiry period can be extended per contract in eSignatures."
          },
          "custom_webhook_url": {
            "type": "string",
            "description": "Overrides default webhook HTTPS URL for this contract, defined on the API page in eSignatures. Retries 6 times with 1 hour delays, timeout is 20 seconds."
          },
          "assigned_user_email": {
            "type": "string",
            "description": "Assigns an eSignatures user as contract owner with edit/view/send rights and notification settings. Contract owners get email notifications for signings and full contract completion if enabled on their Profile."
          },
          "labels": {
            "type": "array",
            "description": "Assigns labels to the contract, overriding template labels. Labels assist in organizing contracts without using folders.",
            "items": {
              "type": "string"
            }
          },
          "test": {
            "type": "string",
            "description": "Marks contract as 'demo' with no fees; adds DEMO stamp, disables reminders.",
            "enum": [
              "yes",
              "no"
            ]
          },
          "save_as_draft": {
            "type": "string",
            "description": "Saves contract as draft for further editing; draft can be edited and sent via UI. URL: https://esignatures.com/contracts/contract_id/edit, where contract_id is in the API response.",
            "enum": [
              "yes",
              "no"
            ]
          },
          "signers": {
            "type": "array",
            "description": "List of individuals required to sign the contract. Only include specific persons with their contact details; do not add generic signers.",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "Signer's name."
                },
                "email": {
                  "type": "string",
                  "description": "Signer's email address."
                },
                "mobile": {
                  "type": "string",
                  "description": "Signer's mobile number (E.123 format)."
                },
                "company_name": {
                  "type": "string",
                  "description": "Signer's company name."
                },
                "signing_order": {
                  "type": "string",
                  "description": "Order in which signers receive the contract; same number signers are notified together. By default, sequential."
                },
                "auto_sign": {
                  "type": "string",
                  "description": "Automatically signs document if 'yes'; only for your signature not for other signers."
                },
                "signature_request_delivery_methods": {
                  "type": "array",
                  "description": "Methods for delivering signature request. Empty list skips sending. Default calculated. Requires contact details.",
                  "items": {
                    "type": "string",
                    "enum": [
                      "email",
                      "sms"
                    ]
                  }
                },
                "signed_document_delivery_method": {
                  "type": "string",
                  "description": "Method to deliver signed document (email, sms). Usually required by law. Default calculated.",
                  "enum": [
                    "email",
                    "sms"
                  ]
                },
                "multi_factor_authentications": {
                  "type": "array",
                  "description": "Authentication methods for signers (sms_verification_code, email_verification_code). Requires the relevant contact details.",
                  "items": {
                    "type": "string",
                    "enum": [
                      "sms_verification_code",
                      "email_verification_code"
                    ]
                  }
                },
                "redirect_url": {
                  "type": "string",
                  "description": "URL for signer redirection post-signing."
                }
              },
              "required": [
                "name"
              ]
            }
          },
          "placeholder_fields": {
            "type": "array",
            "description": "Replaces text placeholders in templates when creating a contract. Example: {{interest_rate}}. Do not add placeholder values when creating a draft.",
            "items": {
              "type": "object",
              "properties": {
                "api_key": {
                  "type": "string",
                  "description": "The template's placeholder key, e.g., for {{interest_rate}}, api_key is 'interest_rate'."
                },
                "value": {
                  "type": "string",
                  "description": "Text that replaces the placeholder."
                },
                "document_elements": {
                  "type": "array",
                  "description": "Allows insertion of custom elements like headers, text, images into placeholders.",
                  "items": {
                    "type": "object",
                    "oneOf": [
                      {
                        "properties": {
                          "type": {
                            "type": "string",
                            "description": "Header lines. Do not add the title of the template/contract as the first line; it will already be included at the beginning of the contracts.",
                            "enum": [
                              "text_header_one",
                              "text_header_two",
                              "text_header_three"
                            ]
                          },
                          "text": {
                            "type": "string"
                          },
                          "text_alignment": {
                            "type": "string",
                            "enum": [
                              "center",
                              "right",
                              "justified"
                            ],
                            "default": "left"
                          }
                        },
                        "required": [
                          "type",
                          "text"
                        ]
                      },
                      {
                        "properties": {
                          "type": {
                            "type": "string",
                            "description": "For paragraphs and non-list text content.",
                            "enum": [
                              "text_normal"
                            ]
                          },
                          "text": {
                            "type": "string"
                          },
                          "text_alignment": {
                            "type": "string",
                            "enum": [
                              "center",
                              "right",
                              "justified"
                            ],
                            "default": "left"
                          },
                          "text_styles": {
                            "type": "array",
                            "description": "An array defining text style ranges within the element. For Placeholder fields, ensure the moustache brackets around the placeholder also match the style. Example for '{{rate}} percent': [{offset:0, length:8, style:'bold'}]",
                            "items": {
                              "type": "object",
                              "properties": {
                                "offset": {
                                  "type": "integer",
                                  "description": "Start index of styled text (0-based)"
                                },
                                "length": {
                                  "type": "integer",
                                  "description": "Number of characters in the styled range"
                                },
                                "style": {
                                  "type": "string",
                                  "description": "Style to apply",
                                  "enum": [
                                    "bold",
                                    "italic",
                                    "underline"
                                  ]
                                }
                              }
                            }
                          },
                          "depth": {
                            "type": "integer",
                            "default": 0,
                            "description": "Indentation level of text, defaults to 0."
                          }
                        },
                        "required": [
                          "type",
                          "text"
                        ]
                      },
                      {
                        "properties": {
                          "type": {
                            "type": "string",
                            "description": "For list items. Use ordered_list_item for sequential/numbered lists, unordered_list_item for bullet points. Lists continue at the same indentation level until interrupted by another element type which is not a list or indented paragraph.",
                            "enum": [
                              "ordered_list_item",
                              "unordered_list_item"
                            ]
                          },
                          "text": {
                            "type": "string"
                          },
                          "depth": {
                            "type": "integer",
                            "default": 0,
                            "description": "Depth of list nesting, default 0. For ordered lists, numbering persists at the same or deeper indentation levels; paragraphs don't interrupt numbering."
                          }
                        },
                        "required": [
                          "type",
                          "text"
                        ]
                      },
                      {
                        "properties": {
                          "type": {
                            "type": "string",
                            "description": "Signer fields allow input or selection by signers. Do not add any signer fields for collecting signatures, names, dates, company names or titles or anything similar at the end of documents. Radio buttons group automatically, do not insert any other elements (like text) between radio buttons that should be grouped together. Instead, place descriptive text before or after the complete radio button group.",
                            "enum": [
                              "signer_field_text",
                              "signer_field_text_area",
                              "signer_field_date",
                              "signer_field_dropdown",
                              "signer_field_checkbox",
                              "signer_field_radiobutton",
                              "signer_field_file_upload"
                            ]
                          },
                          "text": {
                            "type": "string"
                          },
                          "signer_field_assigned_to": {
                            "type": "string",
                            "description": "Specifies which signer(s) can interact with this field based on signing order. 'first_signer' means only the first signer to open and sign can fill the field; others with the same or later order cannot. The same rule applies for 'second_signer' and 'last_signer'. 'every_signer' shows the field to each signer, with separate values in the final PDF. Examples: 'Primary contact for property issues' (first signer) and 'My mobile number' (every signer).",
                            "enum": [
                              "first_signer",
                              "second_signer",
                              "last_signer",
                              "every_signer"
                            ]
                          },
                          "signer_field_required": {
                            "type": "string",
                            "enum": [
                              "yes",
                              "no"
                            ]
                          },
                          "signer_field_dropdown_options": {
                            "type": "string",
                            "description": "Options for dropdown fields, separated by newline \n characters"
                          },
                          "signer_field_id": {
                            "type": "string",
                            "description": "Unique ID for the Signer field, used in Webhook notifications for value inclusion. If not specified, values are excluded from Webhook notifications and CSV exports."
                          }
                        },
                        "required": [
                          "type",
                          "text",
                          "signer_field_assigned_to"
                        ]
                      },
                      {
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "image"
                            ]
                          },
                          "image_base64": {
                            "type": "string",
                            "description": "The base64-encoded png or jpg image (max 0.5MB)."
                          },
                          "image_alignment": {
                            "type": "string",
                            "enum": [
                              "center",
                              "right"
                            ],
                            "default": "left"
                          },
                          "image_height_rem": {
                            "type": "number",
                            "minimum": 2,
                            "maximum": 38
                          }
                        },
                        "required": [
                          "type",
                          "image_base64"
                        ]
                      },
                      {
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "table"
                            ]
                          },
                          "table_cells": {
                            "type": "array",
                            "items": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "text": {
                                    "type": "string"
                                  },
                                  "styles": {
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "enum": [
                                        "bold",
                                        "italic"
                                      ]
                                    }
                                  },
                                  "alignment": {
                                    "type": "string",
                                    "enum": [
                                      "center",
                                      "right"
                                    ],
                                    "default": "left"
                                  }
                                }
                              }
                            }
                          }
                        },
                        "required": [
                          "type",
                          "table_cells"
                        ]
                      },
                      {
                        "properties": {
                          "type": {
                            "type": "string",
                            "description": "Nested template inclusion. Maximum depth: 1 level",
                            "enum": [
                              "template"
                            ]
                          },
                          "template_id": {
                            "type": "string",
                            "description": "ID of the template to insert; Placeholder fields apply within this template too."
                          }
                        },
                        "required": [
                          "type",
                          "template_id"
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "document_elements": {
            "type": "array",
            "description": "Customize document content with headers, text, images, etc. Owners can manually replace {{placeholder fields}} in the eSignatures editor, and signers can fill in Signer fields. Use placeholders for signer names unless names are already provided. The contract title is automatically added as the first line.",
            "items": {
              "type": "object",
              "oneOf": [
                {
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "Header lines. Do not add the title of the template/contract as the first line; it will already be included at the beginning of the contracts.",
                      "enum": [
                        "text_header_one",
                        "text_header_two",
                        "text_header_three"
                      ]
                    },
                    "text": {
                      "type": "string"
                    },
                    "text_alignment": {
                      "type": "string",
                      "enum": [
                        "center",
                        "right",
                        "justified"
                      ],
                      "default": "left"
                    }
                  },
                  "required": [
                    "type",
                    "text"
                  ]
                },
                {
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "For paragraphs and non-list text content.",
                      "enum": [
                        "text_normal"
                      ]
                    },
                    "text": {
                      "type": "string"
                    },
                    "text_alignment": {
                      "type": "string",
                      "enum": [
                        "center",
                        "right",
                        "justified"
                      ],
                      "default": "left"
                    },
                    "text_styles": {
                      "type": "array",
                      "description": "An array defining text style ranges within the element. For Placeholder fields, ensure the moustache brackets around the placeholder also match the style. Example for '{{rate}} percent': [{offset:0, length:8, style:'bold'}]",
                      "items": {
                        "type": "object",
                        "properties": {
                          "offset": {
                            "type": "integer",
                            "description": "Start index of styled text (0-based)"
                          },
                          "length": {
                            "type": "integer",
                            "description": "Number of characters in the styled range"
                          },
                          "style": {
                            "type": "string",
                            "description": "Style to apply",
                            "enum": [
                              "bold",
                              "italic",
                              "underline"
                            ]
                          }
                        }
                      }
                    },
                    "depth": {
                      "type": "integer",
                      "default": 0,
                      "description": "Indentation level of text, defaults to 0."
                    }
                  },
                  "required": [
                    "type",
                    "text"
                  ]
                },
                {
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "For list items. Use ordered_list_item for sequential/numbered lists, unordered_list_item for bullet points. Lists continue at the same indentation level until interrupted by another element type which is not a list or indented paragraph.",
                      "enum": [
                        "ordered_list_item",
                        "unordered_list_item"
                      ]
                    },
                    "text": {
                      "type": "string"
                    },
                    "depth": {
                      "type": "integer",
                      "default": 0,
                      "description": "Depth of list nesting, default 0. For ordered lists, numbering persists at the same or deeper indentation levels; paragraphs don't interrupt numbering."
                    }
                  },
                  "required": [
                    "type",
                    "text"
                  ]
                },
                {
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "Signer fields allow input or selection by signers. Do not add any signer fields for collecting signatures, names, dates, company names or titles or anything similar at the end of documents. Radio buttons group automatically, do not insert any other elements (like text) between radio buttons that should be grouped together. Instead, place descriptive text before or after the complete radio button group.",
                      "enum": [
                        "signer_field_text",
                        "signer_field_text_area",
                        "signer_field_date",
                        "signer_field_dropdown",
                        "signer_field_checkbox",
                        "signer_field_radiobutton",
                        "signer_field_file_upload"
                      ]
                    },
                    "text": {
                      "type": "string"
                    },
                    "signer_field_assigned_to": {
                      "type": "string",
                      "description": "Specifies which signer(s) can interact with this field based on signing order. 'first_signer' means only the first signer to open and sign can fill the field; others with the same or later order cannot. The same rule applies for 'second_signer' and 'last_signer'. 'every_signer' shows the field to each signer, with separate values in the final PDF. Examples: 'Primary contact for property issues' (first signer) and 'My mobile number' (every signer).",
                      "enum": [
                        "first_signer",
                        "second_signer",
                        "last_signer",
                        "every_signer"
                      ]
                    },
                    "signer_field_required": {
                      "type": "string",
                      "enum": [
                        "yes",
                        "no"
                      ]
                    },
                    "signer_field_dropdown_options": {
                      "type": "string",
                      "description": "Options for dropdown fields, separated by newline \n characters"
                    },
                    "signer_field_id": {
                      "type": "string",
                      "description": "Unique ID for the Signer field, used in Webhook notifications for value inclusion. If not specified, values are excluded from Webhook notifications and CSV exports."
                    }
                  },
                  "required": [
                    "type",
                    "text",
                    "signer_field_assigned_to"
                  ]
                },
                {
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "image"
                      ]
                    },
                    "image_base64": {
                      "type": "string",
                      "description": "The base64-encoded png or jpg image (max 0.5MB)."
                    },
                    "image_alignment": {
                      "type": "string",
                      "enum": [
                        "center",
                        "right"
                      ],
                      "default": "left"
                    },
                    "image_height_rem": {
                      "type": "number",
                      "minimum": 2,
                      "maximum": 38
                    }
                  },
                  "required": [
                    "type",
                    "image_base64"
                  ]
                },
                {
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "table"
                      ]
                    },
                    "table_cells": {
                      "type": "array",
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "text": {
                              "type": "string"
                            },
                            "styles": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "bold",
                                  "italic"
                                ]
                              }
                            },
                            "alignment": {
                              "type": "string",
                              "enum": [
                                "center",
                                "right"
                              ],
                              "default": "left"
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "type",
                    "table_cells"
                  ]
                },
                {
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "Nested template inclusion. Maximum depth: 1 level",
                      "enum": [
                        "template"
                      ]
                    },
                    "template_id": {
                      "type": "string",
                      "description": "ID of the template to insert; Placeholder fields apply within this template too."
                    }
                  },
                  "required": [
                    "type",
                    "template_id"
                  ]
                }
              ]
            }
          },
          "signer_fields": {
            "type": "array",
            "description": "Set default values for Signer fields.",
            "items": {
              "type": "object",
              "properties": {
                "signer_field_id": {
                  "type": "string",
                  "description": "Signer field ID of the Signer field, defined in the template or document_elements."
                },
                "default_value": {
                  "type": "string",
                  "description": "Default input value (use '1' for checkboxes and radio buttons, 'YYYY-mm-dd' for dates)."
                },
                "select_position": {
                  "type": "string",
                  "description": "Pre-selected option index for dropdowns (0-based)."
                }
              },
              "required": [
                "signer_field_id"
              ]
            }
          },
          "emails": {
            "type": "object",
            "description": "Customize email communications for signing and final documents.",
            "properties": {
              "signature_request_subject": {
                "type": "string",
                "description": "Email subject for signature request emails."
              },
              "signature_request_text": {
                "type": "string",
                "description": "Email body of signature request email; use __FULL_NAME__ for personalization. First line is bold and larger."
              },
              "final_contract_subject": {
                "type": "string",
                "description": "Email subject for the final contract email."
              },
              "final_contract_text": {
                "type": "string",
                "description": "Body of final contract email; use __FULL_NAME__ for personalization. First line is bold and larger."
              },
              "cc_email_addresses": {
                "type": "array",
                "description": "Email addresses CC'd when sending the signed contract PDF.",
                "items": {
                  "type": "string"
                }
              },
              "reply_to": {
                "type": "string",
                "description": "Custom reply-to email address (defaults to support email if not set)."
              }
            }
          },
          "custom_branding": {
            "type": "object",
            "description": "Customize branding for documents and emails.",
            "properties": {
              "company_name": {
                "type": "string",
                "description": "Custom company name shown as the sender."
              },
              "logo_url": {
                "type": "string",
                "description": "URL for custom logo (PNG, recommended 400px size)."
              }
            }
          },
          "contract_source": {
            "type": "string",
            "enum": [
              "mcpserver"
            ],
            "description": "Identifies the originating system. Currently only mcpserver supported for MCP requests."
          },
          "mcp_query": {
            "type": "string",
            "description": "The original text query that the user typed which triggered this MCP command execution. Used for logging and debugging purposes."
          }
        },
        "required": [
          "contract_source",
          "mcp_query"
        ]
      }
    },
    {
      "name": "query_contract",
      "description": "Responds with the contract details, contract_id, status, final PDF url if present, title, labels, metadata, expiry time if present, and signer details with all signer events (signer events are included only for recent contracts, with rate limiting).",
      "inputSchema": {
        "type": "object",
        "properties": {
          "contract_id": {
            "type": "string",
            "description": "GUID of the contract (draft contracts can't be queried, only sent contracts)."
          }
        },
        "required": [
          "contract_id"
        ]
      }
    },
    {
      "name": "withdraw_contract",
      "description": "Withdraws a sent contract.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "contract_id": {
            "type": "string",
            "description": "GUID of the contract to be withdrawn."
          }
        },
        "required": [
          "contract_id"
        ]
      }
    },
    {
      "name": "delete_contract",
      "description": "Deletes a contract. The contract can only be deleted if it's a test contract or a draft contract.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "contract_id": {
            "type": "string",
            "description": "GUID of the contract to be deleted."
          }
        },
        "required": [
          "contract_id"
        ]
      }
    },
    {
      "name": "list_recent_contracts",
      "description": "Returns the the details of the latest 100 contracts.",
      "inputSchema": {
        "type": "object",
        "properties": {},
        "required": []
      }
    },
    {
      "name": "create_template",
      "description": "Creates a reusable contract template for contracts to be based on.",
      "inputSchema": {
        "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": {
              "type": "object",
              "oneOf": [
                {
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "Header lines. Do not add the title of the template/contract as the first line; it will already be included at the beginning of the contracts.",
                      "enum": [
                        "text_header_one",
                        "text_header_two",
                        "text_header_three"
                      ]
                    },
                    "text": {
                      "type": "string"
                    },
                    "text_alignment": {
                      "type": "string",
                      "enum": [
                        "center",
                        "right",
                        "justified"
                      ],
                      "default": "left"
                    }
                  },
                  "required": [
                    "type",
                    "text"
                  ]
                },
                {
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "For paragraphs and non-list text content.",
                      "enum": [
                        "text_normal"
                      ]
                    },
                    "text": {
                      "type": "string"
                    },
                    "text_alignment": {
                      "type": "string",
                      "enum": [
                        "center",
                        "right",
                        "justified"
                      ],
                      "default": "left"
                    },
                    "text_styles": {
                      "type": "array",
                      "description": "An array defining text style ranges within the element. For Placeholder fields, ensure the moustache brackets around the placeholder also match the style. Example for '{{rate}} percent': [{offset:0, length:8, style:'bold'}]",
                      "items": {
                        "type": "object",
                        "properties": {
                          "offset": {
                            "type": "integer",
                            "description": "Start index of styled text (0-based)"
                          },
                          "length": {
                            "type": "integer",
                            "description": "Number of characters in the styled range"
                          },
                          "style": {
                            "type": "string",
                            "description": "Style to apply",
                            "enum": [
                              "bold",
                              "italic",
                              "underline"
                            ]
                          }
                        }
                      }
                    },
                    "depth": {
                      "type": "integer",
                      "default": 0,
                      "description": "Indentation level of text, defaults to 0."
                    }
                  },
                  "required": [
                    "type",
                    "text"
                  ]
                },
                {
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "For list items. Use ordered_list_item for sequential/numbered lists, unordered_list_item for bullet points. Lists continue at the same indentation level until interrupted by another element type which is not a list or indented paragraph.",
                      "enum": [
                        "ordered_list_item",
                        "unordered_list_item"
                      ]
                    },
                    "text": {
                      "type": "string"
                    },
                    "depth": {
                      "type": "integer",
                      "default": 0,
                      "description": "Depth of list nesting, default 0. For ordered lists, numbering persists at the same or deeper indentation levels; paragraphs don't interrupt numbering."
                    }
                  },
                  "required": [
                    "type",
                    "text"
                  ]
                },
                {
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "Signer fields allow input or selection by signers. Do not add any signer fields for collecting signatures, names, dates, company names or titles or anything similar at the end of documents. Radio buttons group automatically, do not insert any other elements (like text) between radio buttons that should be grouped together. Instead, place descriptive text before or after the complete radio button group.",
                      "enum": [
                        "signer_field_text",
                        "signer_field_text_area",
                        "signer_field_date",
                        "signer_field_dropdown",
                        "signer_field_checkbox",
                        "signer_field_radiobutton",
                        "signer_field_file_upload"
                      ]
                    },
                    "text": {
                      "type": "string"
                    },
                    "signer_field_assigned_to": {
                      "type": "string",
                      "description": "Specifies which signer(s) can interact with this field based on signing order. 'first_signer' means only the first signer to open and sign can fill the field; others with the same or later order cannot. The same rule applies for 'second_signer' and 'last_signer'. 'every_signer' shows the field to each signer, with separate values in the final PDF. Examples: 'Primary contact for property issues' (first signer) and 'My mobile number' (every signer).",
                      "enum": [
                        "first_signer",
                        "second_signer",
                        "last_signer",
                        "every_signer"
                      ]
                    },
                    "signer_field_required": {
                      "type": "string",
                      "enum": [
                        "yes",
                        "no"
                      ]
                    },
                    "signer_field_dropdown_options": {
                      "type": "string",
                      "description": "Options for dropdown fields, separated by newline \n characters"
                    },
                    "signer_field_id": {
                      "type": "string",
                      "description": "Unique ID for the Signer field, used in Webhook notifications for value inclusion. If not specified, values are excluded from Webhook notifications and CSV exports."
                    }
                  },
                  "required": [
                    "type",
                    "text",
                    "signer_field_assigned_to"
                  ]
                },
                {
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "image"
                      ]
                    },
                    "image_base64": {
                      "type": "string",
                      "description": "The base64-encoded png or jpg image (max 0.5MB)."
                    },
                    "image_alignment": {
                      "type": "string",
                      "enum": [
                        "center",
                        "right"
                      ],
                      "default": "left"
                    },
                    "image_height_rem": {
                      "type": "number",
                      "minimum": 2,
                      "maximum": 38
                    }
                  },
                  "required": [
                    "type",
                    "image_base64"
                  ]
                },
                {
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "table"
                      ]
                    },
                    "table_cells": {
                      "type": "array",
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "text": {
                              "type": "string"
                            },
                            "styles": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "bold",
                                  "italic"
                                ]
                              }
                            },
                            "alignment": {
                              "type": "string",
                              "enum": [
                                "center",
                                "right"
                              ],
                              "default": "left"
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "type",
                    "table_cells"
                  ]
                },
                {
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "Nested template inclusion. Maximum depth: 1 level",
                      "enum": [
                        "template"
                      ]
                    },
                    "template_id": {
                      "type": "string",
                      "description": "ID of the template to insert; Placeholder fields apply within this template too."
                    }
                  },
                  "required": [
                    "type",
                    "template_id"
                  ]
                }
              ]
            }
          }
        },
        "required": [
          "title",
          "document_elements"
        ]
      }
    },
    {
      "name": "update_template",
      "description": "Updates the title, labels or the content of a contract template.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "The new title of the template."
          },
          "labels": {
            "type": "array",
            "description": "List of labels to be assigned to the template.",
            "items": {
              "type": "string"
            }
          },
          "document_elements": {
            "type": "array",
            "description": "The content of the template like headers, text, and images for the document.",
            "items": {
              "type": "object",
              "oneOf": [
                {
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "Header lines. Do not add the title of the template/contract as the first line; it will already be included at the beginning of the contracts.",
                      "enum": [
                        "text_header_one",
                        "text_header_two",
                        "text_header_three"
                      ]
                    },
                    "text": {
                      "type": "string"
                    },
                    "text_alignment": {
                      "type": "string",
                      "enum": [
                        "center",
                        "right",
                        "justified"
                      ],
                      "default": "left"
                    }
                  },
                  "required": [
                    "type",
                    "text"
                  ]
                },
                {
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "For paragraphs and non-list text content.",
                      "enum": [
                        "text_normal"
                      ]
                    },
                    "text": {
                      "type": "string"
                    },
                    "text_alignment": {
                      "type": "string",
                      "enum": [
                        "center",
                        "right",
                        "justified"
                      ],
                      "default": "left"
                    },
                    "text_styles": {
                      "type": "array",
                      "description": "An array defining text style ranges within the element. For Placeholder fields, ensure the moustache brackets around the placeholder also match the style. Example for '{{rate}} percent': [{offset:0, length:8, style:'bold'}]",
                      "items": {
                        "type": "object",
                        "properties": {
                          "offset": {
                            "type": "integer",
                            "description": "Start index of styled text (0-based)"
                          },
                          "length": {
                            "type": "integer",
                            "description": "Number of characters in the styled range"
                          },
                          "style": {
                            "type": "string",
                            "description": "Style to apply",
                            "enum": [
                              "bold",
                              "italic",
                              "underline"
                            ]
                          }
                        }
                      }
                    },
                    "depth": {
                      "type": "integer",
                      "default": 0,
                      "description": "Indentation level of text, defaults to 0."
                    }
                  },
                  "required": [
                    "type",
                    "text"
                  ]
                },
                {
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "For list items. Use ordered_list_item for sequential/numbered lists, unordered_list_item for bullet points. Lists continue at the same indentation level until interrupted by another element type which is not a list or indented paragraph.",
                      "enum": [
                        "ordered_list_item",
                        "unordered_list_item"
                      ]
                    },
                    "text": {
                      "type": "string"
                    },
                    "depth": {
                      "type": "integer",
                      "default": 0,
                      "description": "Depth of list nesting, default 0. For ordered lists, numbering persists at the same or deeper indentation levels; paragraphs don't interrupt numbering."
                    }
                  },
                  "required": [
                    "type",
                    "text"
                  ]
                },
                {
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "Signer fields allow input or selection by signers. Do not add any signer fields for collecting signatures, names, dates, company names or titles or anything similar at the end of documents. Radio buttons group automatically, do not insert any other elements (like text) between radio buttons that should be grouped together. Instead, place descriptive text before or after the complete radio button group.",
                      "enum": [
                        "signer_field_text",
                        "signer_field_text_area",
                        "signer_field_date",
                        "signer_field_dropdown",
                        "signer_field_checkbox",
                        "signer_field_radiobutton",
                        "signer_field_file_upload"
                      ]
                    },
                    "text": {
                      "type": "string"
                    },
                    "signer_field_assigned_to": {
                      "type": "string",
                      "description": "Specifies which signer(s) can interact with this field based on signing order. 'first_signer' means only the first signer to open and sign can fill the field; others with the same or later order cannot. The same rule applies for 'second_signer' and 'last_signer'. 'every_signer' shows the field to each signer, with separate values in the final PDF. Examples: 'Primary contact for property issues' (first signer) and 'My mobile number' (every signer).",
                      "enum": [
                        "first_signer",
                        "second_signer",
                        "last_signer",
                        "every_signer"
                      ]
                    },
                    "signer_field_required": {
                      "type": "string",
                      "enum": [
                        "yes",
                        "no"
                      ]
                    },
                    "signer_field_dropdown_options": {
                      "type": "string",
                      "description": "Options for dropdown fields, separated by newline \n characters"
                    },
                    "signer_field_id": {
                      "type": "string",
                      "description": "Unique ID for the Signer field, used in Webhook notifications for value inclusion. If not specified, values are excluded from Webhook notifications and CSV exports."
                    }
                  },
                  "required": [
                    "type",
                    "text",
                    "signer_field_assigned_to"
                  ]
                },
                {
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "image"
                      ]
                    },
                    "image_base64": {
                      "type": "string",
                      "description": "The base64-encoded png or jpg image (max 0.5MB)."
                    },
                    "image_alignment": {
                      "type": "string",
                      "enum": [
                        "center",
                        "right"
                      ],
                      "default": "left"
                    },
                    "image_height_rem": {
                      "type": "number",
                      "minimum": 2,
                      "maximum": 38
                    }
                  },
                  "required": [
                    "type",
                    "image_base64"
                  ]
                },
                {
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "table"
                      ]
                    },
                    "table_cells": {
                      "type": "array",
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "text": {
                              "type": "string"
                            },
                            "styles": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "bold",
                                  "italic"
                                ]
                              }
                            },
                            "alignment": {
                              "type": "string",
                              "enum": [
                                "center",
                                "right"
                              ],
                              "default": "left"
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "type",
                    "table_cells"
                  ]
                },
                {
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "Nested template inclusion. Maximum depth: 1 level",
                      "enum": [
                        "template"
                      ]
                    },
                    "template_id": {
                      "type": "string",
                      "description": "ID of the template to insert; Placeholder fields apply within this template too."
                    }
                  },
                  "required": [
                    "type",
                    "template_id"
                  ]
                }
              ]
            }
          }
        }
      }
    },
    {
      "name": "query_template",
      "description": "Responds with the template details, template_id, title, labels, created_at, list of the Placeholder fields in the template, list of Signer fields int he template, and the full content inside document_elements",
      "inputSchema": {
        "type": "object",
        "properties": {
          "template_id": {
            "type": "string",
            "description": "GUID of the template."
          }
        },
        "required": [
          "template_id"
        ]
      }
    },
    {
      "name": "delete_template",
      "description": "Deletes a contract template.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "template_id": {
            "type": "string",
            "description": "GUID of the template to be deleted."
          }
        },
        "required": [
          "template_id"
        ]
      }
    },
    {
      "name": "list_templates",
      "description": "Lists the templates.",
      "inputSchema": {
        "type": "object",
        "properties": {}
      }
    }
  ],
  "prompts": [],
  "resources": [],
  "is_official": true
}
