Skip to main content
Glama

json_query

Query JSON from a URL or raw input using JSONPath-lite expressions to extract specific data, reducing token usage by loading only needed values.

Instructions

Fetch JSON from a URL (or accept raw JSON) and query it with a JSONPath-lite expression. Supports property access, array indexing, wildcards ([*]), recursive descent (..), and filter expressions ([?(@.price < 10)]). Provide exactly one of url or json — not both. Returns only the matching values as JSON. Returns an error if the URL is unreachable, the response is not valid JSON, or the query expression is invalid. Has no side effects. Use instead of loading large JSON payloads into your context.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoURL returning JSON to query (http/https).
jsonNoRaw JSON string to query (alternative to url).
limitNoMax number of results to return (default 100, max 1000).
queryYesJSONPath-lite expression. Examples: '$.users[*].name', '$..price', '$.items[?(@.stock > 0)].id', '$.store.books[0].title'
Behavior4/5

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

No annotations provided, but description discloses return format, error conditions (unreachable URL, invalid JSON, invalid query), and states no side effects. Could add timeout/rate limit info but sufficient.

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?

Single paragraph with key info front-loaded. Every sentence adds value: purpose, query language, usage rule, returns, errors, side effects, recommendation. No fluff.

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?

Given 4 parameters, no output schema, and no annotations, description covers essentials: query language, input constraints, error behavior, and side effects. Could mention size limits but overall complete.

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

Parameters5/5

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

Schema coverage is 100%, description adds significant meaning: explains mutex of url/json, details JSONPath-lite syntax with examples, and clarifies default/max limit.

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?

Description clearly states the tool fetches/queries JSON using JSONPath-lite, with specific verb and resource. Distinguishes from siblings by focusing on JSON querying and recommends use case instead of loading large payloads.

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

Usage Guidelines4/5

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

Provides explicit rule to provide exactly one of url or json, and recommends using instead of loading large JSON. Lacks explicit when-not alternatives but is still helpful.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/icosaedro-git/toolsnap-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server