Skip to main content
Glama
wayknow

wayknow/clearjson

by wayknow

query_json

Query JSON structures using JSONPath expressions. Retrieve matched values with their paths using dot-notation, wildcards, filters, and array slicing.

Instructions

Query a JSON structure using JSONPath syntax. Supports dot-notation ($.store.book[0].title), recursive descent ($..author), array slicing ($[0:5]), wildcards ($..*), and filter expressions ($..book[?(@.price < 10)]). Returns matched values with their paths.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jsonYesThe JSON string to query.
pathYesJSONPath expression, e.g. "$.users[*].name", "$..email", "$[0:10]", "$..[?(@.price > 100)]".
Behavior2/5

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

With no annotations, the description should fully disclose behavior. It covers supported JSONPath syntax but omits details on error handling (invalid JSON/path), read-only nature, return format, and performance characteristics. This is insufficient for safe agent invocation.

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?

The description is front-loaded with purpose and provides concise examples. It is efficient but could be structured with bullet points for easier scanning, though not necessary.

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 only 2 parameters and no output schema, the description covers syntax thoroughly with multiple examples. However, it lacks details on return value format (paths plus values) and error scenarios, which would improve completeness.

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 coverage is 100% (both parameters described). The description adds example path expressions but does not significantly extend understanding beyond the schema's parameter descriptions. Baseline 3 is appropriate.

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 tool queries JSON using JSONPath syntax, with specific verb (Query) and resource (JSON structure). It distinguishes from sibling tools (e.g., validate, format) by focusing on extraction.

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?

The description does not provide guidance on when to use this tool versus alternatives, nor when not to use it. It implicitly suggests usage for extracting data, but lacks explicit context or exclusions.

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/wayknow/clearjson'

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