Skip to main content
Glama
sql-lens-mcp

sql-lens-mcp

by varkart

sample_rows

Fetches a small representative sample of rows from a database table, defaulting to 10 and capped at 100, to inspect content and verify structure quickly.

Instructions

Fetch representative rows from a table (default 10, max 100)

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": {
      "connectionId": "<connectionId>",
      "table": "<table>"
    },
    "name": "sample_rows"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoNumber of rows (default 10, max 100)
tableYesTable name
formatNoOutput format
schemaNoSchema name
connectionIdYesConnection ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full disclosure burden. It usefully states the default (10) and cap (100), which bounds the cost of the call, but says nothing about whether sampling is random or first-N, whether it scans the whole table, or what permissions or errors to expect.

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 clause with no wasted words. It is arguably too terse for the amount of behavior left unexplained, but nothing in it is redundant.

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?

For a five-parameter tool with no output schema and no annotations, the description covers only bounds. It never explains what 'representative' means or what the returned rows look like, though the format enum in the schema partially covers output shape.

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 all five parameters are already documented. The description only restates the limit default and maximum, which the schema already says, adding no meaning beyond structured data — baseline 3.

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?

Names a specific verb ('Fetch') and resource ('representative rows from a table'), so the operation is clear. It does not differentiate itself from siblings like execute_query or nl_query, which also surface rows, leaving the agent to infer which one to pick.

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 gives no when-to-use guidance, no prerequisites, and no exclusions. An agent cannot tell from this text whether to sample rows first or go straight to execute_query for a real query.

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