Development
Um REPL interativo de JSONPath que executa pipelines de consulta de várias etapas sobre qualquer JSON. Escreva uma expressão JSONPath por linha (ex. $..book[?(@.price<10)] depois $[0:5]) e veja as correspondências de cada etapa com contagens, caminhos e valores — além de uma URL compartilhável que codifica seus dados e pipeline. Suporta descida recursiva ($..), curingas ([*]), filtros ([?(@.price<10)]), slices ([0:5:2]) e índices negativos.
Chame esta ferramenta a partir do seu código em três idiomas.
curl -X POST 'https://api.elysiatools.com/pt/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"}'Envie uma requisição POST com suas entradas em JSON. Parâmetros do tipo arquivo exigem upload prévio.
POST https://api.elysiatools.com/pt/api/tools/jsonpath-repl-playground| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
| json | textarea | Sim | — |
| pipeline | textarea | Sim | — |
| mode | select | Não | — |
| maxResults | number | Não | — |
| historyTitle | text | Não | 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"
}
}Adicione esta ferramenta ao seu servidor Model Context Protocol para que agentes de IA possam listá-la e chamá-la.
Adicione este bloco à configuração do seu cliente MCP:
{
"mcpServers": {
"elysiatools-jsonpath-repl-playground": {
"name": "jsonpath-repl-playground",
"description": "Um REPL interativo de JSONPath que executa pipelines de consulta de várias etapas sobre qualquer JSON. Escreva uma expressão JSONPath por linha (ex. $..book[?(@.price<10)] depois $[0:5]) e veja as correspondências de cada etapa com contagens, caminhos e valores — além de uma URL compartilhável que codifica seus dados e pipeline. Suporta descida recursiva ($..), curingas ([*]), 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"
}
}
}Após conectar ao endpoint SSE, liste as ferramentas expostas:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoque a ferramenta pelo seu id; os argumentos são construídos a partir de seus 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"
}
}
}Dúvidas ou problemas? Contate [email protected]