Document Tools
Создает PDF документацию из комментариев
Вызовите этот инструмент из своего кода на трёх языках.
# 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/ru/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'Отправьте POST-запрос с входными данными в JSON. Параметры типа «файл» требуют предварительной загрузки.
POST https://api.elysiatools.com/ru/api/tools/doc-comment-to-pdf-docs| Имя | Тип | Обязательный | Описание |
|---|---|---|---|
| sourceText | textarea | Нет | — |
| sourceFile | fileнужна загрузка | Нет | — |
| docTitle | text | Нет | — |
| version | text | Нет | — |
| baseFontSize | number | Нет | — |
| pageSize | select | Нет | — |
| landscape | checkbox | Нет | — |
| printBackground | checkbox | Нет | — |
| marginTop | number | Нет | — |
| marginBottom | number | Нет | — |
| marginLeft | number | Нет | — |
| marginRight | number | Нет | — |
| waitUntil | select | Нет | — |
| waitTime | number | Нет | — |
Файловый результат
{
"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)"
}Добавьте этот инструмент на свой сервер Model Context Protocol, чтобы ИИ-агенты могли перечислять и вызывать его.
Добавьте этот блок в конфигурацию вашего MCP-клиента:
{
"mcpServers": {
"elysiatools-doc-comment-to-pdf-docs": {
"name": "doc-comment-to-pdf-docs",
"description": "Создает PDF документацию из комментариев",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=doc-comment-to-pdf-docs",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}После подключения к SSE-endpoint выведите список доступных инструментов:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Вызовите инструмент по его id; аргументы формируются из его параметров:
{
"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
}
}
}Вопросы или проблемы? Свяжитесь с [email protected]