Format Conversion
Двустороннее преобразование JSON и Excel с разворачиванием/восстановлением
Вызовите этот инструмент из своего кода на трёх языках.
# 1) Upload each file first → returns { filePath }
curl -X POST 'https://api.elysiatools.com/upload/xlsx-json-transformer' \
-F 'file=@/path/to/excelFile.ext'
# 2) Call the tool with the returned filePath values
curl -X POST 'https://api.elysiatools.com/ru/api/tools/xlsx-json-transformer' \
-F 'mode=json_to_xlsx' \
-F 'jsonInput=[{"id":1,"user":{"name":"Alice","address":{"city":"Paris"}},"tags":["a","b"]}]' \
-F 'excelFile=/path/to/file.ext' \
-F 'sheetName=Data' \
-F 'pathSeparator=.' \
-F 'arrayMode=index' \
-F 'keepNullValues=true' \
-F 'restoreTypes=true' \
-F 'rootArrayKey=items' \
-F 'outputIndent=2'Отправьте POST-запрос с входными данными в JSON. Параметры типа «файл» требуют предварительной загрузки.
POST https://api.elysiatools.com/ru/api/tools/xlsx-json-transformer| Имя | Тип | Обязательный | Описание |
|---|---|---|---|
| mode | select | Да | — |
| jsonInput | textarea | Нет | — |
| excelFile | fileнужна загрузка | Нет | — |
| sheetName | text | Нет | — |
| pathSeparator | text | Нет | — |
| arrayMode | select | Нет | — |
| keepNullValues | checkbox | Нет | — |
| restoreTypes | checkbox | Нет | — |
| rootArrayKey | text | Нет | — |
| outputIndent | number | Нет | — |
Файловый результат
{
"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)"
}Добавьте этот инструмент на свой сервер Model Context Protocol, чтобы ИИ-агенты могли перечислять и вызывать его.
Добавьте этот блок в конфигурацию вашего MCP-клиента:
{
"mcpServers": {
"elysiatools-xlsx-json-transformer": {
"name": "xlsx-json-transformer",
"description": "Двустороннее преобразование JSON и Excel с разворачиванием/восстановлением",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=xlsx-json-transformer",
"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": "xlsx-json-transformer",
"arguments": {
"mode": "json_to_xlsx",
"jsonInput": "[{\"id\":1,\"user\":{\"name\":\"Alice\",\"address\":{\"city\":\"Paris\"}},\"tags\":[\"a\",\"b\"]}]",
"excelFile": "https://example.com/file.ext",
"sheetName": "Data",
"pathSeparator": ".",
"arrayMode": "index",
"keepNullValues": true,
"restoreTypes": true,
"rootArrayKey": "items",
"outputIndent": 2
}
}
}Вопросы или проблемы? Свяжитесь с [email protected]