Generate document preview
generate_documentGenerate a draft of the document from the user's answers. Returns a free watermarked PDF preview and the exact price. Validates all answers against the encoded national rules first — if validation fails, you get structured errors to relay to the user. Also returns what is NOT covered by the automated checks: always relay the not_covered items to the user.
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": {
"document_type": "<document_type>",
"country": "<country>",
"answers": "<answers>"
},
"name": "generate_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| answers | Yes | Answers keyed by field id, exactly as returned by get_requirements | |
| country | Yes | ||
| language | No | ||
| document_type | Yes |