Document Tools
Конвертирует Markdown в PDF с светлой, тёмной или печатной темой
Вызовите этот инструмент из своего кода на трёх языках.
# 1) Upload each file first → returns { filePath }
curl -X POST 'https://api.elysiatools.com/upload/markdown-to-pdf-theme-pack' \
-F 'file=@/path/to/markdownFile.ext'
# 2) Call the tool with the returned filePath values
curl -X POST 'https://api.elysiatools.com/ru/api/tools/markdown-to-pdf-theme-pack' \
-F 'markdownContent=# Print Theme
Generated sample content.' \
-F 'markdownFile=/path/to/file.ext' \
-F 'theme=print' \
-F 'baseFontSize=12' \
-F 'pageSize=A4' \
-F 'landscape=false' \
-F 'printBackground=true' \
-F 'marginTop=18' \
-F 'marginBottom=18' \
-F 'marginLeft=16' \
-F 'marginRight=16' \
-F 'waitUntil=networkidle0' \
-F 'waitTime=0'Отправьте POST-запрос с входными данными в JSON. Параметры типа «файл» требуют предварительной загрузки.
POST https://api.elysiatools.com/ru/api/tools/markdown-to-pdf-theme-pack| Имя | Тип | Обязательный | Описание |
|---|---|---|---|
| markdownContent | textarea | Нет | — |
| markdownFile | fileнужна загрузка | Нет | — |
| theme | select | Нет | — |
| 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-markdown-to-pdf-theme-pack": {
"name": "markdown-to-pdf-theme-pack",
"description": "Конвертирует Markdown в PDF с светлой, тёмной или печатной темой",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=markdown-to-pdf-theme-pack",
"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": "markdown-to-pdf-theme-pack",
"arguments": {
"markdownContent": "# Print Theme\n\nGenerated sample content.",
"markdownFile": "https://example.com/file.ext",
"theme": "print",
"baseFontSize": 12,
"pageSize": "A4",
"landscape": false,
"printBackground": true,
"marginTop": 18,
"marginBottom": 18,
"marginLeft": 16,
"marginRight": 16,
"waitUntil": "networkidle0",
"waitTime": 0
}
}
}Вопросы или проблемы? Свяжитесь с [email protected]