ReflowPDF
Paged PDFs from HTML and CSS, document templates, and an editor link for every document.
¿Debería usar esto?
Calidad y seguridad
Hallazgos (2)
- HIGH
- MEDIUMen import_pdf
Basado en el análisis automatizado de las definiciones de herramientas y el cumplimiento del protocolo.
Costo de contexto
Este es el número aproximado de tokens que se consumen cada vez que las herramientas del servidor se cargan en el contexto de un modelo. Los recuentos más altos reducen la atención disponible para otras tareas.
Instalar
Instalación con un clic
Agrega esto a tu archivo `claude_desktop_config.json`:
{
"mcpServers": {
"reflowpdf": {
"url": "https://app.reflowpdf.com/mcp"
}
}
}Puntos de conexión remotos
https://app.reflowpdf.com/mcpstreamable-httpQué puede hacer
Inventario de herramientas
Herramientas (12)
🟡render_pdf(html, filename, preview, preview_pages)
Lays out a whole HTML document (with its CSS) as paged print and returns a download link to the PDF, valid 24 hours, and the document's edit link in the ReflowPDF editor. Use @page for paper and margins, margin boxes for headers, footers and page numbers; JavaScript does not run. Read read_guide topic "html" before the first document. To change the document later, use update_document with its document_id.
Esquema de entrada
{
"type": "object",
"properties": {
"html": {
"type": "string",
"description": "The whole HTML document: <!doctype html>, <html lang>, a <title>, a <style> in <head> with @page. Self-contained; images and fonts by https URL, data: URI or an upload_image link."
},
"filename": {
"type": "string",
"description": "The PDF file name, e.g. \"invoice-1042.pdf\". Default: the document's <title>."
},
"preview": {
"type": "boolean",
"description": "Pictures (PNG) of pages come with the answer, so you can check the layout, fonts and images before giving the links. Default: true."
},
"preview_pages": {
"type": "array",
"items": {
"type": "integer"
},
"maxItems": 4,
"description": "Which pages to see, 1-based; -1 is the last page. Default: page 1 and the last page (a page that spilled over shows there). Up to 4, e.g. [1, 2, -1]."
}
},
"required": [
"html"
],
"additionalProperties": false
}Esquema de salida
{
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "The link, valid 24 hours."
},
"expiresAt": {
"type": "string",
"description": "When the link stops working (ISO 8601)."
},
"filename": {
"type": "string"
},
"pages": {
"type": "integer"
},
"bytes": {
"type": "integer"
},
"mark": {
"type": "string",
"enum": [
"none",
"guest",
"free-allowance-used"
],
"description": "Whether the PDF carries the ReflowPDF mark, and why."
},
"skippedResources": {
"type": "array",
"items": {
"type": "string"
},
"description": "Images, fonts or style sheets the server could not fetch."
},
"missingVariables": {
"type": "array",
"items": {
"type": "string"
},
"description": "Template values the data did not have (printed empty)."
},
"notes": {
"type": "array",
"items": {
"type": "string"
},
"description": "Facts about this PDF: how long its link works, its mark, what was not fetched or filled."
},
"renderMs": {
"type": "integer",
"description": "How long the print took on the server, in milliseconds (the engine and its adapter)."
},
"timing": {
"type": "object",
"description": "The engine's own parts of it, when it states them: layoutMs (styles, layout and pagination) and writeMs (writing the PDF).",
"properties": {
"layoutMs": {
"type": "number"
},
"writeMs": {
"type": "number"
}
}
},
"preview": {
"type": "string",
"description": "Which pages came with this answer as pictures (PNG), or why none did."
},
"editUrl": {
"type": "string",
"description": "The document in the ReflowPDF editor: the person edits it there (the link is the document; it lasts while it is used)."
},
"documentId": {
"type": "string",
"description": "The document, for get_document and update_document."
},
"revision": {
"type": "integer",
"description": "Its revision: name it to update_document as base_revision."
}
},
"required": [
"url",
"expiresAt",
"filename",
"pages",
"bytes",
"mark",
"notes"
]
}🟡render_template(template_id, template, data, filename, preview, ...)
Fills a template with JSON data and prints it to PDF (a download link, valid 24 hours, and the edit link in the editor, where its template and data stay editable — until the person edits it on the page, which makes it a plain HTML document: then change its html). Either a gallery template (template_id from list_templates; without data it prints its sample) or your own template source. Send data in the shape of the template's sample (get_template). The language: read_guide topic "templates".
Esquema de entrada
{
"type": "object",
"properties": {
"template_id": {
"type": "string",
"description": "A gallery template's id, from list_templates."
},
"template": {
"type": "string",
"description": "Your own template source (HTML with {{ value }}, {% for %}, {% if %}), instead of template_id."
},
"data": {
"type": "object",
"description": "The values the template reads, in the shape of its sample data.",
"additionalProperties": true
},
"filename": {
"type": "string",
"description": "The PDF file name. Default: the template's name or the document's <title>."
},
"preview": {
"type": "boolean",
"description": "Pictures (PNG) of pages come with the answer, so you can check the layout, fonts and images before giving the links. Default: true."
},
"preview_pages": {
"type": "array",
"items": {
"type": "integer"
},
"maxItems": 4,
"description": "Which pages to see, 1-based; -1 is the last page. Default: page 1 and the last page (a page that spilled over shows there). Up to 4, e.g. [1, 2, -1]."
}
},
"additionalProperties": false
}Esquema de salida
{
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "The link, valid 24 hours."
},
"expiresAt": {
"type": "string",
"description": "When the link stops working (ISO 8601)."
},
"filename": {
"type": "string"
},
"pages": {
"type": "integer"
},
"bytes": {
"type": "integer"
},
"mark": {
"type": "string",
"enum": [
"none",
"guest",
"free-allowance-used"
],
"description": "Whether the PDF carries the ReflowPDF mark, and why."
},
"skippedResources": {
"type": "array",
"items": {
"type": "string"
},
"description": "Images, fonts or style sheets the server could not fetch."
},
"missingVariables": {
"type": "array",
"items": {
"type": "string"
},
"description": "Template values the data did not have (printed empty)."
},
"notes": {
"type": "array",
"items": {
"type": "string"
},
"description": "Facts about this PDF: how long its link works, its mark, what was not fetched or filled."
},
"renderMs": {
"type": "integer",
"description": "How long the print took on the server, in milliseconds (the engine and its adapter)."
},
"timing": {
"type": "object",
"description": "The engine's own parts of it, when it states them: layoutMs (styles, layout and pagination) and writeMs (writing the PDF).",
"properties": {
"layoutMs": {
"type": "number"
},
"writeMs": {
"type": "number"
}
}
},
"preview": {
"type": "string",
"description": "Which pages came with this answer as pictures (PNG), or why none did."
},
"editUrl": {
"type": "string",
"description": "The document in the ReflowPDF editor: the person edits it there (the link is the document; it lasts while it is used)."
},
"documentId": {
"type": "string",
"description": "The document, for get_document and update_document."
},
"revision": {
"type": "integer",
"description": "Its revision: name it to update_document as base_revision."
}
},
"required": [
"url",
"expiresAt",
"filename",
"pages",
"bytes",
"mark",
"notes"
]
}🟢list_templates(query, category)
Lists the gallery's ready documents — invoices, quotes, receipts, statements, reports, contracts, letters, CVs, certificates, tickets, labels, menus and more — each a template with sample data. Search by a word ("invoice", "contract") or a category.
Esquema de entrada
{
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Words to look for in the name, purpose or category."
},
"category": {
"type": "string",
"enum": [
"Finance",
"Sales",
"Business",
"HR & Legal",
"Logistics",
"Health",
"Events",
"Personal",
"Marketing",
"Showcase"
],
"description": "Only this category."
}
},
"additionalProperties": false
}Esquema de salida
{
"type": "object",
"properties": {
"templates": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"category": {
"type": "string"
},
"description": {
"type": "string"
},
"paper": {
"type": "string"
}
},
"required": [
"id",
"name",
"category",
"description",
"paper"
]
}
}
},
"required": [
"templates"
]
}🟢get_template(id)
Returns a gallery template's source and its sample data, to fill with the person's values (render_template) or to adapt into your own template.
Esquema de entrada
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The template's id, from list_templates."
}
},
"required": [
"id"
],
"additionalProperties": false
}Esquema de salida
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"category": {
"type": "string"
},
"description": {
"type": "string"
},
"paper": {
"type": "string"
},
"template": {
"type": "string"
},
"data": {
"type": "object",
"additionalProperties": true
}
},
"required": [
"id",
"name",
"category",
"description",
"paper",
"template",
"data"
]
}🟡open_in_editor(html, template_id, data, name)
Returns the edit link of a document in the ReflowPDF editor, where the person edits it on the page and downloads it: your HTML, or a template with its data (kept as template and data, both editable). Use when the person wants to change the document themselves; you can read their changes and change it too (get_document, update_document).
Esquema de entrada
{
"type": "object",
"properties": {
"html": {
"type": "string",
"description": "The HTML document (or your own template source, with data)."
},
"template_id": {
"type": "string",
"description": "A gallery template's id, instead of html."
},
"data": {
"type": "object",
"description": "The values of the template, if it is one.",
"additionalProperties": true
},
"name": {
"type": "string",
"description": "The document's name in the editor."
}
},
"additionalProperties": false
}Esquema de salida
{
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "The link; it works until expiresAt."
},
"expiresAt": {
"type": "string",
"description": "When the link stops working (ISO 8601)."
},
"documentId": {
"type": "string"
},
"revision": {
"type": "integer"
},
"notes": {
"type": "array",
"items": {
"type": "string"
},
"description": "What to tell the person about this link."
}
},
"required": [
"url",
"expiresAt",
"notes"
]
}🟢get_document(document_id)
Returns a document made with ReflowPDF (by you, or opened in the editor from your link) as it is now — the person may have edited it in the editor: its source HTML, template data and revision. Read it before changing it with update_document.
Esquema de entrada
{
"type": "object",
"properties": {
"document_id": {
"type": "string",
"description": "The document_id (or the edit link) from render_pdf, render_template or open_in_editor."
}
},
"required": [
"document_id"
],
"additionalProperties": false
}Esquema de salida
{
"type": "object",
"properties": {
"documentId": {
"type": "string"
},
"revision": {
"type": "integer"
},
"by": {
"type": "string",
"enum": [
"assistant",
"editor"
],
"description": "Who wrote this revision: you, or the person in the editor."
},
"name": {
"type": "string"
},
"html": {
"type": "string",
"description": "The document's source (a template when data is not empty)."
},
"data": {
"type": "object",
"additionalProperties": true
},
"editUrl": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"kind": {
"type": "string",
"enum": [
"html",
"template"
],
"description": "An HTML document (its {{ … }} is text), or a template with its data."
},
"owned": {
"type": "boolean",
"description": "The document is the person's account's: your prints of it count to their plan."
}
},
"required": [
"documentId",
"revision",
"by",
"html",
"data",
"editUrl",
"updatedAt"
]
}🔴update_document(document_id, html, data, name, base_revision, ...)
Writes a new version of a document by its link — e.g. the person asks in the chat to remove something on page 2 — and prints it again: the PDF link, the same edit link (the editor open on it shows the change). The new version replaces the one before. Send the whole new html (and data, if it is a template), changed from what get_document returned, with base_revision: a document the person changed after you read it is refused, so read it again.
Esquema de entrada
{
"type": "object",
"properties": {
"document_id": {
"type": "string",
"description": "The document_id (or the edit link)."
},
"html": {
"type": "string",
"description": "The whole new source. Omitted: the source stays (e.g. new data only)."
},
"data": {
"type": "object",
"description": "The template's new data. Alone, only for a template (kind \"template\"); with html, non-empty data makes the document a template. Omitted: the data stays.",
"additionalProperties": true
},
"name": {
"type": "string",
"description": "A new name."
},
"base_revision": {
"type": "integer",
"description": "The revision you read (get_document, or the last result). Required: a document the person changed after it is refused, never overwritten."
},
"filename": {
"type": "string",
"description": "A new PDF file name, kept for its later prints. Default: the name it was printed with (render_pdf filename), else its <title>."
},
"preview": {
"type": "boolean",
"description": "Pictures (PNG) of pages come with the answer, so you can check the layout, fonts and images before giving the links. Default: true."
},
"preview_pages": {
"type": "array",
"items": {
"type": "integer"
},
"maxItems": 4,
"description": "Which pages to see, 1-based; -1 is the last page. Default: page 1 and the last page (a page that spilled over shows there). Up to 4, e.g. [1, 2, -1]."
}
},
"required": [
"document_id",
"base_revision"
],
"additionalProperties": false
}Esquema de salida
{
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "The link, valid 24 hours."
},
"expiresAt": {
"type": "string",
"description": "When the link stops working (ISO 8601)."
},
"filename": {
"type": "string"
},
"pages": {
"type": "integer"
},
"bytes": {
"type": "integer"
},
"mark": {
"type": "string",
"enum": [
"none",
"guest",
"free-allowance-used"
],
"description": "Whether the PDF carries the ReflowPDF mark, and why."
},
"skippedResources": {
"type": "array",
"items": {
"type": "string"
},
"description": "Images, fonts or style sheets the server could not fetch."
},
"missingVariables": {
"type": "array",
"items": {
"type": "string"
},
"description": "Template values the data did not have (printed empty)."
},
"notes": {
"type": "array",
"items": {
"type": "string"
},
"description": "Facts about this PDF: how long its link works, its mark, what was not fetched or filled."
},
"renderMs": {
"type": "integer",
"description": "How long the print took on the server, in milliseconds (the engine and its adapter)."
},
"timing": {
"type": "object",
"description": "The engine's own parts of it, when it states them: layoutMs (styles, layout and pagination) and writeMs (writing the PDF).",
"properties": {
"layoutMs": {
"type": "number"
},
"writeMs": {
"type": "number"
}
}
},
"preview": {
"type": "string",
"description": "Which pages came with this answer as pictures (PNG), or why none did."
},
"editUrl": {
"type": "string",
"description": "The document in the ReflowPDF editor: the person edits it there (the link is the document; it lasts while it is used)."
},
"documentId": {
"type": "string",
"description": "The document, for get_document and update_document."
},
"revision": {
"type": "integer",
"description": "Its revision: name it to update_document as base_revision."
}
},
"required": [
"url",
"expiresAt",
"filename",
"pages",
"bytes",
"mark",
"notes"
]
}🟡upload_image(image, image_base64)
Keeps an image and returns its link, to use as <img src> or CSS url() in render_pdf, render_template, open_in_editor and update_document — so the document stays small when you read it back. Give one of: image — a picture the person attached in the chat, as your client passes attached files to tools; image_base64 — bytes you have yourself (one you made, a small file you can read: base64 is text you write, so tens of KB). PNG, JPEG, HEIC, GIF, WebP or AVIF; a photo over 10 MB or in HEIC is brought to print size (4096 px on the long side). A picture the person attached that you can see but have no file of: call ask_for_images, which gives them a link to upload it from their device. An image at a public https address needs no upload: use that address. An SVG goes into the HTML as it is. The image lasts 30 days after a document using it last changed.
Esquema de entrada
{
"type": "object",
"properties": {
"image": {
"type": "object",
"description": "A picture the person attached in the chat.",
"properties": {
"download_url": {
"type": "string",
"description": "A temporary https address of the file."
},
"file_id": {
"type": "string"
},
"mime_type": {
"type": "string"
},
"file_name": {
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"additionalProperties": true
},
"image_base64": {
"type": "string",
"description": "The image's bytes, base64 (a data: URI is taken too)."
}
},
"additionalProperties": false
}Esquema de salida
{
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "The image's link, for <img src>."
},
"type": {
"type": "string"
},
"bytes": {
"type": "integer"
},
"width": {
"type": "integer",
"description": "Pixels (0: not read from this format)."
},
"height": {
"type": "integer"
}
},
"required": [
"url",
"type",
"bytes",
"width",
"height"
]
}🟡ask_for_images(note, upload_id)
Gives a link where the person uploads pictures from their device for you — their logo, photos, a signature scan — when you cannot take the file from the chat yourself (you see an attached picture but have no file of it, or they have not sent it yet). Give them the link and say what to upload. When they say they are done, call ask_for_images again with upload_id: you get each image's link (with its size and file name) to put in the document — render_pdf, update_document. A program with the file (a shell, a code sandbox) can POST its bytes to the same link instead. The link works for 24 hours and takes up to 50 images — photos straight from a phone or a camera too (HEIC, up to 40 MB each; brought to print size, 4096 px on the long side).
Esquema de entrada
{
"type": "object",
"properties": {
"note": {
"type": "string",
"description": "What to upload, shown to the person on the page, e.g. \"Your company logo (PNG with a transparent background is best)\". Only for a new link."
},
"upload_id": {
"type": "string",
"description": "The upload_id of a link you gave: what the person has uploaded to it so far."
}
},
"additionalProperties": false
}Esquema de salida
{
"type": "object",
"properties": {
"uploadUrl": {
"type": "string",
"description": "The link for the person."
},
"uploadId": {
"type": "string"
},
"expiresAt": {
"type": "string"
},
"images": {
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "The image's link, for <img src>."
},
"name": {
"type": "string",
"description": "The file name on the person's device."
},
"type": {
"type": "string"
},
"bytes": {
"type": "integer"
},
"width": {
"type": "integer"
},
"height": {
"type": "integer"
}
},
"required": [
"url",
"type",
"bytes",
"width",
"height",
"name"
]
}
},
"notes": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"uploadUrl",
"uploadId",
"expiresAt",
"images",
"notes"
]
}🟡import_pdf(pdf, url, pdf_base64, name)
Returns a link (valid 24 hours) that opens an existing PDF in the ReflowPDF editor's import, which rebuilds it as an editable document. A PDF exported from the ReflowPDF editor with «Keep the PDF editable» opens from its own source at once; any other — the PDFs these tools print too — is rebuilt by AI, which needs a free account and uses its AI pages (the editor shows the cost first). A document you made with these tools needs no import: give the person its edit link. Give the PDF the person attached in the chat (pdf, as your client passes attached files), a public https URL of it, or its bytes in base64 (small files). A PDF you cannot pass on: the person opens the editor (https://app.reflowpdf.com) and imports it there.
Esquema de entrada
{
"type": "object",
"properties": {
"pdf": {
"type": "object",
"description": "A PDF the person attached in the chat, as your client passes attached files to tools.",
"properties": {
"download_url": {
"type": "string",
"description": "A temporary https address of the file."
},
"file_id": {
"type": "string"
},
"mime_type": {
"type": "string"
},
"file_name": {
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"additionalProperties": true
},
"url": {
"type": "string",
"description": "A public https address of the PDF."
},
"pdf_base64": {
"type": "string",
"description": "The PDF's bytes, base64 (up to 20 MB)."
},
"name": {
"type": "string",
"description": "The document's name. Default: the file's."
}
},
"additionalProperties": false
}Esquema de salida
{
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "The link; it works until expiresAt."
},
"expiresAt": {
"type": "string",
"description": "When the link stops working (ISO 8601)."
},
"documentId": {
"type": "string"
},
"revision": {
"type": "integer"
},
"notes": {
"type": "array",
"items": {
"type": "string"
},
"description": "What to tell the person about this link."
}
},
"required": [
"url",
"expiresAt",
"notes"
]
}🟢connect_account
Signs the person in to their ReflowPDF account (a free one is enough), when they want PDFs without the ReflowPDF mark, their plan's pages, or the documents you make kept in their account. Their client shows a Connect button; once they have signed in, every call of yours is their account's. Without it everything works too, as a guest: every page, with a small mark.
Esquema de entrada
{
"type": "object",
"properties": {},
"additionalProperties": false
}Esquema de salida
{
"type": "object",
"properties": {
"connected": {
"type": "boolean"
},
"notes": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"connected",
"notes"
]
}🟢read_guide(topic)
The engine's guide: "overview" (the tools), "html" (paper, headers/footers, page numbers, tables of contents, footnotes, fonts, images, accessibility), "pages" (page kinds, breaks and keeping together, covers, numbering, bleed and crop marks), "design" (columns, drop caps, page decorations and watermarks, spacing, images and text wrap, typography), "charts" (the chart block), "codes" (QR codes and barcodes), "forms" (fillable fields), "templates" (the template language).
Esquema de entrada
{
"type": "object",
"properties": {
"topic": {
"type": "string",
"enum": [
"overview",
"html",
"pages",
"design",
"charts",
"codes",
"forms",
"templates"
],
"description": "Default: html."
}
},
"additionalProperties": false
}Comunidad
Evidencia