Render a preview (PDF or PNG)
preview_documentProduce a full-fidelity PDF or single-page PNG thumbnail preview of a document for in-browser viewing. Returns base64-encoded data.
Instructions
Produce a preview for the in-browser viewer: a full-fidelity PDF (kind='pdf', default) or a single-page PNG thumbnail (kind='png'). Returns base64. Powers the board's document preview.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"bytes_base64": "<bytes_base64>"
},
"name": "preview_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | pdf = full document; png = one-page thumbnail. | |
| page | No | 0-indexed page for png thumbnails. | |
| bytes_base64 | Yes | The source file bytes, base64-encoded. |