Document Tools
Создает термочек PDF с жирным заголовком и QR-кодом
Вызовите этот инструмент из своего кода на трёх языках.
curl -X POST 'https://api.elysiatools.com/ru/api/tools/pdf-receipt-ticket' \
-H 'Content-Type: application/json' \
-d '{"storeName":"Luna Coffee Bar","receiptTitle":"Order Receipt","items":"[{\"name\":\"Latte\",\"quantity\":2,\"unitPrice\":4.5},{\"name\":\"Croissant\",\"quantity\":1,\"unitPrice\":3.2}]","currency":"USD","taxRate":8.25,"paymentMethod":"Visa •••• 4242","orderNumber":"Заказ #A-2041","date":"","thermalWidth":"58","qrData":"https://example.com/order/A-2041","footerText":"Спасибо за визит!"}'Отправьте POST-запрос с входными данными в JSON. Параметры типа «файл» требуют предварительной загрузки.
POST https://api.elysiatools.com/ru/api/tools/pdf-receipt-ticket| Имя | Тип | Обязательный | Описание |
|---|---|---|---|
| storeName | text | Да | — |
| receiptTitle | text | Нет | — |
| items | textarea | Да | — |
| currency | text | Нет | — |
| taxRate | number | Нет | — |
| paymentMethod |
Добавьте этот инструмент на свой сервер Model Context Protocol, чтобы ИИ-агенты могли перечислять и вызывать его.
Добавьте этот блок в конфигурацию вашего MCP-клиента:
{
"mcpServers": {
"elysiatools-pdf-receipt-ticket": {
"name": "pdf-receipt-ticket",
"description": "Создает термочек PDF с жирным заголовком и QR-кодом",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=pdf-receipt-ticket",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}После подключения к SSE-endpoint выведите список доступных инструментов:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Вызовите инструмент по его id; аргументы формируются из его параметров:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "pdf-receipt-ticket",
"arguments": {
"storeName": "Luna Coffee Bar",
"receiptTitle": "Order Receipt",
"items": "[{\"name\":\"Latte\",\"quantity\":2,\"unitPrice\":4.5},{\"name\":\"Croissant\",\"quantity\":1,\"unitPrice\":3.2}]",
"currency": "USD",
"taxRate": 8.25,
"paymentMethod": "Visa •••• 4242",
"orderNumber": "Заказ #A-2041",
"date": "",
"thermalWidth": "58",
"qrData": "https://example.com/order/A-2041",
"footerText": "Спасибо за визит!"
}
}
}| text |
| Нет |
| — |
| orderNumber | text | Нет | — |
| date | date | Нет | — |
| thermalWidth | select | Нет | — |
| qrData | text | Нет | — |
| footerText | textarea | Нет | — |
Файловый результат
{
"filePath": "/public/processing/randomid.ext",
"fileName": "output.ext",
"contentType": "application/octet-stream",
"size": 1024,
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}Вопросы или проблемы? Свяжитесь с [email protected]