Format Conversion
Convert various text formats to XML with customizable structure and formatting options
Chame esta ferramenta a partir do seu código em três idiomas.
curl -X POST 'https://api.elysiatools.com/pt/api/tools/text-to-xml' \
-H 'Content-Type: application/json' \
-d '{"textInput":"Enter your text data to convert to XML:\nname,age,city\nJohn,25,New York\nJane,30,London\n\nOr paste JSON, key-value pairs, or other formats...","inputFormat":"auto","rootElement":"root","rowElement":"item","includeDeclaration":true,"includeAttributes":false,"attributeName":"value","cdataSections":false,"escapeSpecialChars":true,"prettyPrint":true,"indentSize":"2","showStats":false}'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/text-to-xml| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
| textInput | textarea | Sim | — |
| inputFormat | select | Sim | — |
| rootElement | text | Não | — |
| rowElement | text | Não | — |
| includeDeclaration | checkbox | Não | — |
| includeAttributes |
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-text-to-xml": {
"name": "text-to-xml",
"description": "Convert various text formats to XML with customizable structure and formatting options",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=text-to-xml",
"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": "text-to-xml",
"arguments": {
"textInput": "Enter your text data to convert to XML:\nname,age,city\nJohn,25,New York\nJane,30,London\n\nOr paste JSON, key-value pairs, or other formats...",
"inputFormat": "auto",
"rootElement": "root",
"rowElement": "item",
"includeDeclaration": true,
"includeAttributes": false,
"attributeName": "value",
"cdataSections": false,
"escapeSpecialChars": true,
"prettyPrint": true,
"indentSize": "2",
"showStats": false
}
}
}| checkbox |
| Não |
| — |
| attributeName | text | Não | — |
| cdataSections | checkbox | Não | — |
| escapeSpecialChars | checkbox | Não | — |
| prettyPrint | checkbox | Não | — |
| indentSize | number | Não | — |
| showStats | checkbox | Não | — |
Resultado de texto
{
"result": "Processed text content",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}Dúvidas ou problemas? Contate [email protected]