Document Tools
Crear documentos PDF de varias columnas estilo periódico/revista
Llama a esta herramienta desde tu código en tres lenguajes.
curl -X POST 'https://api.elysiatools.com/es/api/tools/pdf-multi-column-layout' \
-H 'Content-Type: application/json' \
-d '{"content":"Ingrese el texto de su artículo aquí...","headline":"Titular del Artículo","subheadline":"Subtítulo o resumen del artículo","author":"Por Juan Pérez","date":"1 de enero, 2025","columnCount":"2","gutterWidth":18,"columnBalance":"auto","textAlign":"justify","headlineFontSize":24,"bodyFontSize":10,"lineHeight":1.2,"showSeparatorLines":false,"showDropCap":false,"dropCapLines":3,"showHeader":false,"headerText":"Document Header","headerAlignment":"center","showFooter":false,"footerText":"Page {page} of {total}","footerAlignment":"center","marginTop":72,"marginBottom":72,"marginLeft":72,"marginRight":72}'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-multi-column-layout| Nombre | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| content | textarea | Sí | — |
| headline | text | No | — |
| subheadline | text | No | — |
| author | text | No | — |
| date | text | No | — |
| columnCount | select | No | — |
| gutterWidth | number | No | Espacio entre columnas |
| columnBalance | select | No | — |
| textAlign | select | No | — |
| headlineFontSize | number | No | — |
| bodyFontSize | number | No | — |
| lineHeight | number | No | — |
| showSeparatorLines | checkbox | No | — |
| showDropCap | checkbox | No | — |
| dropCapLines | number | No | — |
| showHeader | checkbox | No | — |
| headerText | text | No | — |
| headerAlignment | select | No | — |
| showFooter | checkbox | No | — |
| footerText | text | No | — |
| footerAlignment | select | No | — |
| marginTop | number | No | — |
| marginBottom | number | No | — |
| marginLeft | number | No | — |
| marginRight | 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-pdf-multi-column-layout": {
"name": "pdf-multi-column-layout",
"description": "Crear documentos PDF de varias columnas estilo periódico/revista",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=pdf-multi-column-layout",
"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-multi-column-layout",
"arguments": {
"content": "Ingrese el texto de su artículo aquí...",
"headline": "Titular del Artículo",
"subheadline": "Subtítulo o resumen del artículo",
"author": "Por Juan Pérez",
"date": "1 de enero, 2025",
"columnCount": "2",
"gutterWidth": 18,
"columnBalance": "auto",
"textAlign": "justify",
"headlineFontSize": 24,
"bodyFontSize": 10,
"lineHeight": 1.2,
"showSeparatorLines": false,
"showDropCap": false,
"dropCapLines": 3,
"showHeader": false,
"headerText": "Document Header",
"headerAlignment": "center",
"showFooter": false,
"footerText": "Page {page} of {total}",
"footerAlignment": "center",
"marginTop": 72,
"marginBottom": 72,
"marginLeft": 72,
"marginRight": 72
}
}
}¿Dudas o problemas? Contacta con [email protected]