Document Tools
Rend le contenu HTML d un email en PDF en conservant la mise en forme de base
Appelez cet outil depuis votre code en trois langages.
# 1) Upload each file first → returns { filePath }
curl -X POST 'https://api.elysiatools.com/upload/libreoffice-html-mail-to-pdf' \
-F 'file=@/path/to/htmlFile.ext'
# 2) Call the tool with the returned filePath values
curl -X POST 'https://api.elysiatools.com/fr/api/tools/libreoffice-html-mail-to-pdf' \
-F 'mailHtml=<h2 style='color:#0f172a'>Q1 Product Update</h2><p>Hello team,</p><p>We shipped 3 major features this quarter.</p><table><tr><th>Area</th><th>Status</th></tr><tr><td>Platform</td><td>Stable</td></tr><tr><td>Growth</td><td>+18%</td></tr></table><p>Regards,<br/>Product Ops</p>' \
-F 'htmlFile=/path/to/file.ext' \
-F 'subject=Quarterly Product Update' \
-F '[email protected]' \
-F '[email protected]' \
-F 'date=2026-02-16 10:00' \
-F 'pageSize=A4' \
-F 'landscape=false' \
-F 'marginMm=12'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/libreoffice-html-mail-to-pdf| Nom | Type | Requis | Description |
|---|---|---|---|
| mailHtml | textarea | Non | — |
| htmlFile | fileupload requis | Non | — |
| subject | text | Non | — |
| from | text | Non | — |
| to | text | Non | — |
| date | text | Non | — |
| pageSize | select | Non | — |
| landscape | checkbox | Non | — |
| marginMm | number | 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)"
}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-libreoffice-html-mail-to-pdf": {
"name": "libreoffice-html-mail-to-pdf",
"description": "Rend le contenu HTML d un email en PDF en conservant la mise en forme de base",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=libreoffice-html-mail-to-pdf",
"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": "libreoffice-html-mail-to-pdf",
"arguments": {
"mailHtml": "<h2 style='color:#0f172a'>Q1 Product Update</h2><p>Hello team,</p><p>We shipped 3 major features this quarter.</p><table><tr><th>Area</th><th>Status</th></tr><tr><td>Platform</td><td>Stable</td></tr><tr><td>Growth</td><td>+18%</td></tr></table><p>Regards,<br/>Product Ops</p>",
"htmlFile": "https://example.com/file.ext",
"subject": "Quarterly Product Update",
"from": "[email protected]",
"to": "[email protected]",
"date": "2026-02-16 10:00",
"pageSize": "A4",
"landscape": false,
"marginMm": 12
}
}
}Des questions ou un problème ? Contactez [email protected]