Skip to main content
Glama
jovian-zhibai

mcp-database

sample_rows

Preview a few rows from any database table to quickly inspect its data structure and contents. Specify table name and optional limit for targeted sampling.

Instructions

Get a sample of rows from a table to understand its data.

Args: table: Table name. limit: Number of rows to sample (default: 5, max: 20). database: Name of the database within the connection (optional). connection_name: Name of the database connection (default: "default").

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
tableYes
databaseNo
connection_nameNodefault

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.3/5.0
Behavior3/5

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

No annotations are provided, so the description bears the full burden of disclosing behavior. It clearly states it returns a sample of rows and mentions the limit behavior with default and max values. However, it doesn't disclose whether the sample is random, ordered, or arbitrary, nor does it mention the read-only nature or any side effects. This is adequate but not fully transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and front-loaded with a one-sentence purpose statement followed by a clear parameter list. Some redundancy exists because default values are repeated from the schema, but the list is short and the added max constraint on limit justifies its presence. It is structured and easy to scan.

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

Completeness3/5

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

For a simple sampling tool with an output schema, the description covers the core invocation details: table name, limit, database, and connection. Missing elements include when to use this over query/execute and what 'sample' means precisely. It is functional but leaves some behavioral and selection context unspecified.

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 input schema has no property descriptions, but the description compensates by documenting all four parameters. It adds useful meaning beyond the schema: limit has a max of 20, database is optional and scoped 'within the connection,' and connection_name defaults to 'default.' This gives the agent enough semantic detail to use the parameters correctly.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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: 'Get a sample of rows from a table to understand its data.' This clearly communicates what the tool does and implies an exploratory data-preview use case. It doesn't explicitly contrast with sibling tools like query or execute, but the name and 'sample' wording distinguish it well enough for most agents.

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

Usage Guidelines2/5

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

The description provides little guidance on when to use this tool versus alternatives. The phrase 'to understand its data' implies exploration, but there is no explicit mention of when not to use it or when to prefer query, execute, or get_table_info instead. Given several sibling tools that also interact with table data, the lack of routing guidance is a notable gap.

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