Skip to main content
Glama

JSONPath Query

jsonpath_query
Read-onlyIdempotent

Run a JSONPath query (RFC 9535) on a JSON document you send. Send query, for example $.store.book[?@.price < 10].title, and document, the JSON text. Get back how many nodes matched and, for each, its value and its normalized path (for example $['store']['book'][0]['title']), in the order RFC 9535 defines. Supports name, index, wildcard, slice and filter selectors, the descendant segment .., and the standard functions length, count, match, search and value. A query that is not valid RFC 9535 gives verdict query_error with the reason and the position. Limits: query 1,000 and document 15,000 characters. Answer fields: ok, verdict, result, rule, does_not, sources, observation, signature, verify. Errors: ok false with the reason (bad input, too large, hourly limit). Free. No model, no network, nothing you send is stored by the tool, and every answer is signed with LLPRO's key (check it at https://llpro.ai/jsonpath-query). Not legal, tax or financial advice.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>",
      "document": "<document>"
    },
    "name": "jsonpath_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesThe JSONPath query, starting with $ (RFC 9535), for example $..book[?@.price < 10].title. Up to 1,000 characters. Do not put Social Security, phone or card numbers in it.
documentYesThe JSON document to query, as JSON text (any JSON value), up to 15,000 characters, 32 levels deep. No personal data: emails, Social Security or phone shapes and card numbers are refused.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the readOnly/idempotent/non-destructive hints, the description discloses hard limits (1,000-char query, 15,000-char document, 32 levels), the error surface (invalid RFC 9535 yields verdict query_error with reason and position; ok false for bad input, oversize, hourly limit), and the non-storage plus signed-answer behavior. That is materially more than the annotations carry.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Core action is front-loaded in the first sentence and the limits/errors follow logically. Some fat is present: the 1,000 and 15,000 character limits duplicate the schema's maxLength, and the trailing 'Free. No model, no network ... Not legal, tax or financial advice.' is promotional boilerplate for a query tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description does the heavy lifting by naming the answer fields and explaining one verdict value, which is enough to call the tool and interpret a success or a query_error. It falls short on the remaining field names (rule, does_not, sources, observation, signature, verify), which are listed but never explained, so an agent cannot predict their contents.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so both parameters are already documented with types, maxLength and examples. The description's inline example query and the note that document is 'JSON text' restate schema content rather than adding new semantics such as selector restrictions or encoding rules, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence gives a specific verb and resource: run a JSONPath query (RFC 9535) against a JSON document the caller supplies. It even includes a concrete example query, so an agent knows exactly what class of operation this is without consulting the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied rather than stated: 'Send query ... and document' tells the agent the calling convention but gives no when-to-use or when-not-to-use conditions and names no alternative. For a self-contained utility with no close siblings this is adequate, but it is guidance by inference, not by instruction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources