Carbone MCP

v2.5.1
io.carbone/carbone-mcp Checked 5 hours ago Published 12 days ago

Automate enterprise-grade documents from templates, merge and 100+ conversions: PDF, Office, HTML.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_templates List Templates

List stored templates, with filters and pagination. Each result has an id (Template ID; null for a template uploaded with versioning: false) and a versionId: pass either as templateId to render_document, download_template or delete_template. Each result lists its tags: to find templates by tag, keep the results whose tags include it.

ParameterTypeDescription
categorystringFilter by category (e.g. "invoices", "legal").
cursorstringThe nextCursor of the previous response.
idstringFilter by Template ID. Cannot be a Version ID.
includeVersionsbooleanIf true, returns all versions for each template. Default: false (only deployed version).
limitinteger1 to 100 results (default 100); use cursor for more.
originintegerUpload origin: 0 API (this server), 1 Carbone Studio, 2 Salesforce, 3 Odoo, 4 HubSpot.
searchstringFuzzy search in template names, or exact match on Template ID / Version ID.
versionIdstringFilter by Version ID (SHA-256 format).

convert_document Convert Document

Convert a file to another format, e.g. DOCX, XLSX, PPTX, HTML or Markdown to PDF, or any document to PNG. No data is merged: Carbone tags such as {d.name} stay as written (use render_document to fill them). Example: { "file": "/Users/me/report.docx", "convertTo": "pdf" }. To check a layout, convert to png: the image is returned inline (for HTML or SVG, converter "C" with formatOptions { "Scale": 2 }). Returns text and images (png, jpg, gif, webp) inline; other formats are saved to a temp file whose path is returned.

ParameterTypeDescription
convertTo *Output format, e.g. "pdf". Valid outputs depend on the input format (HTML converts to pdf or png, not xlsx; doc, xls and ppt are output only). With options: { "formatName": "pdf", "formatOptions": { .…
file *stringThe file to convert. An absolute local path ("/Users/me/report.docx", "~/report.docx"; a bare name like "report.docx" is read as base64), an HTTPS URL, or the file as base64. Formats: DOCX, XLSX, PPTX…
asAttachmentbooleanIf true, return the file itself as a base64 attachment, for any format, instead of the default (temp file or inline).
converterstringConverter, used whenever the format changes. "L" LibreOffice (default): every format, and the only one with PDF/A, page ranges and accessibility. "I" Carbone ICE: DOCX and ODT to PDF, the fastest (kee…
egressAuthorizationstringAuthorization header value Carbone sends when it fetches images or styles of the file, e.g. "Bearer abc".
failOnarray["IMAGE_URL_ERROR"] with converter "C": fail when an image of the HTML or SVG cannot be downloaded.
hardRefreshbooleanIf true, run the converter even for the same format, and recompute pagination. Set automatically for PDF to PDF with formatOptions (password, watermark, PDF/A), which otherwise come back unchanged.
outputPathstringLocal path to save the converted document to, e.g. "~/out.pdf"; returns the path and size. Never overwrites a file.
reportNamestringFile name without extension, taken literally (no tags), e.g. "contract".
returnLinkbooleanIf true, return a one-time download link instead of the file, for the user to open (never fetch it yourself). Exclusive with outputPath and asAttachment.

render_document Generate Document

Generate a document (PDF, DOCX, XLSX, PPTX, ...) by merging JSON data into a Carbone template. Pass templateId for a stored template, or template (local path, HTTPS URL or base64) for a one-off render. To change the format of a file without data, use convert_document; unsure which data a template expects, call inspect_template first. Returns text and images (png, jpg, gif, webp) inline; other formats are saved to a temp file whose path is returned. Batches need a webhookUrl the user provides; otherwise render one document per call.

ParameterTypeDescription
asAttachmentbooleanIf true, return the file itself as a base64 attachment, for any format, instead of the default (temp file or inline).
batchOutputstringBatch result: "zip" (default, named after reportName, or batch.zip without one) or "pdf", one concatenated PDF (needs convertTo "pdf").
batchReportNamestringName of each file in the batch ZIP, without extension; tags resolve per item, e.g. "invoice-{d.id}".
batchSplitBystringOne document per item of an array: "d" when data is the array, "d.items" for a child array; at most 100. Needs a webhookUrl the user provides.
complementExtra data for {c.…} tags (company details, constants), or a reference to a JSON file.
convertToOutput format, e.g. "pdf". Omitted: the template's own format. Valid outputs depend on the input format (HTML converts to pdf or png, not xlsx; doc, xls and ppt are output only). With options: { "form…
converterstringConverter, used whenever the format changes. "L" LibreOffice (default): every format, and the only one with PDF/A, page ranges and accessibility. "I" Carbone ICE: DOCX and ODT to PDF, the fastest (kee…
currencyRatesRates per currency, base 1: { "EUR": 1, "USD": 1.08 }, or a reference to a JSON file.
currencySourcestringISO 4217 currency of the amounts in data, for :formatC. Set with currencyTarget and currencyRates.
currencyTargetstringISO 4217 currency to convert the amounts to.
dataJSON for the {d.…} tags: an object, a top-level array, or a reference to a JSON file (local path, HTTPS URL or base64). Omitted: every tag renders empty; to keep tags as written, use keepTags. Tag s…
egressAuthorizationstringAuthorization header value Carbone sends when it fetches images, PDFs or the webhook while rendering.
enumLabels for :convEnum(TYPE), e.g. { "STATUS": { "1": "Active" } }, or a reference to a JSON file.
failOnarray["IMAGE_URL_ERROR"]: fail when an image URL cannot be downloaded, instead of showing a placeholder.
hardRefreshbooleanIf true, recompute pagination and the table of contents after rendering. Needs convertTo.
keepTagsbooleanIf true, skip templating: tags stay as written, to proof a template's layout. Exclusive with data.
langstringLocale for {t()} translations, :formatN and :formatC, e.g. "fr-fr", "en-us".
outputPathstringLocal path to save the generated document to, e.g. "~/out.pdf"; returns the path and size. Never overwrites a file.
preReleaseFeatureInintegerTurn on Carbone pre-release features up to this version tag, e.g. 5000000.
reportNamestringFile name without extension; may use tags, e.g. "invoice-{d.id}" (taken literally with keepTags).
returnLinkbooleanIf true, return a one-time download link instead of the file, for the user to open (never fetch it yourself). Exclusive with outputPath and asAttachment.
templatestringA one-off template, not stored. An absolute local path ("/Users/me/report.docx", "~/report.docx"; a bare name like "report.docx" is read as base64), an HTTPS URL, or the file as base64. Formats: DOCX,…
templateIdstringA stored template, from list_templates or upload_template (never guess one): its Template ID (renders the deployed version) or a Version ID (64 hex characters, pins that version). Exclusive with templ…
timezonestringIANA time zone for :formatD dates, e.g. "America/New_York". Default "Europe/Paris".
translationsStrings for {t(key)}, selected by lang: { "fr-fr": { "hello": "Bonjour" } }, or a reference to a JSON file.
variableStrstringAliases for the whole template, e.g. "{#buyer = d.order.customer}", then {$buyer.name} in it.
webhookHeadersobjectHeaders Carbone sends to webhookUrl, e.g. { "authorization": "secret" }.
webhookUrlstringOnly an endpoint the user owns and gives you: Carbone POSTs { "success": true, "data": { "renderId" } } to it when the document is ready, and that server downloads it once. This call then returns no d…

inspect_template Inspect Template

List the Carbone tags a template uses and return a sample JSON dataset matching its structure. Call it before render_document when you do not know which data a template expects. Pass templateId (a stored template) or template (local path, HTTPS URL or base64). It counts as one render on the account; {t()} tags are not listed.

ParameterTypeDescription
templatestringA template to inspect, not stored. An absolute local path ("/Users/me/report.docx", "~/report.docx"; a bare name like "report.docx" is read as base64), an HTTPS URL, or the file as base64. Formats: DO…
templateIdstringTemplate ID (its deployed version) or Version ID, from list_templates. Exclusive with template.

list_categories List Categories

List the template categories in use, for the category filter of list_templates or upload_template.

list_tags List Tags

List the tags in use across templates. To find the templates with a tag, call list_templates and keep the results whose tags include it.

upload_template Upload Template

Store a reusable template, then render it with render_document and its Template ID. Returns id (Template ID) and versionId. A new version of an existing template (id) is used by renders only once deployed (deployedAt).

ParameterTypeDescription
template *stringThe template file. An absolute local path ("/Users/me/report.docx", "~/report.docx"; a bare name like "report.docx" is read as base64), an HTTPS URL, or the file as base64. Formats: DOCX, XLSX, PPTX,…
categorystringCategory, e.g. "invoices" (max 200 characters).
commentstringComment on this version (max 200 characters).
deployedAtinteger42000000000 deploys this version now: renders by Template ID use the most recently deployed version. Earlier versions stay stored. update_template_metadata redeploys one.
expireAtintegerDelete the template at this UTC Unix time (seconds); 0 (default) never. Until then, update_template_metadata with expireAt 0 cancels it. To delete now, use delete_template.
idstringTemplate ID to add this upload to as a new version; omitted: a new template. Never a Version ID.
namestringDisplay name, shown and searched by list_templates (max 200 characters).
samplearrayA sample dataset stored with the template, at most one: [{ "data": { "name": "Acme" } }].
tagsarrayLabels, e.g. ["sales", "billing"]: sorted, deduplicated, 100 characters in all.
versioningbooleanLeave true (default). false is legacy: no Template ID, only a SHA-256 templateId.

update_template_metadata Update Template Metadata

Change ONE template version: name, comment, category, tags, deployment (deployedAt), scheduled deletion (expireAt), or the Template ID it belongs to (moveToTemplateId). A Template ID patches its deployed version; a Version ID, that exact version. To delete now, use delete_template.

ParameterTypeDescription
templateId *stringThe version to change: a Version ID, or a Template ID for its deployed version.
categorystringNew category (max 200 characters).
commentstringNew comment (max 200 characters).
deployedAtinteger42000000000 deploys this version now: renders by Template ID use the most recently deployed version.
expireAtintegerDelete this version at this UTC Unix time (seconds); 0 cancels a scheduled deletion.
moveToTemplateIdstringOnly when the user asks to move a version: moves it to this other Template ID. Not the template to change (that is templateId).
namestringNew name (max 200 characters).
tagsarrayNew tags, replacing the current ones: sorted, deduplicated, 100 characters in all.

delete_template Delete Template

Delete a stored template now: a Template ID removes every version, a Version ID only that one. Confirm with the user first: it cannot be undone. To schedule a deletion instead, use update_template_metadata with expireAt.

ParameterTypeDescription
templateId *stringTemplate ID (every version) or Version ID (that version only), from list_templates.

download_template Download Template

Download a stored template's original file (DOCX, XLSX, HTML...), or with sample: true the sample dataset stored with it. Text and images come back inline; other files are saved to a temp file whose path is returned.

ParameterTypeDescription
templateId *stringTemplate ID (its deployed version) or Version ID, from list_templates.
asAttachmentbooleanIf true, return a text or image file as a base64 attachment too.
outputPathstringLocal path to save the template file to, e.g. "~/out.pdf"; returns the path and size. Never overwrites a file.
samplebooleanIf true, return the sample dataset stored at upload, as JSON, instead of the file; an error if there is none.

get_api_status API Status

Check Carbone API health and version. Returns the current API version and a status message. Useful for verifying connectivity and confirming which Carbone version is active.

find_template_examples Template Examples

Find a ready-to-run Carbone example: when the user wants to try Carbone, needs a starting template, or asks how to build a kind of document (invoice, label, report, contract, e-invoice...) or use a feature (loop, chart, barcode...). Each example is a real template (DOCX, XLSX, PPTX, ODT, HTML, SVG, CSV, XML, IDML...) with its JSON data, the document it produces, and a page explaining its tags. Each comes with renderArguments: pass them, unchanged, to render_document to fill it with its data (converting it is optional). inspect_template on its template URL lists the data it expects; upload_temp…

ParameterTypeDescription
idstringOne example, by its id.
kindstring"gallery": complete business documents. "format-guide": one feature of one format, for beginners.
levelstring
limitinteger1 to 25 results (default 8).
querystringKeywords, e.g. "invoice barcode", "excel chart", "shipping label", "pdf form".
resultFormatstringGenerated format, e.g. "pdf", "xlsx", "csv".
templateFormatstringTemplate format, e.g. "docx", "xlsx", "html".
useCasestringA use case: finance, logistics, reports, compliance, tickets, planning, presentations, publishing.

get_capabilities Capabilities

Returns a summary of all Carbone capabilities: supported formats, features, tool usage examples, and links to full documentation. Call this first if you are unsure what Carbone can do.