MCP Server Tools
An assistant connected to DocSpring’s MCP server sees the tools that its access allows. You choose the access when you sign in: Read only, Read and write or Full access.
Tools that make PDFs or set up templates wait until DocSpring has finished, like the
synchronous API. When that takes longer than about 50 seconds, the tool
returns the record’s ID with the state processing, and the assistant checks it again with get_submission or
get_template.
Read only
Section titled “Read only”Every connection has these tools.
| Tool | What it does |
|---|---|
list_templates | Lists the account's templates, 50 at a time: each one's name, type, folder, latest published version and whether it's ready. |
get_template | Gets a template: its settings, a summary of each field (name, type, description, and on a PDF template its page and position), and for the draft, whether it has changes that aren't published yet. |
get_fields | Gets the settings of a template's fields, or of the fields chosen by ID or name. |
get_template_schema | Gets the JSON Schema of the data a template's submissions take: each field's name, type, and whether it's required. |
get_template_pages | Shows a PDF template's pages as images, to see where fields go. |
get_model_code | Generates types for a template's submission data, for code that creates submissions with DocSpring's API or SDKs: the types only, without code to convert JSON (the API's just_types option). |
preview_template | Shows a template's pages filled in with your data as PNG images (not a PDF), to check how an HTML, PDF or Word template or a page design prints before you publish it or generate live documents (a Word template's pages are its PDF's). |
list_versions | Lists a template's published versions, newest first (up to 100), with who published each one and what changed. |
diff_versions | Shows what changed in a template's draft since its latest published version (or in a published version since the one before it): fields added, removed, changed and moved, settings, and whether the PDF or Word document was replaced. |
list_folders | Lists the account's template folders, with each one's path, 50 at a time. |
validate_data | Checks submission data against a template without making a PDF or saving anything: which fields are missing or have the wrong type. |
get_submission | Gets a submission (its state, data, signature requests and links to download its files), a batch from generate_pdfs, or a combined PDF from combine_pdfs. |
list_submissions | Lists the account's submissions, newest first, 50 at a time: each one's state, template, test or live, metadata and times. |
list_email_actions | Lists the account's email actions, which email each submission's files to people once it's processed, 50 at a time. |
list_email_domains | Lists the domains email actions can send from once they're verified, with the DNS records each one needs, 50 at a time. |
Read and write
Section titled “Read and write”Tools that change or remove what’s already there, such as update_fields, remove_fields and restore_version, are
marked as destructive, so clients ask you to confirm each call. Tools that only add something, like add_fields or
copy_template, aren’t.
Tools that can make DocSpring reach outside your account are marked as open-world: they download a link (a PDF, an image in your data), send to a webhook’s URL, email people, or check an email domain’s DNS records. The tools that change or copy a template are marked too, but only because an HTML template can link to images, fonts or stylesheets on the web, which DocSpring loads when it renders the template’s preview. With PDF and Word templates and page designs, they don’t load anything.
| Tool | What it does |
|---|---|
create_pdf_template | Creates a PDF template from a PDF, and waits until DocSpring has processed it. |
create_word_template | Creates a Word template from a Word document (.docx, or an OpenDocument text file, .odt, which DocSpring converts to one) with tags where the data goes, such as {{ customer.name }}, {% for item in line_items %}...{% endfor %}, {% if %} and {% image logo %}, and waits until DocSpring has it. |
create_pdf_upload | Prepares an upload of a local PDF or Word document (.docx or .odt), for agents that can run commands: use it for any file on disk, since base64 in a tool call only suits a small file. |
create_html_template | Creates an HTML template: DocSpring renders its HTML (a Liquid template) and SCSS as a PDF, with each submission's data. |
create_page_design | Creates a page design: a template whose PDFs DocSpring lays out from a JSON layout of sections and the elements in them (text with fields, images, tables, charts, checkboxes, fillable form fields, QR codes, barcodes, shapes, lines and HTML boxes), which the Page Designer in DocSpring edits. |
update_page_design | Replaces a page design's layout in its draft: get_template returns the current layout to change. |
update_template | Changes a template's settings in its draft. |
replace_template_pdf | Replaces a PDF template's PDF, or a Word template's Word document (.docx or .odt), in its draft, and waits until DocSpring has processed it. |
copy_template | Copies a template (its draft, or a published version) to a new template, and waits until the copy's PDF is ready. |
move_template | Moves a template, with all of its published versions, to a folder or to the root. |
add_fields | Adds fields to a template's draft: on a PDF template they're placed on its pages, and on an HTML or Word template they define the data it uses (a Word template already has a field for each value its tags use). |
update_fields | Changes fields of a template's draft: their settings, names, and on a PDF template their pages or positions. |
remove_fields | Removes fields from a template's draft. |
publish_version | Publishes a template's draft as a new version, which new submissions use straight away. |
restore_version | Replaces a template's draft with a published version. |
create_folder | Creates a template folder. |
rename_folder | Renames a template folder. |
move_folder | Moves a template folder, with everything in it, into another folder or to the root. |
generate_pdf | Fills in a template with data and makes a submission: a PDF, or a Word template's Word document (its output_format), and waits for it. |
generate_pdfs | Makes up to 50 submissions in one batch (PDFs, or Word templates' Word documents or OpenDocument files), from one template or several, and waits for them. |
combine_pdfs | Merges PDFs (submissions, templates, other combined PDFs or links) into one PDF, and waits for it. |
get_submission_pages | Shows a submission's PDF as page images, to check how the data looks on it. |
generate_submission_files | Makes the other files of a Word template's submission, and waits for them: its PDF, Word document or OpenDocument file (odt) when it didn't make them. |
create_signature_request | Asks people to fill in and sign a template: creates a submission with a signature request for each signer. |
create_signing_link | Makes a new link for a signer to open their signature request, such as when their link has expired. |
add_email_domain | Adds a domain for email actions to send from, and returns the DNS records to add at the domain's DNS host. |
verify_email_domain | Checks an email domain's DNS records now, instead of waiting for the next check. |
Full access
Section titled “Full access”Full access adds the tools that delete things, and the tools for webhooks and email actions.
Delete
Section titled “Delete”These tools can’t be undone, so clients ask you to confirm each call.
| Tool | What it does |
|---|---|
delete_template | Deletes a template: its draft and every published version. |
delete_version | Deletes one published version of a template. |
delete_folder | Deletes an empty template folder. |
expire_submission | Expires a submission now: deletes its data (the field values), its metadata, its PDF, its error messages and the IP address and browser it was submitted from. |
delete_email_domain | Removes an email domain. |
Webhooks and email actions
Section titled “Webhooks and email actions”An assistant sees and changes all of your webhooks and email actions, as you
can in DocSpring. send_test_email sends only to you. The webhooks and email actions an assistant sets up stay when
you disconnect it. Assistants never see a webhook’s signing secret or its headers’ values: copy the secret from the
webhook’s page in DocSpring, and add headers there.
| Tool | What it does |
|---|---|
list_webhooks | Lists the account's webhooks. |
create_webhook | Creates a webhook: DocSpring sends a POST request to the URL for each event, signed with the webhook's secret. |
update_webhook | Changes a webhook: its URL, events, filters, or whether it's enabled. |
delete_webhook | Deletes a webhook. |
create_email_action | Creates an email action, which emails each submission's files once it's processed: an account email action, or one on a template with template_id. |
update_email_action | Changes an email action. |
delete_email_action | Deletes an email action. |
customize_email_action | Changes an account email action for one template only, or turns it off for that template, replacing the template's earlier changes. |
reset_email_action_customization | Removes a template's changes to an account email action, so it sends for that template as it is. |
send_test_email | Sends an email action's email to the user only, with each field shown as its name in brackets and, for a PDF template, its blank PDF, so they can check how it looks. |