Skip to main content
Glama

sample_rows

Read-only

Fetch up to 50 rows from a PostgreSQL table or view, optionally choosing columns, to inspect data without writing custom SQL.

Instructions

A few rows of a table or view, optionally some columns. Default 10, at most 50, in no order.

Input Schema

NameRequiredDescriptionDefault
limitNoHow many rows, 1 to 50. Default 10.
tableYes"orders" or "sales.orders".
schemaNoSchema to look in; omit for every readable schema.
columnsNoColumns, e.g. "id, total"; omit for all.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds useful behavioral context: the default row count, the hard cap of 50, and that rows come back in no guaranteed order. It does not cover errors or permissions, but the annotations lower the bar.

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?

It is two short sentences with zero waste, front-loading the core purpose and then the key limits. Every phrase contributes to understanding the tool.

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 simple read-only sampling tool with full schema coverage and clear annotations, the description is largely complete. The only meaningful gap is the lack of explicit selection guidance against sibling tools.

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

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all four parameters thoroughly. The description restates the limit default/cap and the optional columns, but adds little parameter meaning beyond what the schema provides; the 'in no order' remark is behavioral rather than parameter-specific.

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 clearly identifies the resource (rows of a table or view) and the sampling scope (a few rows, optional columns). It does not explicitly distinguish this tool from siblings like describe_table or list_tables, so it falls short of a 5.

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 implies usage by saying it returns a few rows, but it gives no explicit guidance on when to use this instead of alternatives such as describe_table, search_schema, or list_tables. There are no when-to-use or when-not-to-use conditions.

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