Skip to main content
Glama
esasiyun17

MSSQL-MCP

by esasiyun17

Sample rows

sample_rows

Return the first N rows of a table to inspect its content. Quickly view sample data without writing SQL queries.

Instructions

Return the first N rows of a table (default 5, maximum 50) to inspect its content. Accepts "Table" or "schema.Table". Subject to the table allowlist if configured.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNoNumber of rows to return (1-50, default 5)
tableYesTable name, optionally schema-qualified, e.g. "dbo.Orders"

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does add value: it discloses the cap (max 50), the default, and that the call is 'subject to the table allowlist if configured' — a real access constraint not in the schema. It omits error behavior for non-allowlisted tables, but the safety profile (read-only inspection) is clear from the wording.

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?

Two tight sentences: the row limit is front-loaded, then the naming format, then the allowlist caveat. No filler and every clause carries information.

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?

There is no output schema or annotation, but for a simple sampling tool the description conveys the return shape (first N rows) and the key constraints. A note on behavior when the table is not allowlisted or does not exist would close the remaining gap.

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 coverage is 100%, so both parameters are already documented. The description's mention of the default (5) and maximum (50) and the 'Table' or 'schema.Table' format largely repeats what the schema descriptions already say, adding no syntax or behavioral detail beyond it.

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 and resource ('Return the first N rows of a table') plus the intent ('to inspect its content'), which distinguishes it from list_tables and describe_table. It does not explicitly contrast with run_query, which could also return rows, so the sibling differentiation is only implied.

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?

'To inspect its content' implies a quick-peek use case versus a full query, giving some usage context. However, it never states when to prefer run_query instead, nor any exclusions, so the guidance remains implied rather than explicit.

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