Format Conversion
Конвертирует данные JSON в формат XML с настраиваемыми опциями форматирования
Вызовите этот инструмент из своего кода на трёх языках.
curl -X POST 'https://api.elysiatools.com/ru/api/tools/json-to-xml' \
-H 'Content-Type: application/json' \
-d '{"jsonInput":"Enter JSON data...","rootElement":"root","prettyPrint":true,"includeAttributes":false,"declaration":true,"indentSize":2,"arrayItemName":"item"}'Отправьте POST-запрос с входными данными в JSON. Параметры типа «файл» требуют предварительной загрузки.
POST https://api.elysiatools.com/ru/api/tools/json-to-xml| Имя | Тип | Обязательный | Описание |
|---|---|---|---|
| jsonInput | textarea | Да | — |
| rootElement | text | Нет | — |
| prettyPrint | checkbox | Нет | — |
| includeAttributes | checkbox | Нет | — |
| declaration | checkbox | Нет | — |
| indentSize |
Добавьте этот инструмент на свой сервер Model Context Protocol, чтобы ИИ-агенты могли перечислять и вызывать его.
Добавьте этот блок в конфигурацию вашего MCP-клиента:
{
"mcpServers": {
"elysiatools-json-to-xml": {
"name": "json-to-xml",
"description": "Конвертирует данные JSON в формат XML с настраиваемыми опциями форматирования",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=json-to-xml",
"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": "json-to-xml",
"arguments": {
"jsonInput": "Enter JSON data...",
"rootElement": "root",
"prettyPrint": true,
"includeAttributes": false,
"declaration": true,
"indentSize": 2,
"arrayItemName": "item"
}
}
}Вопросы или проблемы? Свяжитесь с [email protected]
| number |
| Нет |
| — |
| arrayItemName | text | Нет | — |
Текстовый результат
{
"result": "Processed text content",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}