Document Tools
Renderiza contenido HTML de correo a PDF conservando formato basico
Llama a esta herramienta desde tu código en tres lenguajes.
# 1) Request a presigned URL → returns { uploadUrl, storageKey }
curl -X POST 'https://api.elysiatools.com/api/upload/presign/libreoffice-html-mail-to-pdf' \
-H 'Content-Type: application/json' \
-d '{"filename":"htmlFile.ext","contentType":"application/octet-stream","size":12345}'
# 2) PUT the file bytes directly to the presigned uploadUrl
curl -X PUT '<presigned uploadUrl>' \
--data-binary @/path/to/file.ext
# 3) Call the tool, passing the returned storageKey for each file field
curl -X POST 'https://api.elysiatools.com/es/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=uploads/2026/01/01/your-tool-1700000000000-abc123.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'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/libreoffice-html-mail-to-pdf| Nombre | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| mailHtml | textarea | No | — |
| htmlFile | filesubida requerida | No | — |
| subject | text | No | — |
| from | text | No | — |
| to | text | No | — |
| date | text | No | — |
| pageSize | select | No | — |
| landscape | checkbox | No | — |
| marginMm | number | 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)"
}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-libreoffice-html-mail-to-pdf": {
"name": "libreoffice-html-mail-to-pdf",
"description": "Renderiza contenido HTML de correo a PDF conservando formato basico",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=libreoffice-html-mail-to-pdf",
"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": "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
}
}
}¿Dudas o problemas? Contacta con [email protected]