Skip to main content
Glama
michaelyuwh

Enhanced MCP MSSQL Server

by michaelyuwh

🚀 Enhanced MCP MSSQL Server

A production-ready Model Context Protocol (MCP) server for Microsoft SQL Server that provides AI agents with secure, stateless database access capabilities.

New Features & Enhancements

  • 🔒 Advanced Security: SQL injection protection, query validation, and configurable security policies

  • 📊 Health Monitoring: Real-time performance metrics and connection health checks

  • ⚙️ Configuration Management: Environment-specific settings for development and production

  • 📦 Bulk Operations: Efficient batch processing for large-scale data operations

  • 🛡️ Enhanced Error Handling: Structured errors with actionable information for AI agents

  • 🎯 Production Ready: Enterprise-grade monitoring and security capabilities

Related MCP server: SQL Server MCP

🛠️ Available Tools (9 Total)

Core Database Tools (Enhanced)

  1. mssql_list_databases - List all accessible databases

  2. mssql_list_tables - List tables in a specific database

  3. mssql_describe_table - Get detailed table schema information

  4. mssql_query - Execute queries with security validation and metrics

  5. mssql_sample_data - Retrieve sample rows from tables

  6. mssql_get_relationships - Discover foreign key relationships

New Advanced Tools

  1. mssql_health_check - Server health monitoring with performance metrics

  2. mssql_validate_query - Security validation without query execution

  3. mssql_bulk_insert - Efficient bulk data insertion operations

🚀 Quick Start

# Install dependencies
npm install

# Build the project  
npm run build

# Configure your database (copy .env.example to .env)
cp .env.example .env

# Start the server
npm start

# Run tests (requires running MSSQL server)
npm test

🎯 What This Does

This MCP server allows AI agents to:

  • Connect to MSSQL databases securely

  • Discover database schemas (databases, tables, columns)

  • Query data safely with read-only access

  • Explore relationships and metadata

  • Sample data for analysis without full table scans

✨ Key Features

  • Read-Only Safety: Only SELECT queries allowed

  • 🔒 Secure Authentication: Encrypted connections by default

  • 🔍 Schema Discovery: Automatic database structure exploration

  • 📊 Smart Sampling: Get representative data without overload

  • 🔗 Relationship Mapping: Understand foreign key connections

  • 🛡️ SQL Injection Protection: Parameterized queries and validation

🛠️ Installation

Prerequisites:

  • Node.js 18+

  • Access to MSSQL Server (2008 R2+)

  • Database user with read permissions

Setup:

  1. Clone or download this repository

  2. Run npm install to install dependencies

  3. Run npm run build to compile TypeScript

  4. Configure your database connection (see Configuration section)

📝 Configuration

No Configuration Required!

This MCP server is now stateless - you provide connection details when calling each tool. The AI agent will ask for your database credentials when needed.

For Claude Desktop, add to your configuration:

{
  "mcpServers": {
    "mssql": {
      "command": "node",
      "args": ["path/to/mcp-mssql-connector/dist/index.js"]
    }
  }
}

🔧 Available Tools

Tool

Description

Key Parameters

mssql_connect

Connect to MSSQL server

server, user, password

mssql_list_databases

List available databases

-

mssql_list_tables

List tables in database

database

mssql_describe_table

Get table structure

database, table

mssql_query

Execute SELECT query

database, query, limit

mssql_sample_data

Get sample rows

database, table, limit

mssql_get_relationships

Get foreign keys

database, table

💡 Usage Examples

List databases:

List all databases on server 'myserver.com' using username 'myuser' and password 'mypass'

Explore structure:

List all tables in the 'Northwind' database on myserver.com with my credentials

Query data:

Query "SELECT TOP 10 * FROM Customers WHERE Country = 'USA'" on Northwind database at myserver.com

Understand relationships:

Show foreign key relationships for the Orders table in Northwind database on myserver.com

🔒 Security

  • Read-Only: Only SELECT statements allowed

  • Input Validation: All parameters validated with Zod schemas

  • Connection Security: TLS encryption enabled by default

  • Query Limits: Automatic row limits prevent data dumps

  • Error Handling: Safe error messages without exposing internals

📚 Documentation

🤝 Contributing

  1. Fork the repository

  2. Create a feature branch

  3. Make your changes

  4. Add tests if applicable

  5. Submit a pull request

📄 License

MIT License - see LICENSE file for details

🆘 Support

If you encounter issues:

  1. Check the Usage Guide for common solutions

  2. Verify your MSSQL server configuration

  3. Ensure proper database permissions

  4. Open an issue with error details

Available Tools

9 tools
mssql_bulk_insertC

Insert multiple rows efficiently using bulk operations

ParametersJSON Schema
NameRequiredDescriptionDefault
serverYesMSSQL Server hostname or IP address
portNoPort number (default: 1433)
userYesUsername for authentication
passwordYesPassword for authentication
databaseYesDatabase name
tableYesTarget table name
dataYesArray of objects representing rows to insert
encryptNoUse encrypted connection (default: true)
trustServerCertificateNoTrust server certificate (default: true)

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations provided, the description carries full burden but only mentions efficiency without disclosing critical behavioral traits such as authentication requirements, potential data overwriting, transaction handling, error behavior, or rate limits. It lacks details on what 'bulk operations' entail beyond the basic insert action.

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 ('Insert multiple rows efficiently') without unnecessary words. It earns its place by conveying key information concisely.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (mutation with 9 parameters, no annotations, no output schema), the description is insufficient. It lacks details on authentication, data format expectations, error handling, and output behavior, leaving significant gaps for safe and effective use by an AI agent.

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 fully documents all 9 parameters. The description adds no additional meaning beyond implying 'multiple rows' relates to the 'data' parameter, but it doesn't clarify parameter interactions or usage nuances, meeting the baseline for high schema coverage.

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 action ('Insert multiple rows') and resource ('using bulk operations'), specifying it's for efficiency. It distinguishes from basic insert operations but doesn't explicitly differentiate from sibling tools like mssql_query, which might also handle inserts.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description mentions 'efficiently' for bulk operations, implying usage for large datasets, but provides no explicit guidance on when to use this tool versus alternatives like mssql_query or other siblings. No exclusions or prerequisites are stated.

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

mssql_describe_tableC

Get detailed information about a table structure

ParametersJSON Schema
NameRequiredDescriptionDefault
serverYesMSSQL Server hostname or IP address
portNoPort number (default: 1433)
userYesUsername for authentication
passwordYesPassword for authentication
databaseYesDatabase name
tableYesTable name
encryptNoUse encrypted connection (default: true)
trustServerCertificateNoTrust server certificate (default: true)

TDQS

C2.9/5.0
Behavior2/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. While 'Get detailed information' implies a read-only operation, it doesn't explicitly state this or mention other behavioral traits like authentication requirements, potential performance impact, error conditions, or what format the detailed information will be returned in. The description is too minimal for a tool that interacts with a database system.

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 states the core purpose without any wasted words. It's appropriately sized for a straightforward tool and gets directly to the point with no unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a database metadata tool with 8 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what 'detailed information' includes (columns, data types, constraints, indexes, etc.), doesn't mention authentication requirements despite the schema including user/password parameters, and provides no context about the complexity of the operation or expected output format.

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?

The schema description coverage is 100%, with all 8 parameters well-documented in the schema itself. The description adds no additional parameter information beyond what's already in the schema, so it meets the baseline of 3 for high schema coverage. It doesn't explain how parameters interact or provide usage examples.

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's purpose as 'Get detailed information about a table structure' which is a specific verb+resource combination. It distinguishes itself from siblings like mssql_list_tables (which lists tables) and mssql_query (which executes queries), though it doesn't explicitly mention these distinctions in the description text itself.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when this tool is appropriate compared to mssql_list_tables (for listing tables) or mssql_get_relationships (for understanding table relationships), nor does it specify prerequisites or constraints for its use.

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

mssql_get_relationshipsC

Get foreign key relationships for tables

ParametersJSON Schema
NameRequiredDescriptionDefault
serverYesMSSQL Server hostname or IP address
portNoPort number (default: 1433)
userYesUsername for authentication
passwordYesPassword for authentication
databaseYesDatabase name
tableNoTable name (optional - if not provided, gets all relationships)
encryptNoUse encrypted connection (default: true)
trustServerCertificateNoTrust server certificate (default: true)

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure but offers minimal information. It doesn't indicate whether this is a read-only operation, what format the relationships are returned in, whether it requires specific permissions, or any performance considerations. The description states what the tool does but not how it behaves.

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 states the core purpose without unnecessary words. It's appropriately sized for a straightforward data retrieval tool and gets directly to the point with zero waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a database tool with 8 parameters, no annotations, and no output schema, the description is insufficiently complete. It doesn't address what the output looks like (structure, format), error conditions, authentication requirements beyond what's in the schema, or how it differs from related tools. The agent lacks critical context for proper tool selection and invocation.

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 fully documents all 8 parameters. The description adds no additional parameter semantics beyond what's in the schema - it doesn't explain the optional 'table' parameter's effect on scope or provide context about relationship types. Baseline 3 is appropriate when schema does all the work.

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 verb ('Get') and resource ('foreign key relationships for tables'), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like mssql_describe_table or mssql_list_tables, but the specific focus on foreign key relationships provides reasonable distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like mssql_describe_table (which might include relationship info) or mssql_list_tables. There's no mention of prerequisites, use cases, or comparison with sibling tools, leaving the agent to infer usage context.

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

mssql_health_checkB

Check database server health and connectivity with performance metrics

ParametersJSON Schema
NameRequiredDescriptionDefault
serverYesMSSQL Server hostname or IP address
portNoPort number (default: 1433)
userYesUsername for authentication
passwordYesPassword for authentication
encryptNoUse encrypted connection (default: true)
trustServerCertificateNoTrust server certificate (default: true)
includeMetricsNoInclude performance metrics (default: true)

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'health and connectivity with performance metrics,' which implies a read-only diagnostic operation, but doesn't specify what metrics are included, whether it's safe to run frequently, or if it requires specific permissions. For a tool with 7 parameters and no annotation coverage, this leaves significant gaps in understanding its behavior.

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: 'Check database server health and connectivity with performance metrics.' It's front-loaded with the core purpose and avoids any unnecessary words, making it highly concise and well-structured for quick comprehension.

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 (7 parameters, no annotations, no output schema), the description is minimally adequate. It states the purpose clearly but lacks details on behavior, usage context, and output format. Without annotations or an output schema, the agent must rely heavily on the input schema and may struggle with how to interpret results, leaving room for improvement.

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%, meaning all parameters are documented in the input schema with clear descriptions. The description adds no additional parameter information beyond implying that metrics might be included via 'includeMetrics.' Since the schema does the heavy lifting, the baseline score of 3 is appropriate, as the description doesn't compensate for any gaps.

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's purpose: 'Check database server health and connectivity with performance metrics.' It specifies the verb ('Check'), resource ('database server'), and scope ('health and connectivity with performance metrics'), making it easy to understand. However, it doesn't explicitly differentiate from siblings like mssql_query or mssql_list_databases, which might also involve connectivity checks, so it's not a perfect 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, such as needing valid credentials, or compare it to siblings like mssql_list_databases for basic connectivity. Without any explicit when/when-not statements or named alternatives, the agent must infer usage from the purpose alone.

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

mssql_list_databasesC

List all databases the user has access to

ParametersJSON Schema
NameRequiredDescriptionDefault
serverYesMSSQL Server hostname or IP address
portNoPort number (default: 1433)
userYesUsername for authentication
passwordYesPassword for authentication
encryptNoUse encrypted connection (default: true)
trustServerCertificateNoTrust server certificate (default: true)

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While it indicates this is a read operation ('List'), it doesn't describe what the output looks like (e.g., format, structure, or pagination), authentication requirements beyond the parameters, or any rate limits or constraints. This leaves significant gaps for a tool with connection parameters.

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 directly states the tool's purpose without unnecessary words. It's front-loaded and wastes no space, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a database listing tool with connection parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain the return format, error handling, or how 'access' is determined, leaving the agent with incomplete information to use the tool effectively.

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?

The description adds no parameter-specific information beyond what's already in the schema, which has 100% coverage with detailed descriptions for all 6 parameters. The baseline score of 3 reflects adequate schema documentation, but the description doesn't compensate with additional context like parameter interactions or usage examples.

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 action ('List all databases') and the resource ('databases the user has access to'), providing a specific verb+resource combination. However, it doesn't distinguish this tool from its sibling 'mssql_list_tables', which also lists resources but at a different level (tables vs databases).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'mssql_list_tables' or 'mssql_query'. It doesn't mention prerequisites, context, or exclusions, leaving the agent to infer usage from the tool name alone.

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

mssql_list_tablesC

List all tables in a database

ParametersJSON Schema
NameRequiredDescriptionDefault
serverYesMSSQL Server hostname or IP address
portNoPort number (default: 1433)
userYesUsername for authentication
passwordYesPassword for authentication
databaseYesDatabase name
encryptNoUse encrypted connection (default: true)
trustServerCertificateNoTrust server certificate (default: true)

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'List' implies a read operation, it doesn't specify whether this requires specific permissions, what format the output takes (e.g., table names only vs. metadata), or any limitations like pagination or rate constraints. This leaves significant gaps for a database tool.

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 states the core functionality without unnecessary words. It's appropriately sized for a straightforward listing operation and gets directly to the point.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a database tool with 7 parameters, no annotations, and no output schema, the description is insufficient. It doesn't address authentication requirements, connection behavior, output format, or how this differs from sibling tools. The agent would need to rely heavily on the input schema alone.

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%, providing complete parameter documentation. The description adds no additional parameter information beyond what's already in the schema, so it meets the baseline expectation but doesn't enhance understanding of the 7 connection parameters.

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 action ('List') and target resource ('all tables in a database'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'mssql_list_databases' or 'mssql_describe_table', which would require more specific scope clarification.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'mssql_list_databases' (lists databases) and 'mssql_describe_table' (describes specific table structure), the agent receives no help in selecting between these related listing/describing tools.

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

mssql_queryC

Execute a read-only SELECT query

ParametersJSON Schema
NameRequiredDescriptionDefault
serverYesMSSQL Server hostname or IP address
portNoPort number (default: 1433)
userYesUsername for authentication
passwordYesPassword for authentication
databaseYesDatabase name
queryYesSQL SELECT query to execute
limitNoMaximum number of rows to return (default: 100)
encryptNoUse encrypted connection (default: true)
trustServerCertificateNoTrust server certificate (default: true)

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states 'read-only SELECT query' which implies safety and query type, but lacks details on execution limits, error handling, result format, or performance implications. This is inadequate for a tool with 9 parameters and database operations.

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, clear sentence with zero wasted words. It's front-loaded with the core functionality ('Execute a read-only SELECT query'), making it immediately actionable without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a database query tool with 9 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what the tool returns (e.g., result set format), error conditions, or important behavioral aspects like transaction handling or timeout settings, leaving significant gaps for agent understanding.

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 fully documents all 9 parameters. The description adds no parameter-specific information beyond implying the query must be SELECT-type. This meets the baseline for high schema coverage but doesn't enhance understanding of parameter interactions or constraints.

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 action ('Execute') and resource ('a read-only SELECT query'), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like mssql_validate_query or mssql_sample_data, which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like mssql_validate_query (for validation) or mssql_sample_data (for sampling). It mentions 'read-only SELECT query' but doesn't clarify exclusions (e.g., no DML operations) or prerequisites beyond what's in the schema.

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

mssql_sample_dataC

Get sample data from a table

ParametersJSON Schema
NameRequiredDescriptionDefault
serverYesMSSQL Server hostname or IP address
portNoPort number (default: 1433)
userYesUsername for authentication
passwordYesPassword for authentication
databaseYesDatabase name
tableYesTable name
limitNoNumber of sample rows (default: 10)
encryptNoUse encrypted connection (default: true)
trustServerCertificateNoTrust server certificate (default: true)

TDQS

C2.7/5.0
Behavior2/5

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

With no annotations, the description carries full burden but only states basic functionality. It doesn't disclose behavioral traits like whether this is a read-only operation, potential performance impacts, authentication requirements beyond parameters, or how sample rows are selected (e.g., random vs. first N). The description is minimal and lacks critical context for safe use.

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 with zero waste. It's appropriately sized and front-loaded, though it could benefit from more detail given the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (9 parameters, no annotations, no output schema), the description is incomplete. It doesn't explain return values, error handling, or how 'sample data' is defined, leaving significant gaps for an AI agent to use it correctly.

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 fully documents all 9 parameters. The description adds no meaning beyond what the schema provides—it doesn't explain parameter interactions, default behaviors, or usage examples. Baseline 3 is appropriate when schema does all the work.

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

Purpose3/5

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

The description 'Get sample data from a table' clearly states the verb ('Get') and resource ('sample data from a table'), but it's vague about scope and doesn't distinguish from siblings like 'mssql_query' or 'mssql_describe_table'. It doesn't specify what 'sample' means or how it differs from a full query.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like 'mssql_query' for custom queries or 'mssql_describe_table' for schema info. The description implies a simple data retrieval but doesn't specify use cases, prerequisites, or exclusions.

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

mssql_validate_queryA

Validate a SQL query for security and syntax without executing it

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesSQL query to validate
includeOptimizationsNoInclude optimization suggestions (default: false)

TDQS

A4.2/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses that validation is for 'security and syntax' and occurs 'without executing it', which is useful behavioral context. However, it doesn't mention error handling, response format, or performance implications (e.g., timeouts), leaving some gaps for a tool with no annotation coverage.

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 ('Validate a SQL query') and adds key qualifiers ('for security and syntax without executing it'). Every word earns its place with zero waste, making it highly concise and well-structured.

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?

Given the tool's moderate complexity (validation without execution), no annotations, and no output schema, the description is mostly complete. It covers the purpose and key behavioral trait (non-execution) but lacks details on output format or error handling. It's adequate but could be more comprehensive for full agent guidance.

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 both parameters fully. The description doesn't add any meaning beyond what the schema provides (e.g., it doesn't explain what 'security' validation entails or give examples). Baseline 3 is appropriate as the schema does the heavy lifting.

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 ('validate a SQL query') and the resource ('SQL query'), distinguishing it from siblings like mssql_query (which executes) and mssql_describe_table (which inspects structure). It explicitly notes the validation is for 'security and syntax without executing it', making the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states when to use this tool: to validate queries 'without executing it', which directly contrasts with mssql_query (which executes). This provides clear guidance on choosing this tool over its sibling for pre-execution checks, with no misleading or missing exclusions.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 9 tool updates
    • First observedmssql_bulk_insert
    • First observedmssql_describe_table
    • First observedmssql_get_relationships
    • First observedmssql_health_check
    • First observedmssql_list_databases
    • First observedmssql_list_tables
    • First observedmssql_query
    • First observedmssql_sample_data
    • First observedmssql_validate_query

TDQS

A3.5/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose targeting specific database operations. There is no overlap: bulk_insert, describe_table, get_relationships, health_check, list_databases, list_tables, query, sample_data, and validate_query all serve unique functions in the MSSQL domain.

Naming Consistency5/5

All tools follow a consistent 'mssql_verb_noun' pattern with snake_case throughout. The naming is predictable and readable, making it easy for agents to understand the tool's function from its name alone.

Tool Count5/5

With 9 tools, this server is well-scoped for database management tasks. Each tool earns its place by covering essential operations like listing, querying, describing, and validating, without being overly sparse or bloated.

Completeness4/5

The toolset provides strong coverage for read operations, validation, and metadata queries in MSSQL. A minor gap exists in write operations beyond bulk_insert (e.g., update, delete, or stored procedure execution), but agents can work around this for most common database interactions.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides read-only access to Microsoft SQL Server databases using Windows Authentication, enabling AI assistants to safely explore schemas and query data with built-in security controls.
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Enables AI assistants to interact with Microsoft SQL Server databases through query execution, schema discovery, CRUD operations, stored procedures, and data export with built-in safety controls.
    18
    Apache 2.0
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to connect and query Microsoft SQL Server databases using natural language, executing read-only SQL queries for safe data inspection and analysis.
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to securely interact with Microsoft SQL Server databases to query data, inspect schemas, and retrieve metadata with read-only operations by default and optional write capabilities.
    1
    MIT

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/michaelyuwh/mcp-mssql-connector'

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