Skip to main content
Glama

jsonquery

Extract specific values from large JSON files using dot-notation queries to save tokens, supporting nested keys, array indices, and wildcards without loading entire files.

Instructions

Query a JSON file using dot-notation paths without loading the entire file into context. Supports nested keys (a.b.c), array indices ([0], [-1] for last), and wildcards ([] for all elements). Examples: "dependencies.react", "scripts.build", "items[0].name", "users[].email". Returns the matched value with its type. Objects and arrays are pretty-printed. Use this to extract specific values from large JSON files to save tokens.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesAbsolute path to the JSON file
queryYesDot-notation query path (e.g. dependencies.react, items[0].name, items[*].id)
Behavior4/5

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

With no annotations provided, the description carries the full burden. It effectively discloses key behaviors: partial file loading (efficiency), return format ('matched value with its type'), and output formatting ('Objects and arrays are pretty-printed'). Minor gap: doesn't specify error behavior for missing paths or files.

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?

Excellent information density. Progresses logically from core function to syntax details to examples to return format to use case. No redundant words; every sentence adds distinct value (syntax capabilities, concrete examples, output formatting, efficiency rationale).

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

Completeness5/5

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

Comprehensive for a 2-parameter tool without output schema. Compensates for missing output schema by describing return values ('matched value with its type', pretty-printing). Addresses the critical contextual gap (partial vs full file loading) that distinguishes it from sibling tools.

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?

Schema coverage is 100%, establishing baseline 3. Description adds significant value by explaining dot-notation syntax concepts (nested keys, array indices, wildcards) and providing concrete examples ('dependencies.react', 'users[*].email') that clarify the query parameter's expected format beyond the schema's basic description.

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 explicitly states the tool 'Query[s] a JSON file using dot-notation paths' and distinguishes from sibling tools by noting it operates 'without loading the entire file into context' (differentiating from 'read') and specifying JSON format (differentiating from 'tomlquery' and 'yamlquery').

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 clear when-to-use guidance ('Use this to extract specific values from large JSON files to save tokens') implicitly contrasting with loading full files via 'read'. Lacks explicit 'when not to use' or named alternative tools, but the token-efficiency use case is clearly articulated.

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/knewstimek/agent-tool'

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