Skip to main content
Glama

sample

Read-onlyIdempotent

Read n raw values at a JSONPath from a file or open document, preserving exact int64 and decimal digits, to inspect record contents.

Instructions

Read n real values at a path, exactly as they were parsed (int64 and decimal digits intact). A path that selects one container samples its children; a path that selects many nodes samples those nodes. Pass filePath for a one-call sample, or docId to reuse an open document. Use it to see what records really hold; to count or aggregate use run_query, for statistics profile, and for names and types get_schema.

Input Schema

NameRequiredDescriptionDefault
nNoHow many values to return (default 5, max 50).
pathYesA query selecting what to sample, e.g. $.tasks or $.tasks[*].id
docIdNoA docId returned by load_doc.
filePathNoFile to open and sample now instead of supplying docId.

Output Schema

NameRequiredDescriptionDefault
okYes
hintNo
toolYes
errorNo
evictedNo
structuredTruncatedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, so the safety profile is covered; the description adds real behavioral context the annotations cannot: values are returned without numeric precision loss, a container path samples children while a multi-node path samples those nodes. It does not discuss the cap of 50 or how empty selections behave, so it stops short of full disclosure.

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 sentences, no waste, and the core purpose and fidelity guarantee are front-loaded before the call-mode and sibling-routing guidance. Every clause carries information an agent needs.

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

Completeness5/5

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

For a read-only sampling tool with a full output schema, full parameter coverage, and rich annotations, nothing needed to invoke it correctly is missing. The description fills the remaining gaps: precision fidelity, sampling semantics, and sibling disambiguation.

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; the description earns above it by explaining the semantic tradeoff between filePath and docId (open-and-sample versus reuse an already-open document) rather than restating the schema's wording. The n and path parameters are only lightly touched in prose but are fully self-documenting in the schema.

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?

States a specific verb and resource ('Read n real values at a path') plus a distinguishing property ('exactly as they were parsed, int64 and decimal digits intact'). The second sentence explains the sampling unit, which further separates it from aggregate siblings like run_query.

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

Usage Guidelines5/5

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

Explicitly routes between the two calling modes ('Pass filePath for a one-call sample, or docId to reuse an open document') and names the alternative tools for adjacent jobs: run_query for counting/aggregation, profile for statistics, get_schema for names/types. Both when-to-use and when-not-to-use are covered.

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