Skip to main content
Glama
kinbinghua-lgtm

agent-core-mcp

json_query

Read-onlyIdempotent

Extract a value from JSON text using a path like a.b[0].c or $.items[3].name. Distinguishes resolved from found and reports missing-key, out-of-range, not-an-array, or not-an-object.

Instructions

Extract a value from a JSON document by path, e.g. "a.b[0].c" or "$.items[3].name". Reports resolved (did the path reach a location) separately from found (is the value non-null), so absent is distinguishable from present-but-null. Failure types are specific: missing-key, out-of-range, not-an-array, not-an-object.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jsonYesThe JSON document as text
pathYesPath, e.g. "a.b[0].c"

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already establish readOnly/idempotent/non-destructive, but the description adds real behavioral value: it separates `resolved` from `found` so absent-vs-null is distinguishable, and it enumerates specific failure modes (missing-key, out-of-range, not-an-array, not-an-object). It stops short of describing the overall response shape.

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?

Three tightly packed sentences, front-loaded with the core action, then semantics, then error taxonomy. No filler and nothing repeated from the schema.

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 must carry return semantics, and it does explain the resolved/found distinction and error types. It omits the field name/structure that actually carries the extracted value, which for a simple 2-parameter tool is a minor but real gap.

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%, so the baseline is 3, but the description adds meaning beyond the schema by showing a second path dialect (`$.items[3].name`), implying JSONPath-style prefixes are accepted where the schema example only shows dotted notation.

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 (extract) and resource (value from a JSON document by path) and gives concrete path syntax examples, so the operation is unambiguous. It does not, however, distinguish itself from the sibling json_pick, leaving the agent to guess which extraction tool fits.

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

Usage Guidelines2/5

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

There is no when-to-use guidance and no mention of alternatives such as json_pick or json_validate, even though those siblings clearly overlap. Usage must be inferred entirely from the purpose sentence.

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