Skip to main content
Glama
dkp5897

SQL Server MCP Server

by dkp5897

sql_count_and_sample

Retrieve row count and a data sample from a table to understand what data exists without executing a full query.

Instructions

Get the row count and a sample of rows from a table. Useful for quickly understanding what data exists without writing a full query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYesTable name
whereNoOptional WHERE clause to filter (e.g. 'Status = 1')
sampleSizeNoNumber of sample rows to show (default: 10)
Behavior3/5

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

No annotations are provided, but this is a read-only inspection tool, so the behavioral burden is low. The description notes it 'samples' rows, implying a subset rather than full data, which is useful. However, it doesn't disclose how sampling is performed (random vs first N rows), sample row ordering, or whether the count reflects the filtered set.

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 concise sentences, zero filler. The purpose and primary use case are front-loaded. It's appropriately compact for the tool's simplicity.

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?

The tool is simple (3 params, 100% schema coverage, no output schema). The description covers the basics adequately. However, since no output schema exists, the description could have clarified return format (e.g., does it return both count and rows together?), and the sampling method (random vs sequential) is left ambiguous.

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%, including the WHERE clause example and default sampleSize of 10, so the schema already handles parameter documentation. The description adds minimal value beyond stating the tool counts and samples, providing no extra context about how 'where' interacts with both count and sample.

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 clearly states the tool returns a row count and sample rows from a table, with a specific verb (get) and resource (table). It distinguishes from siblings like sql_run_query (full query execution) and sql_inspect_table (schema inspection), though it doesn't explicitly name 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?

The description says it's useful for 'quickly understanding what data exists without writing a full query,' which gives clear use context. However, it doesn't explicitly state when not to use it or name alternative tools like sql_run_query or sql_inspect_table, relying on implicit differentiation.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dkp5897/sql-server-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server