# Docamatic MCP MCP

> Docamatic lets your agent automate professional document creation from templates, websites, or raw HTML. You can build reports, invoices, packing slips, and certificates by injecting dynamic data—all without manual formatting. It converts live pages into high-fidelity PDFs, captures full-page screenshots, and stitches multiple files together.

## Overview
- **Category:** productivity
- **Price:** Free
- **Tags:** pdf-generation, html-to-pdf, document-automation, template-rendering, image-processing, reporting

## Description

Need to generate consistent documents at scale? This MCP gives your agent the power to handle everything from basic reports to complex visual collateral. You point it at a template—say, an invoice or a certificate—and feed in structured data using natural language commands. The system automatically fills out fields and outputs a polished PDF ready to share. Need to document a website? Just give the URL; your agent will convert the live page into a high-fidelity PDF or capture a full-page image, handling all the messy rendering details behind the scenes. It even handles merging multiple different documents you created into one final file. Because it manages so many media types and outputs, connecting Docamatic through Vinkius lets your AI client act as a dedicated document engineer for everything from finance reports to technical documentation.

## Tools

### generate_pdf_from_html
Creates a PDF document from an entire HTML code block or live web page URL.

### generate_image_from_html
Converts a raw HTML string or URL directly into a static image file.

### generate_pdf_from_template
Builds a structured PDF using predefined templates by injecting specific JSON data points.

### list_generation_history
Shows a directory and history log of all documents previously created by your agent.

### list_available_builtin_templates
Retrieves a list of standard, ready-to-use document templates available in the system.

### merge_multiple_pdfs
Combines several individual PDF files into one unified, multi-page document.

### take_web_screenshot
Captures a high-quality full-page image of any specified website URL.

### add_elements_to_pdf
Draw text, images, and QR codes onto an existing PDF document to annotate it.

## Prompt Examples

**Prompt:** 
```
Generate a professional PDF of the website 'https://vinkius.com'.
```

**Response:** 
```
Document rendering triggered! I'm converting 'https://vinkius.com' into a high-fidelity PDF. You can download the finalized file here: [download_url]. Need me to capture a screenshot as well?
```

**Prompt:** 
```
Create an invoice for 'Acme Corp' using the 'invoice3' template.
```

**Response:** 
```
Invoice generated! I've populated the 'invoice3' template with your data for Acme Corp. The document is now ready. Would you like to merge it with any past project reports?
```

**Prompt:** 
```
Take a full-page screenshot of 'https://news.google.com'.
```

**Response:** 
```
Visual captured! I've taken a high-quality full-page screenshot of the specified news URL. You can view the image here: [image_url]. Shall I check your recent generation history for other files?
```

## Capabilities

### Automate Templated Reports
Build PDFs like invoices or certificates by mapping JSON data to predefined templates.

### Convert Web Content to Documents
Turn raw HTML strings or live website URLs into professional, printable PDF and image files.

### Assemble & Edit PDFs
Combine several separate documents into a single file, or draw new text and images onto existing PDFs.

### Capture Full-Page Visuals
Take high-quality, full-page screenshots of any live website with automatic JavaScript rendering support.

### Track Output History
Access and monitor a complete history log of every document generated through your agent.

## Use Cases

### Client Onboarding Packet
The marketing team needs to create 50 personalized welcome packets. Instead of manually editing each one, the agent uses generate_pdf_from_template with client-specific data for a consistent look and feel.

### Technical Documentation Audit
A developer must document an entire feature that lives on three different internal web pages. The agent runs take_web_screenshot for each page, then uses merge_multiple_pdfs to compile a single visual report.

### Financial Quarterly Review
The finance department needs to consolidate sales reports from regional managers who submit files in different formats. The agent pulls the PDFs and uses add_elements_to_pdf to stamp them all with the current quarter's metadata.

### Legal Compliance Reporting
A lawyer needs a clean, accurate PDF of a website detailing new regulations. Instead of screenshots, they use generate_pdf_from_html to preserve the structural integrity and text flow of the live page.

## Benefits

- Stop manually formatting reports. Use generate_pdf_from_template to instantly create professional invoices or certificates by just feeding in JSON data.
- Need a PDF from a webpage? Don't copy-paste messy code. generate_pdf_from_html handles the conversion of raw HTML or live URLs into clean, structured PDFs.
- When you need visual proof, take_web_screenshot captures full web pages at high quality. You get the image without worrying about JavaScript rendering issues.
- Dealing with scattered files? Use merge_multiple_pdfs to combine several reports or drafts into one single document for final review.
- Need to annotate an existing PDF? The add_elements_to_pdf tool lets you draw specific text boxes, images, or QR codes onto finalized documents.
- Keep track of everything. list_generation_history acts as a central log so you always know which reports were created and when.

## How It Works

The bottom line is: Your AI handles all the messy rendering, formatting, and assembly; you just give it instructions.

1. First, subscribe to this MCP and grab the API Key from your Docamatic account settings.
2. Next, instruct your AI client: tell it what kind of document you need (e.g., 'Create an invoice for XYZ Corp using template A').
3. Finally, the agent calls the appropriate tool, processes the data/URL, and returns the finalized PDF or image file to your workspace.

## Frequently Asked Questions

**How do I generate a PDF from my website using the generate_pdf_from_html tool?**
You simply provide the live URL or the raw HTML string to your agent. It handles all the rendering, ensuring you get a high-fidelity PDF that looks exactly like the source.

**Can I combine multiple PDFs using merge_multiple_pdfs?**
Yes. You can list several separate files and the MCP will stitch them together into one unified document, keeping all pages in order.

**What is the difference between generate_pdf_from_html and take_web_screenshot?**
generate_pdf_from_html outputs a structured PDF file with selectable text. take_web_screenshot only gives you a static image, which means you can't copy text from it.

**How do I make a custom invoice using generate_pdf_from_template?**
First, list available built-in templates to see the options. Then, provide your agent with the specific template ID and a JSON object containing all the necessary data points.

**How do I find out what common templates are available for use with `list_available_builtin_templates`?**
You call `list_available_builtin_templates` to see a catalog of all supported document formats. This list tells your agent exactly which predefined types, like packing slips or invoices, you can populate with data.

**After I generate a PDF from a template, how do I add extra elements using `add_elements_to_pdf`?**
Use the `add_elements_to_pdf` tool to draw specific content onto an existing document. This lets you put new images, QR codes, or customized text exactly where you want it on the final PDF.

**What is the best way to capture a visual representation of a webpage using `generate_image_from_html`?**
This tool converts an HTML string or live URL directly into a high-quality image file. It's ideal for capturing visual content quickly when you don't need the full structure of a PDF.

**How do I view my record of all past documents using `list_generation_history`?**
You run `list_generation_history` to access your complete directory of generated files. This lets you monitor your entire document production history directly from your agent's conversation flow.

**How do I find my Docamatic API Key?**
Log in to your account and navigate to the **API Key** section in your settings to generate or copy your unique access token.

**Can I use my own custom HTML strings?**
Yes! The `generate_pdf_from_html` and `generate_image_from_html` tools accept raw HTML strings as source input.

**Does it support merging existing PDF files?**
Absolutely. Use the `merge_multiple_pdfs` tool and provide an array of public URLs to combine them into a single PDF document.