{
  "name": "json.query",
  "group": "data",
  "summary": "Extract values from a JSON document with a JSONPath expression.",
  "description": "Runs a JSONPath query and returns the matching values with their concrete paths. Supports property access, array indexing (including negative indices), slices, wildcards, recursive descent (`..`) and filters (`[?(@.price > 10)]`). Pull three fields out of a large API response without carrying the whole document through context.",
  "keywords": [
    "jsonpath",
    "json query",
    "extract json",
    "parse json",
    "json filter",
    "jq"
  ],
  "endpoint": "https://fluentedi.com/v1/json/query",
  "mcp_name": "json_query",
  "makes_network_request": false,
  "parameters": {
    "type": "object",
    "properties": {
      "json": {
        "description": "The JSON document, as an object or a JSON string.",
        "maxLength": 1000000
      },
      "path": {
        "description": "JSONPath expression, e.g. \"$.items[*].id\" or \"$..author\".",
        "type": "string",
        "maxLength": 1000,
        "examples": [
          "$.items[*].id"
        ]
      },
      "first_only": {
        "description": "Return only the first match.",
        "type": "boolean",
        "default": false
      }
    },
    "required": [
      "json",
      "path"
    ],
    "additionalProperties": false
  },
  "examples": [
    {
      "description": "Every id in a list",
      "url": "https://fluentedi.com/v1/json/query?json=%7B%22items%22%3A%5B%7B%22id%22%3A1%2C%22price%22%3A5%7D%2C%7B%22id%22%3A2%2C%22price%22%3A20%7D%5D%7D&path=%24.items%5B*%5D.id",
      "args": {
        "json": "{\"items\":[{\"id\":1,\"price\":5},{\"id\":2,\"price\":20}]}",
        "path": "$.items[*].id"
      }
    },
    {
      "description": "Filter by a field",
      "url": "https://fluentedi.com/v1/json/query?json=%7B%22items%22%3A%5B%7B%22id%22%3A1%2C%22price%22%3A5%7D%2C%7B%22id%22%3A2%2C%22price%22%3A20%7D%5D%7D&path=%24.items%5B%3F(%40.price%20%3E%2010)%5D",
      "args": {
        "json": "{\"items\":[{\"id\":1,\"price\":5},{\"id\":2,\"price\":20}]}",
        "path": "$.items[?(@.price > 10)]"
      }
    },
    {
      "description": "Find a key at any depth",
      "url": "https://fluentedi.com/v1/json/query?json=%7B%22a%22%3A%7B%22b%22%3A%7B%22name%22%3A%22deep%22%7D%7D%7D&path=%24..name",
      "args": {
        "json": "{\"a\":{\"b\":{\"name\":\"deep\"}}}",
        "path": "$..name"
      }
    }
  ],
  "suggestion": null
}