Skip to main content
Glama
jgravelle
by jgravelle

sample_rows

Read-only

Return a sample of rows from a dataset to inspect its shape and content, using head, tail, or random selection.

Instructions

Return a sample of rows. Useful for understanding data shape without prior knowledge. Method: 'head', 'tail', or 'random'. Use columns=[] on wide tables to reduce response size. Pass seed (int) with method='random' for deterministic, reproducible sampling. A sample shows shape, not distribution; use get_distribution when you need the spread.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nNoRows to sample (default 5, max 100)
seedNoDeterministic seed for method='random' (omitted = non-deterministic)
methodNoSampling method (default 'head')head
redactNoScrub PII / credentials from sampled cells before return (default true).
columnsNoColumn projection (default: all)
datasetYesDataset identifier
redact_patternsNoAdditional Python regex patterns to layer on top of the built-in set.
redact_skip_columnsNoColumn names to exempt from redaction.
Behavior4/5

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

The readOnlyHint annotation signals the safe read-only nature, and the description adds behavioral details beyond that: sampling methods are named, seed behavior is described as deterministic only for random, and the disclaimer that a sample shows shape not distribution sets accurate expectations. The redaction-by-default behavior is only in the schema rather than described, but the annotation reduces the burden.

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?

The description is four sentences, front-loads the primary action and purpose, and each sentence carries distinct value. No wasted words or repetition of schema type information.

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?

For a tool with one required parameter and schema descriptions covering all fields, the description supplies enough operational and selection context. The only notable omission is that the redaction-related parameters are not described in prose, but the schema fully documents them, so the gap is acceptable.

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?

The schema already covers the parameters, so the baseline applies, but the description adds meaningful semantics on top: it explains the practical purpose of columns projection for wide tables, and clarifies exactly when seed has an effect. This improves the agent's ability to construct appropriate calls beyond the schema's field descriptions.

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?

The description states a specific verb and resource ('Return a sample of rows') and immediately clarifies that the tool is for understanding data shape without schema knowledge. It explicitly contrasts itself with get_distribution, which helps an agent distinguish it from at least one sibling tool.

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?

The description gives clear when-to-use guidance: use it for understanding data shape without prior knowledge, and use get_distribution when the actual spread is needed. It also provides practical guidance for wide tables and deterministic sampling, which helps the agent choose parameters appropriately.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jgravelle/jdatamunch-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server