Make a PDF
Makes a PDF from Markdown or HTML and saves it in the file store with a download link.
$0.02 a call
From your agent’s balance. A call that fails costs nothing.
An example
Make a one-page PDF of our care guide for the combi steamer, to put in every delivery box.
Your agent callsdocuments_create_pdf$0.02 a call
The example business is Hansen & Voss, a restaurant-equipment wholesaler in Hamburg with 60 staff. The reply is the one the tool really gives.
{
"name": "Caring for your combi steamer.pdf",
"paper": "a4",
"markdown": "# Caring for your combi steamer\n\nRun the cleaning program every evening and leave the door open overnight. Skip scouring pads: they scratch the steel.\n\n## Once a month\n\n1. Descale the steam generator.\n2. Check the door seal for cracks.\n3. Clean the air filter behind the side panel.\n\nQuestions? service@hansenvoss.example"
}Use it when
The business needs a document as a PDF: a guide, a letter, a report, a price list.
- For a quote or invoice with numbering and a payment page, use
invoices_create. - For a Word file turned into a PDF, use
documents_convert_to_pdf.
What it does
A PDF from Markdown or HTML, saved in the file store with a download link. Markdown gets a clean document style (headings, tables, lists); HTML is printed the way Chrome prints it, without running JavaScript. Images must be public https links or data: URLs. Give exactly one of markdown or html.
What comes back
file: the new PDF with its file_id, name, type, size, download link and link expiry; and pages. Every reply also carries cost_usd and balance_usd.
Inputs
| Name | Type | What it is |
|---|---|---|
nameRequired | string | Name for the new file, e.g. "Quote 1042.pdf". 1 to 200 characters. |
markdown | string | Up to 500,000 characters. |
html | string | Up to 1,000,000 characters. |
css | string | Extra CSS, e.g. a font size or a logo. Up to 50,000 characters. |
paper | string | One of: a4,letter,legal. Default: a4. |
landscape | boolean | Default: false. |
margin_mm | integer | 0 to 50. Default: 18. |
link_hours | integer | 1 to 168. Default: 24. |
The call
Over MCP, call documents_create_pdf on https://api.conecto.chat/mcp/documents. Over REST:
curl -X POST https://api.conecto.chat/v1/tools/documents_create_pdf \
-H "Authorization: Bearer $CONECTO_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Caring for your combi steamer.pdf","paper":"a4","markdown":"# Caring for your combi steamer\n\nRun the cleaning program every evening and leave the door open overnight. Skip scouring pads: they scratch the steel.\n\n## Once a month\n\n1. Descale the steam generator.\n2. Check the door seal for cracks.\n3. Clean the air filter behind the side panel.\n\nQuestions? service@hansenvoss.example"}'When it refuses
A refused call costs nothing and says what to do next.
| Code | When | What to do |
|---|---|---|
invalid_input400 | Neither or both of markdown and html were given. | Give exactly one of them. |
conversion_failed422 | The content could not be made into a PDF. | Check the HTML or Markdown. |
storage_full409 | The file store has no room for the new file. | Delete files with files_delete, or add room with files_add_storage. |
too_large413 | The result would be over 25 MB. | Make it smaller, or split it. |
unavailable503 | Making PDFs is not switched on, or the PDF service did not answer. | Try again in a moment; nothing was charged. |
More Documents tools
All 8 tools- Convert a file to PDF
documents_convert_to_pdfTurns a Word, Excel, PowerPoint, OpenDocument, RTF, CSV, text, Markdown or HTML file into a PDF; the original stays.$0.02 a call - List a template's fields
documents_template_fieldsThe placeholders in a Word (.docx) template, so you know what data filling it needs.Free* - Fill a Word template
documents_fill_templateMakes a new Word file from a .docx template, its placeholders filled from data.$0.02 a call - Merge PDFs
documents_merge_pdfsMakes one PDF from several in the store, in the order given.$0.01 a call - Read a PDF
documents_read_pdfThe text of a PDF in the store, page by page, up to 50 pages a call.Free* - See the pages of a scan
documents_page_imagesThe pages of a scanned PDF or a photo of a document as images to look at, up to 10 pages a call.$0.005 a call - Make a PowerPoint deck
documents_create_deckA PowerPoint deck from your slides, plain or in the business's template, with editable charts, tables and each slide's sources.$0.10 a call
Give this to your agent.
Set up Conecto from https://conecto.chat/SKILL.md