Document Tools
Crea un recibo PDF de ancho térmico con título en negrita y código QR
Llama a esta herramienta desde tu código en tres lenguajes.
curl -X POST 'https://api.elysiatools.com/es/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":"Pedido #A-2041","date":"","thermalWidth":"58","qrData":"https://example.com/order/A-2041","footerText":"¡Gracias por su visita!"}'Envía una petición POST con tus entradas en JSON. Los parámetros de tipo archivo requieren una subida previa.
POST https://api.elysiatools.com/es/api/tools/pdf-receipt-ticket| Nombre | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| storeName | text | Sí | — |
| receiptTitle | text | No | — |
| items | textarea | Sí | — |
| currency | text | No | — |
| taxRate | number | No | — |
| paymentMethod |
Añade esta herramienta a tu servidor Model Context Protocol para que los agentes de IA puedan listarla y llamarla.
Añade este bloque a la configuración de tu cliente MCP:
{
"mcpServers": {
"elysiatools-pdf-receipt-ticket": {
"name": "pdf-receipt-ticket",
"description": "Crea un recibo PDF de ancho térmico con título en negrita y código QR",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=pdf-receipt-ticket",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}Tras conectar al endpoint SSE, lista las herramientas expuestas:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoca la herramienta por su id; los argumentos se construyen a partir de sus parámetros:
{
"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": "Pedido #A-2041",
"date": "",
"thermalWidth": "58",
"qrData": "https://example.com/order/A-2041",
"footerText": "¡Gracias por su visita!"
}
}
}| text |
| No |
| — |
| orderNumber | text | No | — |
| date | date | No | — |
| thermalWidth | select | No | — |
| qrData | text | No | — |
| footerText | textarea | No | — |
Resultado de archivo
{
"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)"
}¿Dudas o problemas? Contacta con [email protected]