Skip to main content
Glama

json_query

Fetch JSON from a URL or raw input and extract only the values matching a JSONPath-lite expression. Supports filters, wildcards, and recursive descent.

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)]). Returns only the matching values as JSON — 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).
queryYesJSONPath-lite expression. Examples: '$.users[*].name', '$..price', '$.items[?(@.stock > 0)].id', '$.store.books[0].title'
limitNoMax number of results to return (default 100, max 1000).
Behavior4/5

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

Discloses supported query features (property access, array indexing, wildcards, recursive descent, filters) and return behavior. With no annotations, the description carries the full burden; it covers key traits but omits error handling or timeout behavior.

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 sentences with no wasted words. Front-loaded with the primary purpose and immediately provides actionable details on query syntax and use case.

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 no output schema, the description states that it returns matching values as JSON. For a 4-parameter tool with a query language, it covers the main aspects but could benefit from mentioning return format structure or potential errors.

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

Parameters4/5

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

Adds value beyond the schema by providing examples for the query parameter and explaining the alternative input methods (url vs json). The limit is briefly described. Schema coverage is 100%, but the description enhances understanding of usage.

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 description clearly states the verb (fetch/query), the resource (JSON from URL or raw JSON), and distinguishes from siblings like csv_query and regex_extract by specifying JSONPath-lite querying.

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?

Explicitly recommends using this tool instead of loading large JSON payloads into context, providing a clear usage context. However, it does not explicitly state when not to use it or list alternatives beyond the sibling set.

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