Skip to main content
Glama

sample_rows

Pull a subset of rows from a loaded dataset using random, head, tail, or stratified sampling. Select specific columns to keep responses small and explore data quickly.

Instructions

Pull a sample from a loaded source.

    modes: 'random' (USING SAMPLE), 'head', 'tail', 'stratified' (requires stratify_by).
    `columns` scopes the projection — useful on wide sources (20+ cols) where
    returning everything inflates the JSON response. Default returns all columns.
    Output size: scales with n × columns; default ~5KB on a typical narrow source.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nNo
modeNorandom
columnsNo
source_idYes
stratify_byNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Since no annotations are provided, the description carries the burden and discloses mode constraints ('stratified' requires stratify_by), default column behavior, and output size scaling with n × columns. It stops short of explicitly stating read-only semantics, but 'pull a sample' implies a non-mutating operation.

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-loaded with purpose, and each sentence adds value: purpose, modes, columns usage, and output size estimate. There is no fluff or repetition.

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?

The description covers the tool's purpose, all five parameters, behavioral constraints, and output size, and an output schema is present, so return values needn't be described. It is complete for a sampling tool, with minor gaps like explicit edge cases.

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%, and the description compensates by explaining the mode enum values, the columns projection purpose, the stratify_by requirement, and n's role in output size. It could explicitly define n as row count, but it is inferable from context.

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 opens with 'Pull a sample from a loaded source,' clearly stating the verb and resource, and lists the supported modes (random, head, tail, stratified), which differentiates it from sibling tools like describe_source or run_sql.

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

Usage Guidelines4/5

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

It explains when to use the columns parameter ('useful on wide sources (20+ cols)') and describes each mode, giving context for choosing sampling options. It does not explicitly name alternative tools, but the context is clear enough for an agent to decide when sampling is appropriate.

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/charliecpeterson/edamcp'

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