Development
Un REPL interactivo de JSONPath que ejecuta pipelines de consulta de varios pasos sobre cualquier JSON. Escribe una expresión JSONPath por línea (p. ej. $..book[?(@.price<10)] luego $[0:5]) y verás los matches de cada paso con conteos, rutas y valores — más una URL compartible que codifica tus datos y pipeline. Soporta descenso recursivo ($..), comodines ([*]), filtros ([?(@.price<10)]), slices ([0:5:2]) e índices negativos.
Llama a esta herramienta desde tu código en tres lenguajes.
curl -X POST 'https://api.elysiatools.com/es/api/tools/jsonpath-repl-playground' \
-H 'Content-Type: application/json' \
-d '{"json":"{\n \"store\": {\n \"book\": [\n { \"category\": \"reference\", \"author\": \"Nigel Rees\", \"title\": \"Sayings of the Century\", \"price\": 8.95 },\n { \"category\": \"fiction\", \"author\": \"Evelyn Waugh\", \"title\": \"Sword of Honour\", \"price\": 12.99 },\n { \"category\": \"fiction\", \"author\": \"Herman Melville\", \"title\": \"Moby Dick\", \"price\": 8.99 },\n { \"category\": \"fiction\", \"author\": \"J. R. R. Tolkien\", \"title\": \"The Lord of the Rings\", \"price\": 22.99 }\n ],\n \"bicycle\": { \"color\": \"red\", \"price\": 19.95 }\n }\n}","pipeline":"$..book[?(@.price < 10)]\n$[*].title","mode":"values","maxResults":100,"historyTitle":"Cheap books — titles"}'Envía una petición POST con tus entradas en JSON. Los parámetros de tipo archivo requieren una subida previa.
POST https://api.elysiatools.com/es/api/tools/jsonpath-repl-playground| Nombre | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| json | textarea | Sí | — |
| pipeline | textarea | Sí | — |
| mode | select | No | — |
| maxResults | number | No | — |
| historyTitle | text | No | Optional label saved with this query so you can find it again. |
Resultado HTML
{
"result": "<div>Processed HTML content</div>",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}Añade esta herramienta a tu servidor Model Context Protocol para que los agentes de IA puedan listarla y llamarla.
Añade este bloque a la configuración de tu cliente MCP:
{
"mcpServers": {
"elysiatools-jsonpath-repl-playground": {
"name": "jsonpath-repl-playground",
"description": "Un REPL interactivo de JSONPath que ejecuta pipelines de consulta de varios pasos sobre cualquier JSON. Escribe una expresión JSONPath por línea (p. ej. $..book[?(@.price<10)] luego $[0:5]) y verás los matches de cada paso con conteos, rutas y valores — más una URL compartible que codifica tus datos y pipeline. Soporta descenso recursivo ($..), comodines ([*]), filtros ([?(@.price<10)]), slices ([0:5:2]) e índices negativos.",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=jsonpath-repl-playground",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}Tras conectar al endpoint SSE, lista las herramientas expuestas:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoca la herramienta por su id; los argumentos se construyen a partir de sus parámetros:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "jsonpath-repl-playground",
"arguments": {
"json": "{\n \"store\": {\n \"book\": [\n { \"category\": \"reference\", \"author\": \"Nigel Rees\", \"title\": \"Sayings of the Century\", \"price\": 8.95 },\n { \"category\": \"fiction\", \"author\": \"Evelyn Waugh\", \"title\": \"Sword of Honour\", \"price\": 12.99 },\n { \"category\": \"fiction\", \"author\": \"Herman Melville\", \"title\": \"Moby Dick\", \"price\": 8.99 },\n { \"category\": \"fiction\", \"author\": \"J. R. R. Tolkien\", \"title\": \"The Lord of the Rings\", \"price\": 22.99 }\n ],\n \"bicycle\": { \"color\": \"red\", \"price\": 19.95 }\n }\n}",
"pipeline": "$..book[?(@.price < 10)]\n$[*].title",
"mode": "values",
"maxResults": 100,
"historyTitle": "Cheap books — titles"
}
}
}¿Dudas o problemas? Contacta con [email protected]