Document Tools
Draw review-style side comments, arrows, and highlight regions on PDF pages
Call this tool from your code in three languages.
# 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/en/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'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/pdf-comment-markup| Name | Type | Required | Description |
|---|---|---|---|
| inputPdf | fileupload required | Yes | — |
| markupsJson | textarea | Yes | — |
| highlightOpacity | number | No | — |
| noteOpacity | number | No | — |
| noteWidthRatio | number | No | — |
File result
{
"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)"
}Add this tool to your Model Context Protocol server so AI agents can list and call it.
Add this block to your MCP client configuration:
{
"mcpServers": {
"elysiatools-pdf-comment-markup": {
"name": "pdf-comment-markup",
"description": "Draw review-style side comments, arrows, and highlight regions on PDF pages",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=pdf-comment-markup",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}After connecting to the SSE endpoint, list the exposed tools:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoke the tool by its id, passing arguments built from its parameters:
{
"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
}
}
}Questions or issues? Contact [email protected]