Skip to main content
Glama
Chantichalla

Safe DB Gateway

by Chantichalla

sample_rows

Preview up to 3 representative rows from any accessible table to understand real data shapes before writing queries, with PII masking and read-only safeguards.

Instructions

Returns up to 3 representative rows from an accessible table. Lets the agent see real data shapes before writing queries. Same read pipeline as safe_query: throttle gate, whitelist, role read-scope, AST validation, PII masking, audit.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
table_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Even though no annotations are present, the description carries its own behavioral disclosure: it is a read-only operation sharing safe_query's pipeline and lists throttle gate, whitelist, role read-scope, AST validation, PII masking, and audit. This tells the agent the operation is logged, permission-scoped, rate-limited, and PII-masked without relying on annotations.

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?

Three short sentences, front-loaded with the core behavior, followed by purpose and safety context. Every sentence adds distinct value and there is no filler.

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 tool is simple and an output schema exists, so return-value detail is not required. The description covers behavior, constraints, and purpose. It leaves minor gaps such as what happens for empty tables or invalid table_name, but these are not critical for selection.

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?

The only parameter, table_name, is self-explanatory and the description adds an accessibility constraint ('accessible table'), but it gives no format or qualification guidance and no explicit pointer to list_accessible_tables for valid values. With 0% schema description coverage, the description compensates only partially.

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 opening sentence states a specific verb ('Returns'), a precise resource ('up to 3 representative rows from an accessible table'), and clearly separates this from siblings like describe_table and safe_query: it surfaces real data shapes rather than schema or query results. There is no ambiguity about what the tool does.

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 explicitly frames the tool as a pre-query step ('see real data shapes before writing queries'), which is a clear use case. It does not spell out when not to use it or name alternatives beyond the shared pipeline with safe_query, so it falls just short of a 5.

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