Skip to main content
Glama
pg-insight-mcp

pg-insight-mcp

Sample rows

sample_rows
Read-onlyIdempotent

Returns the first rows of a PostgreSQL table so you can inspect sample data and understand its structure before writing queries.

Instructions

Return the first rows of a table to 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
limitNo
tableYes
schemaNopublic

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is fully covered elsewhere. The description adds only that the result is a limited head of the table; it does not disclose ordering guarantees, the default row count, or behavior for missing tables — context annotations cannot supply.

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?

A single front-loaded sentence with no filler or redundancy, which is appropriately sized for a simple preview tool. The trailing clause "to see what the data looks like" earns its place by conveying intent, though the brevity comes at the cost of the missing detail noted elsewhere.

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

Completeness2/5

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

An output schema exists, so return values need not be explained, and the annotations cover safety. But for a 3-parameter tool with zero schema descriptions, the definition should at least identify the schema/limit parameters and their defaults; as written, an agent cannot tell what 'schema' means or how many rows 'first rows' is.

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 carry parameter meaning, and it largely fails: the 'schema' parameter (default 'public') is never mentioned and 'limit' is only hinted at by "first rows" with no default or bounds stated. Only the 'table' parameter is implicitly covered by the phrase "of a table".

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?

"Return the first rows of a table" states a specific verb (return) and resource (rows of a table), and the preview intent is clear enough to distinguish it from run_query. It does not name any sibling tool explicitly, so the differentiation is inferred rather than stated.

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?

The phrase "to see what the data looks like" implies a data-preview use case, which is reasonable guidance. However, it never says when to prefer describe_table (structure only) or run_query (arbitrary SQL), nor does it state any prerequisites or exclusions.

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