Document Tools
Получает README с GitHub и рендерит в PDF
Вызовите этот инструмент из своего кода на трёх языках.
curl -X POST 'https://api.elysiatools.com/ru/api/tools/github-readme-to-pdf' \
-H 'Content-Type: application/json' \
-d '{"repository":"https://github.com/meilisearch/meilisearch","branch":"main","readmePath":"README.md","theme":"print","baseFontSize":13,"pageSize":"A4","landscape":false,"printBackground":true,"marginTop":18,"marginBottom":18,"marginLeft":16,"marginRight":16,"waitUntil":"networkidle0","waitTime":0}'Отправьте POST-запрос с входными данными в JSON. Параметры типа «файл» требуют предварительной загрузки.
POST https://api.elysiatools.com/ru/api/tools/github-readme-to-pdf| Имя | Тип | Обязательный | Описание |
|---|---|---|---|
| repository | text | Да | — |
| branch | text | Нет | — |
| readmePath | text | Нет | — |
| theme | select | Нет | — |
| baseFontSize | number | Нет | — |
| pageSize |
Добавьте этот инструмент на свой сервер Model Context Protocol, чтобы ИИ-агенты могли перечислять и вызывать его.
Добавьте этот блок в конфигурацию вашего MCP-клиента:
{
"mcpServers": {
"elysiatools-github-readme-to-pdf": {
"name": "github-readme-to-pdf",
"description": "Получает README с GitHub и рендерит в PDF",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=github-readme-to-pdf",
"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": "github-readme-to-pdf",
"arguments": {
"repository": "https://github.com/meilisearch/meilisearch",
"branch": "main",
"readmePath": "README.md",
"theme": "print",
"baseFontSize": 13,
"pageSize": "A4",
"landscape": false,
"printBackground": true,
"marginTop": 18,
"marginBottom": 18,
"marginLeft": 16,
"marginRight": 16,
"waitUntil": "networkidle0",
"waitTime": 0
}
}
}| 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)"
}Вопросы или проблемы? Свяжитесь с [email protected]