Document Tools
Criar documentos PDF de múltiplas colunas estilo jornal/revista
Chame esta ferramenta a partir do seu código em três idiomas.
curl -X POST 'https://api.elysiatools.com/pt/api/tools/pdf-multi-column-layout' \
-H 'Content-Type: application/json' \
-d '{"content":"Digite o texto do seu artigo aqui...","headline":"Manchete do Artigo","subheadline":"Subtítulo ou resumo do artigo","author":"Por João Silva","date":"1 de janeiro, 2025","columnCount":"2","gutterWidth":18,"columnBalance":"auto","textAlign":"justify","headlineFontSize":24,"bodyFontSize":10,"lineHeight":1.2,"showSeparatorLines":false,"showDropCap":false,"dropCapLines":3,"showHeader":false,"headerText":"Document Header","headerAlignment":"center","showFooter":false,"footerText":"Page {page} of {total}","footerAlignment":"center","marginTop":72,"marginBottom":72,"marginLeft":72,"marginRight":72}'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-multi-column-layout| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
| content | textarea | Sim | — |
| headline | text | Não | — |
| subheadline | text | Não | — |
| author | text | Não | — |
| date | text | Não | — |
| columnCount | select | Não | — |
| gutterWidth | number | Não | Espaço entre colunas |
| columnBalance | select | Não | — |
| textAlign | select | Não | — |
| headlineFontSize | number | Não | — |
| bodyFontSize | number | Não | — |
| lineHeight | number | Não | — |
| showSeparatorLines | checkbox | Não | — |
| showDropCap | checkbox | Não | — |
| dropCapLines | number | Não | — |
| showHeader | checkbox | Não | — |
| headerText | text | Não | — |
| headerAlignment | select | Não | — |
| showFooter | checkbox | Não | — |
| footerText | text | Não | — |
| footerAlignment | select | Não | — |
| marginTop | number | Não | — |
| marginBottom | number | Não | — |
| marginLeft | number | Não | — |
| marginRight | 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)"
}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-multi-column-layout": {
"name": "pdf-multi-column-layout",
"description": "Criar documentos PDF de múltiplas colunas estilo jornal/revista",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=pdf-multi-column-layout",
"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-multi-column-layout",
"arguments": {
"content": "Digite o texto do seu artigo aqui...",
"headline": "Manchete do Artigo",
"subheadline": "Subtítulo ou resumo do artigo",
"author": "Por João Silva",
"date": "1 de janeiro, 2025",
"columnCount": "2",
"gutterWidth": 18,
"columnBalance": "auto",
"textAlign": "justify",
"headlineFontSize": 24,
"bodyFontSize": 10,
"lineHeight": 1.2,
"showSeparatorLines": false,
"showDropCap": false,
"dropCapLines": 3,
"showHeader": false,
"headerText": "Document Header",
"headerAlignment": "center",
"showFooter": false,
"footerText": "Page {page} of {total}",
"footerAlignment": "center",
"marginTop": 72,
"marginBottom": 72,
"marginLeft": 72,
"marginRight": 72
}
}
}Dúvidas ou problemas? Contate [email protected]