Skip to main content
Glama
GautamVhavle

Universal JSON Agent MCP

by GautamVhavle

sample

Return N random items from a JSON array to preview large datasets without loading all data.

Instructions

Return N random items from an array.

Useful for previewing large datasets without loading everything.

Args: alias: The alias of the loaded document. path: Dot-notation path to the array. Empty means root. n: Number of items to sample (default 5). seed: Optional random seed for reproducible results.

Returns: N randomly selected items from the array.

Input Schema

NameRequiredDescriptionDefault
nNo
pathNo
seedNo
aliasYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations present, the description carries the full burden. It does disclose useful behavior — randomness, an optional seed for reproducibility, defaults (n=5, path=''), and that empty path means root — but says nothing about edge cases such as n exceeding array length, invalid path handling, or whether the operation is read-only and side-effect free.

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 behavior in one sentence, followed by a single motivating use case, then a compact Args block that maps one-to-one onto the four parameters. No filler and the structure matches how an agent scans a tool definition.

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?

Output schema exists, so return values are covered elsewhere, and all four params are documented in prose. The only gap is that 'alias' is not tied back to load_json/list_loaded, so the agent must infer where aliases come from.

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 largely does: all four parameters get meaning beyond their titles ('alias of the loaded document', 'dot-notation path', 'empty means root', 'optional random seed for reproducible results'). It stops short of stating bounds on n or seed, which is why this is a 4 rather than a 5.

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?

Names a specific operation and result: 'Return N random items from an array', which is distinct from the deterministic siblings like filter_objects, pick_fields, or sort_by. An agent can tell immediately this is randomized sampling, not filtering or 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 sentence 'Useful for previewing large datasets without loading everything' implies a use case but never states when to prefer this over alternatives such as filter_objects or pick_fields, nor any when-not conditions. Usage must be inferred from the goal statement.

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