Format Conversion
Преобразует различные форматы текста в JSON с настраиваемыми опциями парсинга
Вызовите этот инструмент из своего кода на трёх языках.
curl -X POST 'https://api.elysiatools.com/ru/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}'Отправьте POST-запрос с входными данными в JSON. Параметры типа «файл» требуют предварительной загрузки.
POST https://api.elysiatools.com/ru/api/tools/text-to-json| Имя | Тип | Обязательный | Описание |
|---|---|---|---|
| textInput | textarea | Да | — |
| inputFormat | select | Да | — |
| delimiter | text | Нет | — |
| outputType | select | Да | — |
| rootKey | text | Нет | — |
| arrayMode |
Добавьте этот инструмент на свой сервер Model Context Protocol, чтобы ИИ-агенты могли перечислять и вызывать его.
Добавьте этот блок в конфигурацию вашего MCP-клиента:
{
"mcpServers": {
"elysiatools-text-to-json": {
"name": "text-to-json",
"description": "Преобразует различные форматы текста в JSON с настраиваемыми опциями парсинга",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=text-to-json",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}После подключения к SSE-endpoint выведите список доступных инструментов:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Вызовите инструмент по его id; аргументы формируются из его параметров:
{
"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 |
| Нет |
| — |
| trimValues | checkbox | Нет | — |
| skipEmptyLines | checkbox | Нет | — |
| prettyPrint | checkbox | Нет | — |
| includeStats | checkbox | Нет | — |
JSON-результат
{
"key": {...},
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}Вопросы или проблемы? Свяжитесь с [email protected]