Format Conversion
Convert various text formats to JSON with customizable parsing 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-json' \
-H 'Content-Type: application/json' \
-d '{"textInput":"Enter your text data to convert to JSON:\nname,age,city\nJohn,25,New York\nJane,30,London\n\nOr paste JSON, key-value pairs, INI format, etc...","inputFormat":"auto","delimiter":"Custom delimiter (e.g., |, ;, \\t)","outputType":"array","rootKey":"Root object key (optional)","arrayMode":false,"trimValues":true,"skipEmptyLines":true,"prettyPrint":true,"includeStats":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-json| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
| textInput | textarea | Sim | — |
| inputFormat | select | Sim | — |
| delimiter | text | Não | — |
| outputType | select | Sim | — |
| rootKey | text | Não | — |
| arrayMode |
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-json": {
"name": "text-to-json",
"description": "Convert various text formats to JSON with customizable parsing options",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=text-to-json",
"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-json",
"arguments": {
"textInput": "Enter your text data to convert to JSON:\nname,age,city\nJohn,25,New York\nJane,30,London\n\nOr paste JSON, key-value pairs, INI format, etc...",
"inputFormat": "auto",
"delimiter": "Custom delimiter (e.g., |, ;, \\t)",
"outputType": "array",
"rootKey": "Root object key (optional)",
"arrayMode": false,
"trimValues": true,
"skipEmptyLines": true,
"prettyPrint": true,
"includeStats": false
}
}
}| checkbox |
| Não |
| — |
| trimValues | checkbox | Não | — |
| skipEmptyLines | checkbox | Não | — |
| prettyPrint | checkbox | Não | — |
| includeStats | checkbox | Não | — |
Resultado JSON
{
"key": {...},
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}Dúvidas ou problemas? Contate [email protected]