Document Tools
Previsualiza el flujo de texto LTR/RTL en PDF con reordenamiento bidi
Llama a esta herramienta desde tu código en tres lenguajes.
# 1) Upload each file first → returns { filePath }
curl -X POST 'https://api.elysiatools.com/upload/pdf-rtl-ltr-support' \
-F 'file=@/path/to/fontFile.ext'
# 2) Call the tool with the returned filePath values
curl -X POST 'https://api.elysiatools.com/es/api/tools/pdf-rtl-ltr-support' \
-F 'ltrText=Ingrese texto de izquierda a derecha...' \
-F 'rtlText=Ingrese texto de derecha a izquierda...' \
-F 'baseDirection=auto' \
-F 'alignment=auto' \
-F 'fontSize=14' \
-F 'lineHeight=1.5' \
-F 'pageSize=A4' \
-F 'marginTop=72' \
-F 'marginBottom=72' \
-F 'marginLeft=72' \
-F 'marginRight=72' \
-F 'showGuides=true' \
-F 'includeMixedSample=true' \
-F 'fontFile=/path/to/file.ext'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-rtl-ltr-support| Nombre | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| ltrText | textarea | Sí | — |
| rtlText | textarea | Sí | — |
| baseDirection | select | No | — |
| alignment | select | No | — |
| fontSize | number | No | — |
| lineHeight | number | No | — |
| pageSize | select | No | — |
| marginTop | number | No | — |
| marginBottom | number | No | — |
| marginLeft | number | No | — |
| marginRight | number | No | — |
| showGuides | checkbox | No | — |
| includeMixedSample | checkbox | No | — |
| fontFile | filesubida requerida | 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-rtl-ltr-support": {
"name": "pdf-rtl-ltr-support",
"description": "Previsualiza el flujo de texto LTR/RTL en PDF con reordenamiento bidi",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=pdf-rtl-ltr-support",
"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-rtl-ltr-support",
"arguments": {
"ltrText": "Ingrese texto de izquierda a derecha...",
"rtlText": "Ingrese texto de derecha a izquierda...",
"baseDirection": "auto",
"alignment": "auto",
"fontSize": 14,
"lineHeight": 1.5,
"pageSize": "A4",
"marginTop": 72,
"marginBottom": 72,
"marginLeft": 72,
"marginRight": 72,
"showGuides": true,
"includeMixedSample": true,
"fontFile": "https://example.com/file.ext"
}
}
}¿Dudas o problemas? Contacta con [email protected]