Skip to main content
Glama
ahaugerud

sql-server-mcp

by ahaugerud

query

Execute a single read-only SELECT statement against SQL Server/Fabric; returns up to 25 rows and requires fully qualified database.schema.table references.

Instructions

Execute a single read-only SELECT statement. Returns at most 25 rows. Table references must be fully qualified as database.schema.table - there is no mutable 'active database'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.2

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose two operationally critical traits: results are truncated at 25 rows, and there is no mutable 'active database' so every table must be fully qualified. It omits timeout, permission, and error behavior, keeping it below a 5.

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?

Three short sentences, front-loaded with the operation and its limits, then the qualification rule. Nothing is padded or redundant.

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?

For a one-parameter tool with an output schema covering return values, the description supplies the essential constraints (read-only, single statement, row cap, qualification rule). Minor gaps remain around error/failure behavior, but nothing an agent needs to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The single `sql` parameter has 0% schema description coverage, so the description must compensate. It does meaningfully: the value must be one read-only SELECT and must reference tables as database.schema.table, which is syntax the schema itself does not convey.

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 ('Execute a single read-only SELECT statement') with a clear read-only constraint and row cap. It implicitly separates this from export_query by capping results at 25 rows, but never explicitly names the sibling or contrasts with it.

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 read-only/single-statement/25-row constraints imply when this tool is inappropriate (large extracts), but the agent must infer that export_query is the alternative. No explicit when-to-use vs when-not-to-use routing is provided.

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

Deploy Server

Other Tools