Skip to main content
Glama
GautamVhavle

Universal JSON Agent MCP

by GautamVhavle

jsonpath_query

Extract specific values from a loaded JSON document by running a JSONPath expression against its alias, returning matched results as a list.

Instructions

Execute a JSONPath expression against a loaded JSON document.

Use standard JSONPath syntax to extract data. Examples:

  • $.users[*].email — all user emails

  • $.orders[?@.total>100] — orders over 100

  • $.config.database.host — specific nested value

Args: alias: The alias of the loaded document. expression: A JSONPath expression (must start with $).

Returns: The matched values as a list, or a message if nothing matched.

Input Schema

NameRequiredDescriptionDefault
aliasYes
expressionYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully states that results come back as a list or a message if nothing matched, but it does not clarify that the operation is read-only, what happens on invalid JSONPath, or whether the document must already be loaded via load_json.

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 and well organized into purpose, syntax examples, args, and returns. The examples earn their place by clarifying JSONPath usage, though the structure is slightly more verbose than strictly necessary.

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

Completeness3/5

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

The description covers purpose, parameters, syntax, and return behavior, and an output schema exists. However, with no annotations, it leaves gaps around read-only behavior, invalid expression handling, and how to obtain the required document alias from siblings such as list_loaded or load_json.

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 description coverage is 0%, so the description must explain both parameters. It does so meaningfully: alias is the alias of the loaded document, and expression must be a JSONPath expression starting with $, with examples that clarify syntax.

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?

The description states a specific verb and resource: execute a JSONPath expression against a loaded JSON document. It is clear what the tool does, but it does not explicitly contrast itself with siblings such as get_value, filter_objects, or distinct_paths.

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 examples imply how to use standard JSONPath syntax, but there is no explicit guidance on when to choose this tool over alternatives like filter_objects, get_value, or search_text. The agent must infer the selection criteria from the tool name and examples.

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