Document Tools
Genera una plantilla maestra PDF con márgenes, cuadrícula, encabezado/pie y columnas
Llama a esta herramienta desde tu código en tres lenguajes.
curl -X POST 'https://api.elysiatools.com/es/api/tools/pdf-page-master-template' \
-H 'Content-Type: application/json' \
-d '{"title":"Master Page Template","pageSize":"A4","orientation":"portrait","marginTop":72,"marginBottom":72,"marginLeft":72,"marginRight":72,"showBleed":false,"bleedSize":18,"showGrid":true,"gridSize":24,"showBaseline":false,"baselineSpacing":14,"showColumns":true,"columnCount":"2","gutterWidth":18,"showHeaderFooter":true,"headerHeight":36,"footerHeight":36,"safeInset":12,"showRulers":false,"showLabels":true}'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-page-master-template| Nombre | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| title | text | No | — |
| pageSize | select | No | — |
| orientation | select | No | — |
| marginTop | number | No | — |
| marginBottom | number | No | — |
| marginLeft | number | No | — |
| marginRight | number | No | — |
| showBleed | checkbox | No | — |
| bleedSize | number | No | — |
| showGrid | checkbox | No | — |
| gridSize | number | No | — |
| showBaseline | checkbox | No | — |
| baselineSpacing | number | No | — |
| showColumns | checkbox | No | — |
| columnCount | select | No | — |
| gutterWidth | number | No | — |
| showHeaderFooter | checkbox | No | — |
| headerHeight | number | No | — |
| footerHeight | number | No | — |
| safeInset | number | No | — |
| showRulers | checkbox | No | — |
| showLabels | checkbox | 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-page-master-template": {
"name": "pdf-page-master-template",
"description": "Genera una plantilla maestra PDF con márgenes, cuadrícula, encabezado/pie y columnas",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=pdf-page-master-template",
"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-page-master-template",
"arguments": {
"title": "Master Page Template",
"pageSize": "A4",
"orientation": "portrait",
"marginTop": 72,
"marginBottom": 72,
"marginLeft": 72,
"marginRight": 72,
"showBleed": false,
"bleedSize": 18,
"showGrid": true,
"gridSize": 24,
"showBaseline": false,
"baselineSpacing": 14,
"showColumns": true,
"columnCount": "2",
"gutterWidth": 18,
"showHeaderFooter": true,
"headerHeight": 36,
"footerHeight": 36,
"safeInset": 12,
"showRulers": false,
"showLabels": true
}
}
}¿Dudas o problemas? Contacta con [email protected]