Skip to main content
Glama

sample_data

Retrieve a random sample of N rows from a dataset to uncover data variety when head or tail views are insufficient.

Instructions

Return a random sample of N rows. Use when head/tail are not representative. Random sampling reveals data variety better. Example: sample_data(n=5)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nNo
df_nameNo
random_stateNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

There are no annotations, so the description carries the full burden of behavioral disclosure. It does not explicitly state whether the operation is read-only or modifies the dataframe, nor does it mention the role of random_state in reproducibility or any sampling details (e.g., with/without replacement). This lack of explicit safety and randomness behavior is a notable gap.

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 concise (two sentences plus an example), front-loaded with the primary action, and contains no fluff. The example is helpful and directly reinforces the main parameter.

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

Completeness2/5

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

Given the low schema coverage and lack of annotations, the description is incomplete for effective use. It fails to explain the df_name parameter (which dataframe to sample) and random_state, making it difficult for an agent to correctly invoke the tool beyond the n parameter. The existence of an output schema helps but does not compensate for missing parameter semantics.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/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 for explaining all parameters. It only addresses 'n' indirectly via the example (sample_data(n=5)), and entirely omits 'df_name' and 'random_state'. This leaves the agent without necessary semantic information for these parameters.

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 clearly states the function: 'Return a random sample of N rows.' It uses a specific verb ('return') and resource ('random sample'), and distinguishes itself from siblings by explicitly mentioning 'head/tail are not representative.'

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 explicitly states when to use the tool: 'Use when head/tail are not representative,' and even names the alternatives (head/tail). This provides clear guidance on when this tool is preferable, fulfilling the criteria for explicit usage guidelines.

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/AstyanM/mcp-data-science'

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