Document Tools
Renderiza dados tabulares em PDF paginado com cabeçalhos repetidos e linhas zebradas
Chame esta ferramenta a partir do seu código em três idiomas.
curl -X POST 'https://api.elysiatools.com/pt/api/tools/pdf-table-layout-engine' \
-H 'Content-Type: application/json' \
-d '{"tableData":"[{\"Product\":\"Widget A\",\"Qty\":2,\"Price\":19.5,\"Total\":39},{\"Product\":\"Widget B\",\"Qty\":1,\"Price\":9.9,\"Total\":9.9}]","columns":"Product, Qty, Price, Total","title":"Quarterly Sales","subtitle":"Generated sample","pageSize":"A4","orientation":"landscape","fontSize":11,"margin":16,"repeatHeader":true,"zebraRows":true}'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/pdf-table-layout-engine| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
| tableData | textarea | Sim | — |
| columns | text | Não | — |
| title | text | Não | — |
| subtitle | text | Não | — |
| pageSize | select | Não | — |
| orientation |
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-pdf-table-layout-engine": {
"name": "pdf-table-layout-engine",
"description": "Renderiza dados tabulares em PDF paginado com cabeçalhos repetidos e linhas zebradas",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=pdf-table-layout-engine",
"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": "pdf-table-layout-engine",
"arguments": {
"tableData": "[{\"Product\":\"Widget A\",\"Qty\":2,\"Price\":19.5,\"Total\":39},{\"Product\":\"Widget B\",\"Qty\":1,\"Price\":9.9,\"Total\":9.9}]",
"columns": "Product, Qty, Price, Total",
"title": "Quarterly Sales",
"subtitle": "Generated sample",
"pageSize": "A4",
"orientation": "landscape",
"fontSize": 11,
"margin": 16,
"repeatHeader": true,
"zebraRows": true
}
}
}| select |
| Não |
| — |
| fontSize | number | Não | — |
| margin | number | Não | — |
| repeatHeader | checkbox | Não | — |
| zebraRows | checkbox | 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]