Document Tools
Dibuja cajas laterales, flechas y resaltados estilo revision
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-comment-markup' \
-F 'file=@/path/to/inputPdf.ext'
# 2) Call the tool with the returned filePath values
curl -X POST 'https://api.elysiatools.com/es/api/tools/pdf-comment-markup' \
-F 'inputPdf=/Users/quyue/www/elysia-tools/public/samples/pdf/outline-bookmarks-example1.pdf' \
-F 'markupsJson=[{"page":1,"kind":"highlight","x":14,"y":20,"w":45,"h":8,"text":"Need stronger source"},{"page":1,"kind":"comment","x":20,"y":38,"w":34,"h":9,"text":"Clarify this claim with data.","side":"right"}]' \
-F 'highlightOpacity=0.26' \
-F 'noteOpacity=0.95' \
-F 'noteWidthRatio=0.22'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-comment-markup| Nombre | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| inputPdf | filesubida requerida | Sí | — |
| markupsJson | textarea | Sí | — |
| highlightOpacity | number | No | — |
| noteOpacity | number | No | — |
| noteWidthRatio | 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-comment-markup": {
"name": "pdf-comment-markup",
"description": "Dibuja cajas laterales, flechas y resaltados estilo revision",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=pdf-comment-markup",
"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-comment-markup",
"arguments": {
"inputPdf": "/Users/quyue/www/elysia-tools/public/samples/pdf/outline-bookmarks-example1.pdf",
"markupsJson": "[{\"page\":1,\"kind\":\"highlight\",\"x\":14,\"y\":20,\"w\":45,\"h\":8,\"text\":\"Need stronger source\"},{\"page\":1,\"kind\":\"comment\",\"x\":20,\"y\":38,\"w\":34,\"h\":9,\"text\":\"Clarify this claim with data.\",\"side\":\"right\"}]",
"highlightOpacity": 0.26,
"noteOpacity": 0.95,
"noteWidthRatio": 0.22
}
}
}¿Dudas o problemas? Contacta con [email protected]