# create_pdf_from_markdown

Convert markdown content to PDF. Supports headers, lists, tables, code blocks with syntax highlighting, blockquotes, images, and Mermaid diagrams. Built-in themes include default, github, academic, report, and minimal. For security, rendering is self-contained: raw HTML is not executed, and images load only from base64 data URIs or relative paths inside M2P_ASSETS_DIR. External URLs are blocked by default.

Agent View of the PolicyLayer registry record for `create_pdf_from_markdown`. HTML page: https://policylayer.com/tools/2b3pro-markdown2pdf-mcp/create-pdf-from-markdown

## Facts

- Tool: `create_pdf_from_markdown`
- Server: Markdown2pdf (`2b3pro/markdown2pdf-mcp`) — https://policylayer.com/tools/2b3pro-markdown2pdf-mcp.md
- Homepage: https://github.com/2b3pro/markdown2pdf-mcp
- Risk category: Write (Medium risk)
- Registry record: grade B, identity unverified
- Server rate-limited: no
- Parameters: 0
- Recommended policy verdict: Rate-limited

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_pdf_from_markdown",
    "arguments": {}
  }
}
```

## Why create_pdf_from_markdown is rated Medium

Tool creates new PDF files from markdown input; reversible write operation with security controls preventing code execution.

From the tool's own definition: "Convert markdown content to PDF. Rendering is self-contained, external URLs blocked."

## Use case

AI agents use create_pdf_from_markdown to create or update resources in Markdown2pdf, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Markdown2pdf environment.

## Recommended policy (PolicyLayer)

Verdict: **Rate-limited**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Markdown2pdf:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "create_pdf_from_markdown": {
      "limits": [
        {
          "counter": "create_pdf_from_markdown_rate",
          "window": "minute",
          "max": 30,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on Markdown2pdf (2)

- `validate_markdown` — Read — https://policylayer.com/tools/2b3pro-markdown2pdf-mcp/validate-markdown.md
- `batch_create_pdf` — Write — https://policylayer.com/tools/2b3pro-markdown2pdf-mcp/batch-create-pdf.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=2b3pro-markdown2pdf-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/2b3pro-markdown2pdf-mcp
