Skip to main content
Glama
Andrian17

mssql-mcp-server

by Andrian17

mssql_execute_sql

Run arbitrary T-SQL statements against SQL Server, including parameterized queries, batch separators, and optional transaction control.

Instructions

Execute arbitrary T-SQL - sql="ANY_VALID_TSQL" with optional parameters, GO batch separators and transaction support. Examples: sql="CREATE INDEX ...", sql="WITH cte AS (...) SELECT ...", transactional=true

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesT-SQL to execute (any valid SQL Server SQL; GO separators split batches)
timeoutNoQuery timeout in milliseconds (per batch)
expectRowsNoWhether to expect rows back (false for statements like CREATE, DROP, etc.)
parametersNoParameter values for @p1, @p2, ... (or $1, $2, ...) placeholders
transactionalNoWhether to wrap all batches in a single transaction
connectionStringNoSQL Server connection string (optional; requires --allow-tool-connection-string)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the behavioral disclosure burden and does reveal key behavior: arbitrary SQL execution, GO batch splitting, optional parameters, and transaction support. However, it does not mention potential destructive side effects, result/return behavior, or permission requirements, so transparency is partial.

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 compact and well-structured: one clear declarative sentence followed by two illustrative examples. There is no filler, and the core behavior is front-loaded.

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 schema covers all parameters and the description covers invocation patterns and transaction behavior, which is adequate for basic use. However, there is no output schema, and the description does not state what the tool returns (rows, affected counts, etc.), leaving a notable gap for a generic SQL executor.

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 six parameters. The description adds only a high-level mention of optional parameters and a transactional example, providing no additional meaning beyond what the input schema already states.

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 executes arbitrary T-SQL, with examples spanning DDL (CREATE INDEX) and a CTE SELECT, so its generic scope is evident. However, it does not explicitly contrast itself with siblings like mssql_execute_query or mssql_execute_mutation, leaving some boundary inference to the agent.

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 phrase 'arbitrary T-SQL' and the examples imply this is the general-purpose runner, but the description never states when to prefer it over the specialized sibling tools or when not to use it. No exclusions or alternative routing guidance is provided.

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