Skip to main content
Glama
dperussina

Microsoft SQL Server MCP Server (MSSQL)

Execute SQL Query

execute_query

Run SQL SELECT queries on Microsoft SQL Server databases to retrieve data with automatic row limiting for efficient exploration and analysis.

Instructions

Execute a custom SQL SELECT query with automatic limit (top 20 rows)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
connectionStringNoSQL Server connection string (uses default if not provided)
connectionNameNoNamed connection to use (e.g., 'production', 'staging')
queryYesSQL SELECT query to execute
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It adds valuable context beyond the input schema by specifying 'automatic limit (top 20 rows)', which informs the agent about result truncation behavior. However, it does not cover other potential behaviors like error handling, permissions required, or execution time limits.

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?

The description is a single, efficient sentence that front-loads the core purpose and includes a critical behavioral detail (automatic limit). There is no wasted verbiage, and every word contributes to understanding the tool's function and constraints.

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?

Given the tool's complexity (executing arbitrary SQL queries) and lack of annotations and output schema, the description is minimally adequate. It covers the core action and a key behavioral trait (row limit), but does not address output format, error conditions, or security implications, leaving gaps for a mutation-capable tool.

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 the schema already documents all three parameters thoroughly. The description does not add any meaning beyond what the schema provides for parameters like 'connectionString' or 'query'. Baseline 3 is appropriate as the schema handles parameter documentation adequately.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Execute a custom SQL SELECT query') and resource (SQL queries), distinguishing it from sibling tools that analyze, describe, list, or sample data rather than executing arbitrary queries. It precisely conveys the tool's function as a query executor.

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 implies usage for executing custom SELECT queries, but does not explicitly state when to use this tool versus alternatives like 'sample_data' or other analysis tools. It lacks guidance on prerequisites, exclusions, or specific scenarios favoring this tool over siblings.

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/dperussina/mssql-mcp-server'

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