# Cloudlayer.io MCP MCP

> cloudlayer.io lets your AI agent turn URLs and raw HTML into professional PDFs or high-resolution images. It captures screenshots of any webpage in PNG, JPG, or WebP format, so you never have to use a browser's print function again. You can also convert full website links directly into polished PDF reports, all without leaving your chat interface.

## Overview
- **Category:** productivity
- **Price:** Free
- **Tags:** pdf-generation, html-to-pdf, screenshot-api, web-automation, document-conversion, rendering

## Description

Think about capturing content from the web that needs to look perfect—not just dumped as raw text. This MCP lets you take any public URL or even a chunk of HTML code and instantly render it as a high-quality document or image. You're talking pixel-perfect PDFs, whether you need a full website snapshot or just one section. It also captures professional screenshots in PNG, JPG, and WebP formats, making social media previews or documentation assets simple to pull together. Plus, if you're building an automated pipeline, your agent can even track usage statistics and list templates directly from the Vinkius catalog connection point. You manage all this complex rendering process using natural conversation alone.

## Tools

### convert_html_to_pdf
Takes raw HTML text and converts it into a complete PDF document.

### capture_url_screenshot
Pulls a high-quality image (PNG, JPG, etc.) from any specific public web URL.

### convert_url_to_pdf
Converts an entire live public URL directly into a high-quality PDF report.

### get_template_configuration
Fetches detailed configuration data for a specific Nunjucks template you've set up.

### get_cloudlayer_usage_stats
Retrieves current usage counts and quota information for your account.

### list_generation_history
Shows a list of recent tasks, including previous PDFs created and images captured.

### list_pdf_templates
Retrieves the names and details of all available PDF templates in your account.

### list_cloudlayer_webhooks
Lists all active webhooks configured to notify you about generation events in real time.

## Prompt Examples

**Prompt:** 
```
Convert https://example.com to a PDF.
```

**Response:** 
```
Generating PDF for example.com... The document has been successfully created. You can download it here: [Generated PDF URL].
```

**Prompt:** 
```
Take a screenshot of https://news.google.com.
```

**Response:** 
```
Capturing screenshot of Google News... I've generated a high-quality image of the page. You can view it here: [Screenshot URL].
```

**Prompt:** 
```
Show me my generation history.
```

**Response:** 
```
Retrieving your history... I found 5 recent tasks including 3 PDFs from URLs, 1 HTML conversion, and 1 screenshot. Would you like the links for any of these?
```

## Capabilities

### Convert a live website link into a PDF report
Your agent pulls an entire public URL and renders it as a ready-to-download, high-quality PDF document.

### Capture web pages as images
You tell your agent which page to capture, and it returns a high-resolution image file (PNG, JPG, or WebP) of the screenshot.

### Convert raw code into PDFs
If you copy an HTML string from somewhere, this MCP converts that raw text directly into a structured PDF document.

### Review usage and quota limits
Your agent retrieves your current cloudlayer.io quota and usage statistics so you know exactly what's left in your account.

## Use Cases

### Creating Quarterly Marketing Reports
A marketing manager needs to compile 15 different campaign pages into one presentation. Instead of manually taking screenshots and assembling them, they ask their agent to run `capture_url_screenshot` on all 15 links, grouping the resulting PNG files for a single upload.

### Documenting API Usage
A developer finishes building a feature and needs to show management exactly how it looks. They use `convert_url_to_pdf` on the staging environment's landing page to generate a clean PDF for review, instead of sending multiple screenshots.

### Building an Automated Content Pipeline
An automation team needs to prove that their system is running correctly. They use `list_cloudlayer_webhooks` to check the notification status and run `get_cloudlayer_usage_stats` to ensure they haven't hit a quota limit.

### Handling Internal Documentation
A technical writer has several sections of old, messy HTML code. They pass this raw text to the agent, which uses `convert_html_to_pdf` to standardize it into a clean, printable PDF format.

## Benefits

- Stop copying and pasting screenshots. You can capture any web page's visual assets using the `capture_url_screenshot` tool, pulling PNG, JPG, or WebP files directly to your workflow.
- No more messy print previews. The `convert_url_to_pdf` tool ensures that full website links are rendered as polished, professional PDF documents every time.
- Need a quick report from code? If you have raw HTML text, the `convert_html_to_pdf` function turns it into a structured PDF immediately.
- Manage your automation pipeline by using tools like `list_generation_history` and `get_cloudlayer_usage_stats`. This gives you full visibility into past tasks and current quotas.
- Build custom reports with confidence. You can list and retrieve template details via `list_pdf_templates` or check specific configurations with `get_template_configuration`, all without opening a browser.

## How It Works

The bottom line is you can get professional web content rendered into structured files without opening any separate dashboard.

1. Subscribe to this MCP and input your API key from the cloudlayer.io dashboard.
2. Tell your agent which URL or HTML snippet needs converting, specifying if you need a PDF or an image.
3. Your agent executes the rendering task using the connection and provides you with the resulting document link or image data.

## Frequently Asked Questions

**How do I use cloudlayer.io MCP to take a screenshot of a URL?**
Use the `capture_url_screenshot` tool and provide the public web address you want an image captured from.

**What is convert_url_to_pdf used for in cloudlayer.io MCP?**
`convert_url_to_pdf` turns a full website link into one clean, professional PDF file that preserves the original page layout.

**Can I check my quota using list_generation_history or get_cloudlayer_usage_stats?**
You need to use `get_cloudlayer_usage_stats` specifically. The history tool only lists *what* you've done, not how much capacity you have left.

**Do I need a specific template name for list_pdf_templates?**
No. `list_pdf_templates` retrieves all templates configured in your account so you can see what's available to use.

**How do I set up real-time notifications using list_cloudlayer_webhooks?**
You first configure the webhook in your cloudlayer.io dashboard, and then you use `list_cloudlayer_webhooks` to monitor all configured endpoints. This lets your system receive instant alerts when a document or image finishes generating, rather than polling for updates.

**When should I use convert_html_to_pdf instead of converting a URL?**
Use `convert_html_to_pdf` when you already have the raw HTML code string. If your content is publicly hosted on a website, stick to using `convert_url_to_pdf`. This tool handles external web page fetching for you.

**What information does get_template_configuration provide about my Nunjucks templates?**
This function retrieves the specific details and structure of a single generation template by name. Developers use this to verify parameters or check required variables before attempting a document conversion.

**How can I check if I'm approaching my usage limit with get_cloudlayer_usage_stats?**
The `get_cloudlayer_usage_stats` tool retrieves current quota information and consumption metrics for your account. This lets you track how many PDFs or screenshots you have left before running into limits.

**Can I convert a specific URL to a PDF through the agent?**
Yes! Use the `convert_url_to_pdf` tool with the public URL. The agent will instruct cloudlayer.io to render the page and return a link to the generated PDF.

**How do I see my current document generation usage?**
Use the `get_cloudlayer_usage_stats` tool. Your agent will fetch your current usage data, showing how many documents and images you have generated against your quota.

**Where do I find my cloudlayer.io API Key?**
Log in to your cloudlayer.io dashboard. You can find your API key in the main dashboard view or under the API settings section.