Skip to main content
Glama
GautamVhavle

Universal JSON Agent MCP

by GautamVhavle

distinct_paths

Discover every unique leaf path and JSON type in an unknown document; sample array items to map structure without scanning thousands of objects.

Instructions

List every unique leaf path in a JSON document.

Essential for understanding the shape of an unknown JSON file. For arrays, only the first N items are sampled to discover paths efficiently without scanning thousands of identical objects.

Args: alias: The alias of the loaded document. path: Starting path (default root). max_depth: Maximum recursion depth (default 10). sample_array_items: How many array elements to inspect (default 5).

Returns: A list of all discovered paths with their JSON types.

Input Schema

NameRequiredDescriptionDefault
pathNo
aliasYes
max_depthNo
sample_array_itemsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does meaningful work: it discloses that array elements are sampled (so results can be incomplete for heterogeneous arrays) and that recursion is bounded by max_depth. It does not mention prerequisites such as the document needing to be loaded first, which the 'alias' parameter only hints at.

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?

Front-loaded with the core action, followed by the purpose and the one non-obvious caveat (array sampling). The Args block repeats schema defaults and the Returns block duplicates the output schema, but neither is verbose enough to be wasteful.

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?

Covers the action, the sampling caveat, and all parameters; an output schema exists so the brief Returns note is extra rather than required. The remaining gap is the loading prerequisite implied by 'alias' and any guidance on cost for very large documents.

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 compensate, and it does — all four parameters are explained, including the semantic meaning of sample_array_items ('how many array elements to inspect') and max_depth ('maximum recursion depth'). Default values are repeated from the schema, but the behavioral implications are added.

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 and resource ('List every unique leaf path') plus the scope ('in a JSON document'), which is clearly distinct from value-level siblings like get_value or count. It doesn't explicitly contrast itself with the closely related get_structure/get_keys, so the differentiation is inferable rather than stated.

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?

'Essential for understanding the shape of an unknown JSON file' gives a use context, but there are no exclusions or named alternatives among siblings such as get_structure, get_keys, or describe that would help an agent choose. Usage is implied rather than prescribed.

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