Document Tools
Busca um README no GitHub e gera um PDF
Chame esta ferramenta a partir do seu código em três idiomas.
curl -X POST 'https://api.elysiatools.com/pt/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}'Envie uma requisição POST com suas entradas em JSON. Parâmetros do tipo arquivo exigem upload prévio.
POST https://api.elysiatools.com/pt/api/tools/github-readme-to-pdf| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
| repository | text | Sim | — |
| branch | text | Não | — |
| readmePath | text | Não | — |
| theme | select | Não | — |
| baseFontSize | number | Não | — |
| pageSize |
Adicione esta ferramenta ao seu servidor Model Context Protocol para que agentes de IA possam listá-la e chamá-la.
Adicione este bloco à configuração do seu cliente MCP:
{
"mcpServers": {
"elysiatools-github-readme-to-pdf": {
"name": "github-readme-to-pdf",
"description": "Busca um README no GitHub e gera um PDF",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=github-readme-to-pdf",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}Após conectar ao endpoint SSE, liste as ferramentas expostas:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoque a ferramenta pelo seu id; os argumentos são construídos a partir de seus parâmetros:
{
"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 |
| Não |
| — |
| landscape | checkbox | Não | — |
| printBackground | checkbox | Não | — |
| marginTop | number | Não | — |
| marginBottom | number | Não | — |
| marginLeft | number | Não | — |
| marginRight | number | Não | — |
| waitUntil | select | Não | — |
| waitTime | number | Não | — |
Resultado de arquivo
{
"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)"
}Dúvidas ou problemas? Contate [email protected]