Skip to main content
Glama

Query JSON

json_query
Read-only

Extract values from JSON using JSONPath-lite expressions such as $.users[*].name, from a URL or raw JSON, with optional result limits.

Instructions

Query JSON with JSONPath-lite ($.a[*].b, ..key). One of url or json.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoJSON URL (alt. to json).
jsonNoRaw JSON (alt. to url).
limitNoMax results.
queryYese.g. '$.users[*].name'.
headersNoHeaders to forward (Authorization, Cookie…).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.1.1
    • addedInput schema / properties / headers
      Added value: +{
      +  "description": "Headers to forward (Authorization, Cookie…).",
      +  "type": "object"
      +}
    • changedInput schema / properties / json / description
      Previous value: -"Raw JSON string to query (alternative to url)."New value: +"Raw JSON (alt. to url)."
    • changedInput schema / properties / limit / description
      Previous value: -"Max number of results to return (default 100, max 1000)."New value: +"Max results."
    • changedInput schema / properties / query / description
      Previous value: -"JSONPath-lite expression. Examples: '$.users[*].name', '$..price', '$.items[?(@.stock > 0)].id', '$.store.books[0].title'"New value: +"e.g. '$.users[*].name'."
    • changedInput schema / properties / url / description
      Previous value: -"URL returning JSON to query (http/https)."New value: +"JSON URL (alt. to json)."
  2. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=true, so safety is covered. Beyond that the description discloses nothing: it doesn't mention that supplying url causes an outbound network request, how headers are forwarded, what happens on invalid JSONPath, or the result shape (flat array vs. nested matches) — and there is no output schema to fall back on.

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?

Two short fragments, front-loaded with purpose then the source constraint; nothing is padded. It is arguably too compressed, but no sentence is wasted.

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

Completeness2/5

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

With five parameters including a nested headers object, no output schema, and no disclosure of return shape, pagination/limit behavior, or error modes, the description leaves real gaps for an agent to call this confidently. The terse framing is insufficient for a tool of this complexity.

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 every parameter (url, json, limit, headers, query) is already documented, and the description's syntax example largely duplicates the query field's own example. Baseline 3 applies since the schema carries the load.

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 clear verb and resource ("Query JSON") and adds a concrete syntax flavor ("JSONPath-lite ($.a[*].b, ..key)"), which lets an agent recognize the operation immediately. It does not differentiate from siblings like csv_query or the fetch_* family, which also retrieve data from a URL.

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

Usage Guidelines2/5

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

No guidance on when to choose this over csv_query, fetch_extract, or fetch_metadata; nor any prerequisite (e.g. that providing url triggers a remote fetch). The only routing-like statement, "One of url or json," is a mutual-exclusivity constraint rather than when-to-use advice.

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