# documents_create

Render a document (PDF / HTML / PPTX / DOCX) and save it to the workspace. This tool has two input pipelines — pass exactly one of content_html or content_markdown. Pipeline A — content_html (canonical for decks, proposals, designed pages) You author full HTML+CSS. A baked-in design-system preamble ships first (<style> with Inter/Manrope as data-URI fonts, CSS-variable palette tokens, 8px spacing scale, and pre-styled layout helpers); your markup and any of your own <style> blocks land after the preamble so you can override anything. Chromium renders the assembled document into a static PDF — JavaScript is disabled and DNS is blackholed, so external font / image / script fetches will fail by configuration. Required when this pipeline is used: - title — human-readable, used for PDF metadata and the saved filename. - content_html — the <body> and any custom <style> blocks. The renderer wraps this in <html>…</html> and injects the preamble + a canonical <meta charset> + <title>. Do NOT emit <script>, <iframe>, <object>, <embed>, <meta>, <link>, <base>, <form>, or event handlers — the sanitizer strips them. - output_type — "pdf" or "html". ("pptx" and "docx" require content_markdown since they need structured markdown intermediates.) Optional: - page_preset — "slide_16_9" (default for any deck), "a4" (default for flowing documents — used if omitted), "letter", or "none" (you declare your own @page rule). For a web-styled page (dark background, full-bleed sections) use "none" and declare @page { margin: 0 }, set the background on html as well as body, and add print-color-adjust: exact — the a4/letter presets keep 24mm paper margins, which paint as a white frame around dark designs. - design_tokens — flat dict overriding the preamble's CSS variables. Whitelisted keys: brand_primary, accent, surface_dark (hex color), font_display, font_body (font name from ['Inter', 'Manrope', 'monospace', 'sans-serif', 'serif', 'system-ui', 'ui-monospace', 'ui-sans-serif', 'ui-serif']). - language — BCP-47 tag (default "en"). Drives <html lang>. Slide structure (page_preset="slide_16_9") Each slide is <section class="slide …">…</section>. The base .slide class is what sizes it to the viewport and forces the page break — do not drop it. Composable variants (apply alongside .slide): - .slide-cover — gradient hero, big display title. - .slide-split — two equal columns, image + narrative. - .slide-stats — three-up KPI cards (use <div class="stat"> with .stat-value + .stat-label inside). - .slide-quote — centered pull quote + <cite> attribution. Layout helpers (work in any preset): .grid-2, .grid-3, .split, .stack, .cluster, .callout, .muted, .kbd. Speaker notes <aside class="notes">…text…</aside> inside a <section class="slide">. The sanitizer strips them from the rendered PDF and returns them as slide_notes[] (parallel to slide order). Orphan notes outside any slide are dropped with a warning. Images Only these src schemes resolve: - file:NNN — workspace file_id. - data:image/...;base64,... — inline. - https://<host> where <host> ∈ DOCUMENTS_MEDIA_URL_ALLOWLIST. Other URLs are dropped and replaced with an HTML comment placeholder. Pipeline B — content_markdown (invoice / contract only) Required: - title, content_markdown, output_type. Optional: - theme — "invoice" or "contract". Triggers the corresponding exemplar styling and (for invoices) the arithmetic validator that fail-closes on missing or mismatched totals. - language — BCP-47 (default "en"). Delivery contract (CRITICAL) After this tool returns file_id, deliver the file with messages.send(attachments=[file_id], text="<short caption>"). Embedding the file_id in a markdown link, sandbox: URL, or /api/files/<id>/download text will render as plain text on the recipient's channel — the attachments parameter is the only way the file actually attaches. Exemplars INVOICE (English): Invoice INV-{YYYYMMDD-HHMMSS} From: {Issuer Legal Name}, {Address}, {Tax ID} To: {Customer Name}, {Customer Address}, {Customer Tax ID} Issue date: {YYYY-MM-DD} Due date: {YYYY-MM-DD} | Description | Qty | Unit price | Total | |---|---:|---:|---:| | {Service 1} | 1 | 1500.00 | 1500.00 | | {Service 2} | 2 | 500.00 | 1000.00 | Subtotal: USD 2500.00 Tax (20%): USD 500.00 Total: USD 3000.00 Payment: {bank details OR crypto wallet — never both} INVOICE (Russian): Счёт-фактура № INV-{YYYYMMDD-HHMMSS} От: {Юридическое название организации}, {Адрес}, ИНН {Tax ID} Кому: {Название клиента}, {Адрес клиента}, ИНН {Tax ID} Дата: {YYYY-MM-DD} Срок оплаты: {YYYY-MM-DD} | Описание | Кол-во | Цена | Сумма | |---|---:|---:|---:| | {Услуга 1} | 1 | 1500.00 | 1500.00 | | {Услуга 2} | 2 | 500.00 | 1000.00 | Подытог: USD 2500.00 НДС (20%): USD 500.00 Итого: USD 3000.00 Реквизиты: {банковские реквизиты ИЛИ криптокошелёк — не оба сразу} CONTRACT (English): Service Agreement Between: {Provider Legal Name}, {Address} ("Provider") And: {Client Legal Name}, {Address} ("Client") Effective date: {YYYY-MM-DD} 1. Scope of services {Concise description of what Provider agrees to deliver.} 2. Term This Agreement begins on the Effective date and continues until {termination condition or end date}. 3. Compensation Client pays Provider {amount and currency} according to {payment schedule}. 4. Confidentiality Both parties agree to keep proprietary information of the other party confidential during and after the term of this Agreement. 5. Termination Either party may terminate with {N} days' written notice. 6. Governing law {Jurisdiction}. --- Provider: ____________________ Client: ____________________ {Provider signatory name} {Client signatory name} CONTRACT (Russian): Договор оказания услуг Между: {Юридическое название Исполнителя}, {Адрес} ("Исполнитель") И: {Юридическое название Заказчика}, {Адрес} ("Заказчик") Дата вступления в силу: {YYYY-MM-DD} 1. Предмет договора {Краткое описание услуг, которые Исполнитель обязуется оказать.} 2. Срок действия Договор вступает в силу с указанной даты и действует до {условие прекращения или дата окончания}. 3. Стоимость и порядок оплаты Заказчик оплачивает услуги Исполнителя в размере {сумма и валюта} в порядке {график платежей}. 4. Конфиденциальность Стороны обязуются сохранять конфиденциальность сведений, полученных в ходе исполнения настоящего Договора, в течение срока его действия и после его прекращения. 5. Расторжение Любая из сторон вправе расторгнуть Договор, направив письменное уведомление не менее чем за {N} дней. 6. Применимое право {Юрисдикция}. --- Исполнитель: ____________________ Заказчик: ____________________ {ФИО подписанта Исполнителя} {ФИО подписанта Заказчика}

Agent View of the PolicyLayer registry record for `documents_create`. HTML page: https://policylayer.com/tools/io-github-saloprj-dialogbrain/documents-create

## Facts

- Tool: `documents_create`
- Server: Dialogbrain (`https://api.dialogbrain.com/mcp`) — https://policylayer.com/tools/io-github-saloprj-dialogbrain.md
- Homepage: https://github.com/saloprj/dialogbrain-mcp
- Risk category: Write (Medium risk)
- Registry record: grade F, identity unverified
- Server auth posture: open
- Server rate-limited: no
- Parameters: 8 (2 required)
- Recommended policy verdict: Rate-limited

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `theme` | string | no | Invoice or contract styling for content_markdown. Rejected with content_html (use design_tokens + your own CSS instead). OMIT for default (unthemed) styling. |
| `title` | string | yes | Short human-readable title for the document. |
| `language` | string | no | BCP-47 language tag (e.g. 'en', 'ru', 'zh', 'ja'). Drives <html lang> and (markdown path) font fallback for non-Latin scripts. |
| `output_type` | string | yes | Renderer target: 'pdf' \| 'pptx' \| 'docx' \| 'html'. PPTX/DOCX require content_markdown. |
| `page_preset` | string | no | Page geometry for content_html. 'slide_16_9' = 1280x720 deck, 'a4'/'letter' = flowing document, 'none' = LLM declares its own @page. Defaults to 'a4' inside the |
| `content_html` | string | no | Full HTML body (with optional <style> blocks) for the canonical Chromium pipeline. Mutually exclusive with content_markdown. |
| `design_tokens` | object | no | Flat dict of CSS-variable overrides for content_html. Whitelisted keys: brand_primary, accent, surface_dark (hex color), font_display, font_body (Inter\|Manrope\| |
| `content_markdown` | string | no | Markdown body for the invoice/contract pipeline. Mutually exclusive with content_html. |

Parameters from the server's own tool schema.

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

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "documents_create",
    "arguments": {
      "title": "<title>",
      "output_type": "<output_type>"
    }
  }
}
```

## Why documents_create is rated Medium

An AI agent can call documents_create faster than any human can review: one bad instruction and it creates or modifies resources in Dialogbrain by the hundred, each call as confident as the last.

## Use case

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

## Recommended policy (PolicyLayer)

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

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

## Other tools on Dialogbrain (224)

- `agents_delete` — Destructive — https://policylayer.com/tools/io-github-saloprj-dialogbrain/agents-delete.md
- `agents_trigger_delete` — Destructive — https://policylayer.com/tools/io-github-saloprj-dialogbrain/agents-trigger-delete.md
- `ai_filters_delete` — Destructive — https://policylayer.com/tools/io-github-saloprj-dialogbrain/ai-filters-delete.md
- `ai_tags_delete` — Destructive — https://policylayer.com/tools/io-github-saloprj-dialogbrain/ai-tags-delete.md
- `calendar_delete_event` — Destructive — https://policylayer.com/tools/io-github-saloprj-dialogbrain/calendar-delete-event.md
- `collections_delete` — Destructive — https://policylayer.com/tools/io-github-saloprj-dialogbrain/collections-delete.md
- `files_delete` — Destructive — https://policylayer.com/tools/io-github-saloprj-dialogbrain/files-delete.md
- `folders_delete` — Destructive — https://policylayer.com/tools/io-github-saloprj-dialogbrain/folders-delete.md
- `integrations_remove_endpoints` — Destructive — https://policylayer.com/tools/io-github-saloprj-dialogbrain/integrations-remove-endpoints.md
- `messages_delete` — Destructive — https://policylayer.com/tools/io-github-saloprj-dialogbrain/messages-delete.md
- `notes_delete` — Destructive — https://policylayer.com/tools/io-github-saloprj-dialogbrain/notes-delete.md
- `reminder_cancel` — Destructive — https://policylayer.com/tools/io-github-saloprj-dialogbrain/reminder-cancel.md
- `tasks_delete` — Destructive — https://policylayer.com/tools/io-github-saloprj-dialogbrain/tasks-delete.md
- `threads_delete` — Destructive — https://policylayer.com/tools/io-github-saloprj-dialogbrain/threads-delete.md
- `widgets_delete` — Destructive — https://policylayer.com/tools/io-github-saloprj-dialogbrain/widgets-delete.md
- `youtube_delete_comment` — Destructive — https://policylayer.com/tools/io-github-saloprj-dialogbrain/youtube-delete-comment.md
- `youtube_delete_video` — Destructive — https://policylayer.com/tools/io-github-saloprj-dialogbrain/youtube-delete-video.md
- `agent_handoff` — Execute — https://policylayer.com/tools/io-github-saloprj-dialogbrain/agent-handoff.md
- `agents_simulate_inbound` — Execute — https://policylayer.com/tools/io-github-saloprj-dialogbrain/agents-simulate-inbound.md
- `android_launch_app` — Execute — https://policylayer.com/tools/io-github-saloprj-dialogbrain/android-launch-app.md
- `android_shell` — Execute — https://policylayer.com/tools/io-github-saloprj-dialogbrain/android-shell.md
- `android_ui_dump` — Execute — https://policylayer.com/tools/io-github-saloprj-dialogbrain/android-ui-dump.md
- `background_run` — Execute — https://policylayer.com/tools/io-github-saloprj-dialogbrain/background-run.md
- `browser_attach_meet` — Execute — https://policylayer.com/tools/io-github-saloprj-dialogbrain/browser-attach-meet.md
- `browser_click` — Execute — https://policylayer.com/tools/io-github-saloprj-dialogbrain/browser-click.md
- `browser_close` — Execute — https://policylayer.com/tools/io-github-saloprj-dialogbrain/browser-close.md
- `browser_drag` — Execute — https://policylayer.com/tools/io-github-saloprj-dialogbrain/browser-drag.md
- `browser_evaluate` — Execute — https://policylayer.com/tools/io-github-saloprj-dialogbrain/browser-evaluate.md
- `browser_fill` — Execute — https://policylayer.com/tools/io-github-saloprj-dialogbrain/browser-fill.md
- `browser_fill_form` — Execute — https://policylayer.com/tools/io-github-saloprj-dialogbrain/browser-fill-form.md
- …and 194 more: https://policylayer.com/tools/io-github-saloprj-dialogbrain.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=io-github-saloprj-dialogbrain · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/io-github-saloprj-dialogbrain
