Skip to main content
Glama

query_jsonpath

Read-only

Evaluate a JSONPath (a rule's given) against a document and return what it matches — pointers, values, and optionally whether field is present on each match. The fastest way to get a given right.

Input Schema

NameRequiredDescriptionDefault
contextNoOptional: why you are asking. One sentence — the task you are trying to complete, or what you expect to get back. Never included in the answer and never used to rank; it is read only when a result turns out to be wrong, which is when knowing the intent is what makes the report actionable.
documentYesThe API description to operate on — OpenAPI, AsyncAPI, Arazzo or JSON Schema. A YAML/JSON string or an already-parsed object; both are accepted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already establish readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description earns extra credit by disclosing the return shape — pointers, matched values, and optional per-match field presence — which matters since there is no output schema. It stops short of saying how invalid JSONPath or zero matches behave.

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 tight sentences with the core operation front-loaded and the return contents enumerated compactly. The closing tagline is slightly promotional but still carries usage signal, so it largely earns its place.

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?

With no output schema, the description carries the return-value burden and does so adequately; safety is covered by annotations and only two well-documented params exist. The gaps are edge-case behavior (invalid JSONPath, empty result set) rather than anything blocking a correct call.

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% and both parameters are documented there, so the baseline is 3. The description adds no information about the `context` parameter and mentions a `field` option that is not declared in the schema, which slightly muddies rather than clarifies parameter expectations.

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 specific verb (evaluate) and resource (a JSONPath/`given`) plus the output (pointers, values, field presence), so the operation is unambiguous. It ties the tool to the ruleset domain by naming `given`, but doesn't contrast itself with nearby siblings like test_ruleset or explain_rule_result, leaving a bit of differentiation work to the agent.

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 fastest way to get a `given` right' implies an authoring/debugging context, giving the agent a weak signal of when to reach for it. There are no explicit exclusions or named alternatives (e.g., when to use test_ruleset or explain_rule_result instead), so routing is still inferential.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources