Skip to main content
Glama
mcp-readonly-db

mcp-readonly-db

Sample rows

sample_rows
Read-onlyIdempotent

Preview the first few rows of a database table to inspect its data shape and contents before writing read-only queries.

Instructions

Return the first few rows of a table so you can see what the data looks like.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "table": "<table>"
    },
    "name": "sample_rows"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoHow many rows (default 5; capped by the server row limit)
tableYesExact table or view name

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so the safety profile is covered structurally. The description adds only the preview framing ('first few rows'), which is useful but thin; it says nothing about how the row cap interacts with the server limit or about ordering of the returned rows. With annotations present the bar is lower, so a 3 fits.

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?

A single short sentence with the action front-loaded and no filler. Every clause contributes: what is returned and why an agent would want it.

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 two-parameter read-only preview tool with full schema coverage and complete annotations, this is nearly sufficient — an agent can call it correctly from the definition alone. The only minor shortfall is the absence of ordering/return-shape expectations, which no output schema covers here.

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%, with both 'table' and 'limit' documented including the default of 5 and server-side cap, so the baseline is 3. The description adds no further meaning — no guidance on exact naming, views, or how to raise the sample size.

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 names a specific verb and resource — returning the first few rows of a table — and the clause 'so you can see what the data looks like' pins the intent as preview/inspection rather than full retrieval. It is distinguishable from siblings like describe_table and run_query by implication, but never explicitly contrasts itself with them.

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

Usage Guidelines3/5

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

Usage is only implied through the phrase 'so you can see what the data looks like', which signals exploratory preview. There is no explicit statement about when to prefer this over run_query for custom filtering or describe_table for schema, and no note on cost or when-not to use it.

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

Deploy Server

Other Tools