generate_document
Create a DOCX or PDF document by merging a template with key-value data. Receives a signed download URL. Uses credits: 1 for DOCX, 2 for PDF.
Instructions
Generate a single document from a template and data. Returns a signed download URL. Costs 1 credit (DOCX) or 2 credits (PDF).
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": {
"templateId": "<templateId>",
"data": "<data>"
},
"name": "generate_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| templateId | Yes | Template UUID | |
| data | Yes | Key-value data to fill into the template. Keys must match template variables. | |
| outputFormat | No | Output format: docx (1 credit) or pdf (2 credits) | docx |