Document Tools
Crée un reçu PDF au format thermique avec titre en gras et QR code
Appelez cet outil depuis votre code en trois langages.
curl -X POST 'https://api.elysiatools.com/fr/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":"Commande #A-2041","date":"","thermalWidth":"58","qrData":"https://example.com/order/A-2041","footerText":"Merci de votre visite !"}'Envoyez une requête POST avec vos entrées en JSON. Les paramètres de type fichier nécessitent un upload préalable.
POST https://api.elysiatools.com/fr/api/tools/pdf-receipt-ticket| Nom | Type | Requis | Description |
|---|---|---|---|
| storeName | text | Oui | — |
| receiptTitle | text | Non | — |
| items | textarea | Oui | — |
| currency | text | Non | — |
| taxRate | number | Non | — |
| paymentMethod |
Ajoutez cet outil à votre serveur Model Context Protocol pour que les agents IA puissent le lister et l'appeler.
Ajoutez ce bloc à la configuration de votre client MCP :
{
"mcpServers": {
"elysiatools-pdf-receipt-ticket": {
"name": "pdf-receipt-ticket",
"description": "Crée un reçu PDF au format thermique avec titre en gras et QR code",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=pdf-receipt-ticket",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}Après connexion au point d'accès SSE, listez les outils exposés :
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Appelez l'outil par son id ; les arguments sont construits à partir de ses paramètres :
{
"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": "Commande #A-2041",
"date": "",
"thermalWidth": "58",
"qrData": "https://example.com/order/A-2041",
"footerText": "Merci de votre visite !"
}
}
}| text |
| Non |
| — |
| orderNumber | text | Non | — |
| date | date | Non | — |
| thermalWidth | select | Non | — |
| qrData | text | Non | — |
| footerText | textarea | Non | — |
Résultat fichier
{
"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)"
}Des questions ou un problème ? Contactez [email protected]