generate_document
Generate a PDF from a template by merging your data, then retrieve the download URL when processing completes. Optionally specify a workspace.
Instructions
Generate a PDF document from a template with provided data. This uses async generation with automatic polling until completion. Returns the download URL when ready. Optionally target a specific workspace with workspace_id.
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": {
"template_id": "<template_id>",
"payload": "<payload>"
},
"name": "generate_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ttl | No | Optional time-to-live for automatic deletion (e.g., "7d", "2h", "30m") | |
| meta | No | Optional additional metadata to store with the document | |
| payload | Yes | The data to merge into the template (must match template structure) | |
| filename | No | Optional filename for the generated PDF (e.g., "invoice-001.pdf") | |
| template_id | Yes | The ID of the template to use for generation | |
| workspace_id | No | Optional workspace (app) ID to generate the document in. When omitted, uses the default workspace. |