Skip to main content
Glama

Run a JSONPath query

query_jsonpath
Read-onlyIdempotent

Evaluate a JSONPath Plus query against a JSON document and return the matches with their paths. A number that does not fit in a JavaScript number is returned as its original digits, with a precision warning.

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": {
      "json": "<json>",
      "query": "<query>"
    },
    "name": "query_jsonpath"
  }
}

Input Schema

NameRequiredDescriptionDefault
jsonYesJSON document text
limitNoMaximum matches to return
queryYesJSONPath query, e.g. $.store.book[*].author

Output Schema

NameRequiredDescriptionDefault
countYes
matchesYes
warningYes
truncatedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  2. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and openWorldHint=false, so the safety profile is covered. The description still adds real value beyond them by disclosing edge-case behavior: numbers exceeding JavaScript's numeric range come back as original digits plus a precision warning. It does not mention error behavior for invalid queries, but the big-number caveat is a meaningful addition.

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

Conciseness5/5

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

Two tight sentences with no waste; the core action is front-loaded and the precision caveat follows as a secondary note. Every sentence carries information.

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?

An output schema exists, so return values need not be described further, and annotations cover the safety profile. The description covers purpose plus a notable precision caveat; the only minor gap is query-error behavior and whether limit truncation is flagged.

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 description coverage is 100%, so the schema already documents json, query (with an example), and limit with its default and bounds. The description adds nothing about parameters beyond what the schema provides, so the baseline of 3 applies.

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

Purpose4/5

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

States a specific verb and resource: evaluate a JSONPath Plus query against a JSON document and return matches with paths. This clearly separates it from sibling tools such as convert_json_to_types or convert_data_format, though it does not name an alternative explicitly.

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 by the purpose: an agent can infer this is the tool for querying JSON with JSONPath syntax. However, there is no explicit when-to-use guidance, no mention of a 'use X instead when...' alternative, and no prerequisites or exclusions.

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.