documents
List, preview, print and attach KeyCRM document templates for orders, leads and clients, and export xlsx templates and print layouts.
Instructions
Printed documents (документи): templates, preview, print.
Actions: list - document templates of the account (empty on this tenant) by_scope - scope required (order / lead / client), templates for it export_template / export_formats - xlsx export template and formats print_layouts - list printing layouts (config/print) preview - data required: {"type": "order", "structure": }; structure may be a dict/list and is stringified for you; returns rendered HTML view preview_pdf- same body, returns a short text head of the PDF (the client truncates binary bodies) print - template_id + scope + model_id, returns document text head attach - template_id + scope + model_id + data, attaches a document Document writes are limited to preview/print/attach; templates are not created or edited here.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "documents"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| scope | No | ||
| action | No | list | |
| model_id | No | ||
| template_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |