Document Tools
Generate API documentation PDF from code comments
Call this tool from your code in three languages.
# 1) Upload each file first → returns { filePath }
curl -X POST 'https://api.elysiatools.com/upload/doc-comment-to-pdf-docs' \
-F 'file=@/path/to/sourceFile.ext'
# 2) Call the tool with the returned filePath values
curl -X POST 'https://api.elysiatools.com/en/api/tools/doc-comment-to-pdf-docs' \
-F 'sourceText=/**
* Adds two values
* @param {number} a
* @param {number} b
*/
function add(a,b){ return a+b }' \
-F 'sourceFile=/path/to/file.ext' \
-F 'docTitle=Utility Docs' \
-F 'version=1.0.0' \
-F 'baseFontSize=12' \
-F 'pageSize=A4' \
-F 'landscape=false' \
-F 'printBackground=true' \
-F 'marginTop=18' \
-F 'marginBottom=18' \
-F 'marginLeft=18' \
-F 'marginRight=18' \
-F 'waitUntil=networkidle0' \
-F 'waitTime=0'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/doc-comment-to-pdf-docs| Name | Type | Required | Description |
|---|---|---|---|
| sourceText | textarea | No | — |
| sourceFile | fileupload required | No | — |
| docTitle | text | No | — |
| version | text | No | — |
| baseFontSize | number | No | — |
| pageSize | select | No | — |
| landscape | checkbox | No | — |
| printBackground | checkbox | No | — |
| marginTop | number | No | — |
| marginBottom | number | No | — |
| marginLeft | number | No | — |
| marginRight | number | No | — |
| waitUntil | select | No | — |
| waitTime | 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-doc-comment-to-pdf-docs": {
"name": "doc-comment-to-pdf-docs",
"description": "Generate API documentation PDF from code comments",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=doc-comment-to-pdf-docs",
"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": "doc-comment-to-pdf-docs",
"arguments": {
"sourceText": "/**\n * Adds two values\n * @param {number} a\n * @param {number} b\n */\nfunction add(a,b){ return a+b }",
"sourceFile": "https://example.com/file.ext",
"docTitle": "Utility Docs",
"version": "1.0.0",
"baseFontSize": 12,
"pageSize": "A4",
"landscape": false,
"printBackground": true,
"marginTop": 18,
"marginBottom": 18,
"marginLeft": 18,
"marginRight": 18,
"waitUntil": "networkidle0",
"waitTime": 0
}
}
}Questions or issues? Contact [email protected]