Data Processing
Позволяет запрашивать JSON через выражения в стиле JSONPath или JMESPath, просматривать совпавшие пути и подсвечивать извлеченные значения в исходном документе
Вызовите этот инструмент из своего кода на трёх языках.
curl -X POST 'https://api.elysiatools.com/ru/api/tools/json-path-extractor' \
-H 'Content-Type: application/json' \
-d '{"jsonInput":"{\n \"users\": [\n { \"name\": \"Ada\", \"role\": \"admin\", \"score\": 9 },\n { \"name\": \"Linus\", \"role\": \"editor\", \"score\": 6 }\n ]\n}","queryExpressions":"$.users[?(@.role == \"admin\")]\n$.users[*].name","queryEngine":"jsonpath","displayMode":"highlighted-json","flattenArrays":true,"includeNullValues":false,"maxMatches":20}'Отправьте POST-запрос с входными данными в JSON. Параметры типа «файл» требуют предварительной загрузки.
POST https://api.elysiatools.com/ru/api/tools/json-path-extractor| Имя | Тип | Обязательный | Описание |
|---|---|---|---|
| jsonInput | textarea | Да | — |
| queryExpressions | textarea | Нет | Use one expression per line. Supports field access, array indexes, wildcards, and simple filters. |
| queryEngine | select | Нет | — |
| displayMode | select | Нет | — |
| flattenArrays | checkbox | Нет |
Добавьте этот инструмент на свой сервер Model Context Protocol, чтобы ИИ-агенты могли перечислять и вызывать его.
Добавьте этот блок в конфигурацию вашего MCP-клиента:
{
"mcpServers": {
"elysiatools-json-path-extractor": {
"name": "json-path-extractor",
"description": "Позволяет запрашивать JSON через выражения в стиле JSONPath или JMESPath, просматривать совпавшие пути и подсвечивать извлеченные значения в исходном документе",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=json-path-extractor",
"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-path-extractor",
"arguments": {
"jsonInput": "{\n \"users\": [\n { \"name\": \"Ada\", \"role\": \"admin\", \"score\": 9 },\n { \"name\": \"Linus\", \"role\": \"editor\", \"score\": 6 }\n ]\n}",
"queryExpressions": "$.users[?(@.role == \"admin\")]\n$.users[*].name",
"queryEngine": "jsonpath",
"displayMode": "highlighted-json",
"flattenArrays": true,
"includeNullValues": false,
"maxMatches": 20
}
}
}| — |
| includeNullValues | checkbox | Нет | — |
| maxMatches | number | Нет | — |
HTML-результат
{
"result": "<div>Processed HTML content</div>",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}Вопросы или проблемы? Свяжитесь с [email protected]