Skip to main content
Glama
db-conn-mcp

db-conn-mcp

sample_table_rows

Fetch the first N rows of a database table to learn its data shape before writing queries or exploring unfamiliar schemas.

Instructions

Fetch the first N rows of a table to learn its data shape.

Rows arrive on the text channel only, inside the untrusted-data banner: this tool emits no structuredContent.

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": {
      "database": "<database>",
      "table": "<table>"
    },
    "name": "sample_table_rows"
  }
}

Input Schema

NameRequiredDescriptionDefault
nNo
tableYes
databaseYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior4/5

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

No annotations exist, so the description carries the full burden, and it does disclose a genuinely non-obvious behavior: results come back only on the text channel inside an untrusted-data banner and there is no structuredContent. That is real value an agent cannot infer elsewhere. It omits other behavioral facts such as row/size limits, cost, or error behavior for a missing table.

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?

Two short sentences, front-loaded with the action and scope, then the output-channel caveat. Nothing is redundant, though the hard line breaks make it slightly ragged as prose.

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?

With no output schema the description correctly explains the return channel, which is the most important missing piece. However, for a 3-parameter tool with zero schema coverage it leaves parameter meaning and failure behavior underspecified, so it is only adequate rather than complete.

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, and it only partially does: it explains n as the row count to take and implies the default via 'first N'. It says nothing about database or table semantics — name qualification, case sensitivity, or whether these must already exist — leaving two of three parameters undocumented anywhere.

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?

States a specific verb+resource ('Fetch the first N rows of a table') plus a stated purpose ('to learn its data shape'), which separates it in intent from the cursor-based fetch_rows sibling and from schema-inspection tools. It stops short of explicitly naming which sibling to use instead.

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?

Implied usage is clear — sampling to understand data shape before writing queries — but there is no explicit when-not guidance or pointer to alternatives such as fetch_rows, get_table_schema, or execute_read_query, all of which could plausibly be chosen for overlapping goals.

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