Document Tools
Pré-visualize texto LTR/RTL em PDF com reordenação bidi
Chame esta ferramenta a partir do seu código em três idiomas.
# 1) Upload each file first → returns { filePath }
curl -X POST 'https://api.elysiatools.com/upload/pdf-rtl-ltr-support' \
-F 'file=@/path/to/fontFile.ext'
# 2) Call the tool with the returned filePath values
curl -X POST 'https://api.elysiatools.com/pt/api/tools/pdf-rtl-ltr-support' \
-F 'ltrText=Digite texto LTR...' \
-F 'rtlText=Digite texto RTL...' \
-F 'baseDirection=auto' \
-F 'alignment=auto' \
-F 'fontSize=14' \
-F 'lineHeight=1.5' \
-F 'pageSize=A4' \
-F 'marginTop=72' \
-F 'marginBottom=72' \
-F 'marginLeft=72' \
-F 'marginRight=72' \
-F 'showGuides=true' \
-F 'includeMixedSample=true' \
-F 'fontFile=/path/to/file.ext'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-rtl-ltr-support| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
| ltrText | textarea | Sim | — |
| rtlText | textarea | Sim | — |
| baseDirection | select | Não | — |
| alignment | select | Não | — |
| fontSize | number | Não | — |
| lineHeight | number | Não | — |
| pageSize | select | Não | — |
| marginTop | number | Não | — |
| marginBottom | number | Não | — |
| marginLeft | number | Não | — |
| marginRight | number | Não | — |
| showGuides | checkbox | Não | — |
| includeMixedSample | checkbox | Não | — |
| fontFile | fileupload necessário | 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-rtl-ltr-support": {
"name": "pdf-rtl-ltr-support",
"description": "Pré-visualize texto LTR/RTL em PDF com reordenação bidi",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=pdf-rtl-ltr-support",
"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-rtl-ltr-support",
"arguments": {
"ltrText": "Digite texto LTR...",
"rtlText": "Digite texto RTL...",
"baseDirection": "auto",
"alignment": "auto",
"fontSize": 14,
"lineHeight": 1.5,
"pageSize": "A4",
"marginTop": 72,
"marginBottom": 72,
"marginLeft": 72,
"marginRight": 72,
"showGuides": true,
"includeMixedSample": true,
"fontFile": "https://example.com/file.ext"
}
}
}Dúvidas ou problemas? Contate [email protected]