Skip to main content
Glama
bpamiri

SQL Server MCP

by bpamiri

pymssql-mcp

An MCP (Model Context Protocol) server for Microsoft SQL Server databases. Enables AI assistants like Claude to interact with SQL Server through a standardized protocol.

PyPI version Python 3.10+ License: Apache-2.0

Features

  • Natural Language Queries: Ask Claude about your data in plain English

  • Schema Discovery: Explore tables, views, columns, and relationships

  • CRUD Operations: Read, insert, update, and delete rows safely

  • Stored Procedures: Execute stored procedures with parameters

  • Multi-Database Support: List and switch between databases

  • Data Export: Export query results to JSON or CSV files

  • Transaction Support: Begin, commit, and rollback transactions

  • Knowledge Persistence: Claude remembers what it learns about your database

  • Safety Controls: Read-only mode, command blocking, row limits, schema restrictions

  • Connection Watchdog: Automatic recovery from hung connections

  • OAuth Integration: Deploy as a Claude.ai Custom Connector with SSO

Related MCP server: MSSQL MCP Server

Documentation

Guide

Description

What is MCP?

Understanding MCP and pymssql-mcp

Installation

Complete installation guide

Quickstart

Get running in 10 minutes

Configuration

All configuration options

Tools Reference

Detailed tool documentation

Usage Examples

Common usage patterns

OAuth Setup

Claude.ai integration with SSO

Quick Start

1. Install

pip install pymssql-mcp

2. Configure Claude Desktop

Edit your Claude Desktop config file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "mssql": {
      "command": "pymssql-mcp",
      "env": {
        "MSSQL_HOST": "your-server.example.com",
        "MSSQL_USER": "your-username",
        "MSSQL_PASSWORD": "your-password",
        "MSSQL_DATABASE": "your-database",
        "MSSQL_READ_ONLY": "true"
      }
    }
  }
}

3. Restart Claude Desktop

Quit and reopen Claude Desktop. You'll see a hammer icon indicating tools are available.

4. Start Chatting

Ask Claude about your database:

"What tables are available?"

"Describe the Customers table"

"Show me the top 10 orders by total amount"

"How many customers do we have in each state?"

Available Tools

Connection & Database

Tool

Description

connect

Connect to the database

disconnect

Close all connections

list_databases

List available databases

switch_database

Switch database context

Queries & Schema

Tool

Description

execute_query

Run a SELECT query

validate_query

Check if a query is safe

list_tables

List tables and views

describe_table

Get column information

CRUD Operations

Tool

Description

read_rows

Read rows by ID or filter

insert_row

Insert a new row

update_row

Update an existing row

delete_row

Delete a row

Stored Procedures

Tool

Description

list_stored_procs

List available procedures

describe_stored_proc

Get procedure parameters

call_stored_proc

Execute a procedure

Export & Transactions

Tool

Description

export_to_json

Export results to JSON

export_to_csv

Export results to CSV

begin_transaction

Start a transaction

commit_transaction

Commit changes

rollback_transaction

Rollback changes

Knowledge Persistence

Tool

Description

save_knowledge

Save learned information

get_all_knowledge

Retrieve all knowledge

search_knowledge

Search saved knowledge

Configuration

Required Variables

Variable

Description

MSSQL_HOST

SQL Server hostname

MSSQL_USER

Database username

MSSQL_PASSWORD

Database password

MSSQL_DATABASE

Database name

Safety Settings

Variable

Default

Description

MSSQL_READ_ONLY

false

Block all write operations

MSSQL_MAX_ROWS

1000

Maximum rows per query

MSSQL_BLOCKED_COMMANDS

DROP,TRUNCATE,...

Commands to block

MSSQL_ALLOWED_SCHEMAS

(all)

Restrict to specific schemas

MSSQL_BLOCKED_DATABASES

(none)

Hide specific databases

See Configuration Reference for all options.

Deployment Modes

Local (Default)

Run as a local process with Claude Desktop:

pymssql-mcp

HTTP/SSE Server

Run as a shared HTTP server for multiple users:

pymssql-mcp --http --host 0.0.0.0 --port 8080

Streamable HTTP (Claude.ai Integration)

Run with OAuth authentication for Claude.ai:

pymssql-mcp --streamable-http --host 0.0.0.0 --port 8080

See OAuth Setup for complete integration instructions.

Development

# Clone repository
git clone https://github.com/bpamiri/pymssql-mcp.git
cd pymssql-mcp

# Install with dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Lint and format
ruff check .
ruff format .

# Type check
mypy src/

Security

pymssql-mcp includes multiple safety features:

  • Read-only mode: Prevent all write operations

  • Command blocking: Block dangerous SQL commands (DROP, TRUNCATE, etc.)

  • Schema restrictions: Limit access to specific schemas

  • Database blocklist: Hide sensitive databases

  • Row limits: Cap query results to prevent memory issues

  • Query validation: Analyze queries before execution

  • Parameterized queries: Prevent SQL injection

See SECURITY.md for security policy and best practices.

Contributing

Contributions are welcome! See CONTRIBUTING.md for guidelines.

License

Apache-2.0. See LICENSE for details.

Available Tools

18 tools
call_stored_procA

Execute a stored procedure.

Args:
    procedure: Procedure name, optionally with schema (e.g., 'dbo.sp_GetUser' or 'sp_GetUser')
    params: Input parameter values as dictionary (parameter names without @)

Returns:
    Dictionary with:
    - procedure: Full procedure name
    - result_sets: List of result sets (each is a list of row dictionaries)
    - status: 'success' or error
ParametersJSON Schema
NameRequiredDescriptionDefault
procedureYes
paramsNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.5/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 the tool executes a stored procedure and returns a dictionary with result sets and status, which adds some behavioral context. However, it lacks details on permissions, side effects, error handling, or performance implications, which are crucial for a database operation 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 well-structured and front-loaded with the purpose, followed by clear sections for Args and Returns. Every sentence adds value, such as examples and return structure, with no wasted words. It's appropriately sized for the tool's complexity.

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, no annotations, and an output schema (implied by Returns section), the description is fairly complete. It covers purpose, parameters, and return values adequately. However, it could improve by addressing usage guidelines or behavioral risks like data modification, which would make it more comprehensive.

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 schema description coverage is 0%, so the description must compensate. It adds meaningful semantics: 'procedure' includes examples with schema, and 'params' specifies input as a dictionary without '@' prefixes. This clarifies usage beyond the bare schema, though it could detail parameter types or constraints more.

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: 'Execute a stored procedure.' It specifies the verb ('Execute') and resource ('stored procedure'), which is straightforward. However, it doesn't explicitly differentiate from siblings like 'execute_query' or 'describe_stored_proc', which would require a 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 siblings like 'execute_query' for general SQL queries or 'describe_stored_proc' for metadata, leaving the agent without context for selection. This lack of comparative guidance is a significant gap.

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

connectA

Establish connection to the SQL Server database.

Uses configuration from environment variables:
- MSSQL_HOST: Server hostname or IP
- MSSQL_USER: Username
- MSSQL_PASSWORD: Password
- MSSQL_DATABASE: Database name
- MSSQL_PORT: Port (default: 1433)

Returns:
    Connection status and details including host, database, and timestamp.
ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.2/5.0
Behavior3/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 describes the configuration method (environment variables) and return details (status, host, database, timestamp), but lacks information on error handling, authentication needs, or rate limits. It adequately covers basic behavior but misses advanced operational traits.

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 well-structured and front-loaded with the main purpose, followed by configuration details and return information. Each sentence adds essential information without redundancy, making it efficient and easy to parse.

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 complexity (connection establishment with environment-based config) and the presence of an output schema, the description is mostly complete. It covers the purpose, configuration, and return overview, but could benefit from mentioning prerequisites or error scenarios to fully guide usage without relying on the output schema alone.

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 input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately focuses on configuration and return values, adding value beyond the empty schema by explaining how connection details are sourced from environment variables.

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 ('Establish connection') and resource ('SQL Server database'), distinguishing it from siblings like disconnect, list_connections, and switch_database. It precisely defines what the tool does without being vague or tautological.

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

Usage Guidelines4/5

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

The description implies usage context by specifying that it connects to the database using environment variables, but it does not explicitly state when to use this tool versus alternatives like list_connections or switch_database. It provides clear setup requirements without naming specific alternatives or exclusions.

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

delete_rowA

Delete a row by primary key.

Args:
    table: Table name (can include schema: 'dbo.Users' or 'Users')
    id: Primary key value of the row to delete

Returns:
    Dictionary with:
    - status: 'deleted' or error
    - table: Full table name
    - id: The deleted row's ID
    - rows_affected: Number of rows deleted (should be 1)
ParametersJSON Schema
NameRequiredDescriptionDefault
tableYes
idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.7/5.0
Behavior3/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 clearly indicates this is a destructive operation ('Delete') and specifies the return format, including error handling and rows_affected. However, it lacks details on permissions required, transaction behavior, or potential side effects like cascading deletions.

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?

The description is well-structured with clear sections (Args, Returns) and uses bullet points for readability. It's front-loaded with the core purpose. Minor verbosity in the Returns section could be tightened, but overall it's efficient and earns its place.

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 complexity (destructive operation with 2 params), no annotations, but with an output schema (implied by Returns section), the description is reasonably complete. It covers purpose, parameters, and return values adequately, though it could benefit from more usage context or error examples.

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?

Schema description coverage is 0%, so the description must compensate. It effectively explains both parameters: 'table' (including schema notation examples) and 'id' (as the primary key value). This adds meaningful context beyond the bare schema, though it doesn't detail data types or constraints for 'id'.

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 ('Delete a row by primary key') and identifies the resource ('row'), making the purpose immediately understandable. It distinguishes itself from sibling tools like 'insert_row' and 'update_row' by specifying deletion rather than creation or modification.

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 'update_row' for modifications or 'execute_query' for custom deletion logic. It mentions primary key deletion but doesn't clarify prerequisites such as needing an existing connection or database context, which are implied by sibling tools like 'connect' and 'switch_database'.

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

describe_stored_procA

Get parameter information for a stored procedure.

Args:
    procedure: Procedure name, optionally with schema (e.g., 'dbo.sp_GetUser' or 'sp_GetUser')

Returns:
    Dictionary with:
    - procedure: Full procedure name (schema.name)
    - parameters: List of parameter info (name, type, direction, etc.)
ParametersJSON Schema
NameRequiredDescriptionDefault
procedureYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.3/5.0
Behavior3/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 clearly indicates this is a read operation ('Get') and specifies the return format, but does not mention permissions required, rate limits, error conditions, or whether it requires an active connection. It adds value beyond the schema but lacks comprehensive behavioral context.

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 perfectly structured and front-loaded: the first sentence states the purpose, followed by clearly labeled Args and Returns sections. Every sentence earns its place by providing essential information without redundancy. The formatting enhances readability without unnecessary verbosity.

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 (single parameter, read-only operation) and the presence of an output schema (which covers return values), the description is nearly complete. It explains the purpose, parameter semantics, and return structure adequately. The main gap is lack of connection/authentication context, which might be inferred from sibling tools but isn't explicitly stated.

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

Parameters5/5

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

The schema description coverage is 0%, so the description must fully compensate. It provides detailed semantics for the single parameter: explains it's the procedure name, shows optional schema inclusion with examples ('dbo.sp_GetUser' or 'sp_GetUser'), and clarifies the format. This adds substantial meaning beyond the bare schema.

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 ('Get parameter information') and target resource ('for a stored procedure'), distinguishing it from sibling tools like list_stored_procs (which lists names) and call_stored_proc (which executes). The verb+resource combination is precise and unambiguous.

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

Usage Guidelines4/5

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

The description implies usage when parameter details are needed for a stored procedure, but does not explicitly state when to choose this over alternatives like describe_table or validate_query. It provides clear context (parameter information retrieval) but lacks explicit exclusions or comparison to siblings.

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

describe_tableA

Get detailed column information for a table.

Retrieves column definitions, primary keys, foreign keys, and indexes.

Args:
    table: Table name, optionally with schema (e.g., 'dbo.Users' or 'Users').
           Defaults to 'dbo' schema if not specified.

Returns:
    Dictionary with:
    - table: Full table name (schema.table)
    - columns: List of column info (name, type, nullable, etc.)
    - primary_key: List of primary key column names
    - foreign_keys: List of foreign key relationships
    - indexes: List of index info
ParametersJSON Schema
NameRequiredDescriptionDefault
tableYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.6/5.0
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 and does so well by detailing the return structure (dictionary with table, columns, keys, indexes), which clarifies the tool's behavior. It also specifies the default schema ('dbo') for the table parameter, adding useful context. No contradictions are present.

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 front-loaded with the core purpose, followed by details in a structured format (Args and Returns sections). Every sentence adds value: the first states the action, the second elaborates on retrieved info, and the parameter/return explanations are essential for clarity without redundancy.

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

Completeness5/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 (single parameter, no annotations, but with an output schema), the description is complete. It explains the parameter semantics thoroughly, details the return structure, and the output schema will handle return values, so no gaps remain for effective agent use.

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

Parameters5/5

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

The schema description coverage is 0%, so the description must compensate fully. It does by explaining the 'table' parameter's semantics: table name with optional schema, defaulting to 'dbo' if not specified, and providing examples ('dbo.Users' or 'Users'). This adds crucial meaning beyond the bare schema.

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 ('Get detailed column information') and resource ('for a table'), distinguishing it from siblings like list_tables (which lists table names) or describe_stored_proc (which describes stored procedures). The verb 'retrieves' and the detailed scope (column definitions, keys, indexes) make 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 Guidelines4/5

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

The description implies usage context by specifying what information is retrieved (e.g., column definitions, keys), which helps differentiate it from tools like list_tables (metadata only) or execute_query (general queries). However, it does not explicitly state when not to use it or name alternatives, such as using list_tables for basic table names only.

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

disconnectA

Close all connections to the SQL Server database.

Returns:
    Disconnection status and count of closed connections.
ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.2/5.0
Behavior3/5

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

With no annotations provided, the description carries full burden. It discloses the action ('Close all connections') and return information ('Disconnection status and count of closed connections'), which helps understand the tool's behavior. However, it doesn't mention potential side effects (e.g., whether this affects active queries, requires specific permissions, or has rate 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 perfectly concise with two sentences that each earn their place: the first states the action, the second describes the return value. It's front-loaded with the core purpose and wastes no words.

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 has no parameters, an output schema exists, and no annotations are provided, the description covers the essential purpose and return information well. However, for a potentially destructive operation like closing all connections, additional context about prerequisites or side effects would enhance completeness.

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 tool has 0 parameters with 100% schema description coverage, so the schema already fully documents the lack of inputs. The description appropriately doesn't add parameter information beyond what the schema provides, maintaining focus on the tool's purpose and behavior.

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 ('Close all connections') and target resource ('SQL Server database'), distinguishing it from sibling tools like 'list_connections' or 'connect'. It uses precise verbs and identifies the exact scope of operation.

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

Usage Guidelines4/5

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

The description implies usage context (when you want to close database connections) but doesn't explicitly state when to use this versus alternatives like 'list_connections' for monitoring or 'connect' for establishing connections. It provides clear purpose but lacks explicit comparison to sibling tools.

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

execute_queryA

Execute a read-only SQL query and return results.

Only SELECT statements are allowed. The query will have a row limit applied
automatically if not specified.

Args:
    query: SQL SELECT statement to execute
    max_rows: Maximum rows to return (overrides default, capped by MSSQL_MAX_ROWS)

Returns:
    Dictionary with:
    - query: The original query
    - executed_query: The query that was actually executed (may include TOP)
    - columns: List of column names
    - rows: List of row dictionaries
    - row_count: Number of rows returned
    - max_rows: The effective row limit applied
ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes
max_rowsNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.7/5.0
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 effectively describes key behaviors: read-only nature, automatic row limiting, and the specific return format. However, it doesn't mention potential errors, performance implications, or authentication requirements, leaving some gaps.

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 well-structured and front-loaded with the core purpose. Every sentence adds value: the first states the action and constraint, the second explains row limiting, and the Args/Returns sections clearly document parameters and output without redundancy. No wasted words.

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

Completeness5/5

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

Given the complexity of a SQL query tool with no annotations, the description is complete. It covers purpose, constraints, parameters, and detailed return values (with an output schema implied by the Returns section). This provides enough context for an agent to use the tool effectively without needing additional structured data.

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?

Schema description coverage is 0%, so the description must compensate. It adds meaningful context for both parameters: 'query' is explained as a 'SQL SELECT statement to execute', and 'max_rows' is described with its purpose ('overrides default, capped by MSSQL_MAX_ROWS'). This goes beyond the bare schema, though it could provide more detail on query syntax or constraints.

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 read-only SQL query'), the resource ('SQL query'), and the scope ('only SELECT statements are allowed'). It distinguishes from siblings like 'call_stored_proc', 'delete_row', 'insert_row', and 'update_row' by explicitly limiting to read-only SELECT operations.

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 provides explicit guidance on when to use this tool ('only SELECT statements are allowed') and when not to use it (implying not for write operations like insert/update/delete, which are handled by sibling tools). It also mentions an alternative ('call_stored_proc') for stored procedures rather than direct queries.

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

export_to_csvA

Export query results to a CSV file.

Args:
    query: SQL SELECT query to execute
    filename: Output filename (relative or absolute path)
    delimiter: Field delimiter (default: comma)

Returns:
    Dictionary with:
    - status: 'success' or error
    - path: Absolute path to created file
    - row_count: Number of rows exported
    - file_size: Size of created file in bytes
ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes
filenameYes
delimiterNo,

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.1/5.0
Behavior3/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 describes the action ('Export query results to a CSV file') and return values, but lacks details on permissions, side effects, error handling, or performance implications. It adds basic context but doesn't fully compensate for the absence of annotations.

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 well-structured and front-loaded, starting with the core purpose followed by organized sections for arguments and returns. Each sentence adds value without redundancy, making it efficient and easy to parse. The bulleted lists enhance readability without unnecessary verbosity.

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 (3 parameters, no annotations, but with an output schema), the description is largely complete. It covers the purpose, parameters, and return values, with the output schema handling return details. However, it lacks behavioral context like error cases or constraints, leaving minor gaps in completeness.

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

Parameters5/5

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

The description adds significant meaning beyond the input schema, which has 0% description coverage. It explains each parameter's purpose: 'query' as an SQL SELECT query, 'filename' as the output path, and 'delimiter' as the field delimiter with a default. This compensates fully for the schema's lack of descriptions, providing clear semantics for all parameters.

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 tool's purpose with a specific verb ('Export') and resource ('query results to a CSV file'), distinguishing it from siblings like 'export_to_json' and 'execute_query' which handle different formats or operations. It precisely communicates what the tool does without ambiguity.

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 by specifying 'SQL SELECT query to execute', suggesting it's for exporting query results, but it doesn't explicitly state when to use this tool versus alternatives like 'export_to_json' or 'execute_query'. No guidance is provided on prerequisites, exclusions, or specific contexts, leaving usage somewhat open to interpretation.

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

export_to_jsonA

Export query results to a JSON file.

Args:
    query: SQL SELECT query to execute
    filename: Output filename (relative or absolute path)

Returns:
    Dictionary with:
    - status: 'success' or error
    - path: Absolute path to created file
    - row_count: Number of rows exported
    - file_size: Size of created file in bytes
ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes
filenameYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.4/5.0
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 effectively describes key behaviors: it creates a file (implied mutation/write operation), specifies the output format (JSON), and details the return structure. It doesn't mention permissions, rate limits, or error handling beyond status, but covers core functionality well.

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 well-structured and front-loaded with the core purpose in the first sentence, followed by organized sections for Args and Returns. Every sentence adds value without redundancy, making it efficient and easy to parse.

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

Completeness5/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 (2 parameters, no annotations, but with an output schema), the description is complete enough. It explains the purpose, parameters, and return values in detail. Since an output schema exists, the description doesn't need to redundantly explain return values, and it adequately covers the tool's scope and behavior.

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

Parameters5/5

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

The schema description coverage is 0%, so the description must compensate fully. It adds significant meaning beyond the basic schema by explaining that 'query' is an 'SQL SELECT query to execute' and 'filename' is the 'Output filename (relative or absolute path)', clarifying usage and context that the schema alone lacks.

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 ('Export query results to a JSON file') with the resource ('query results'), distinguishing it from siblings like export_to_csv (different format) and execute_query (no file output). It precisely defines the tool's function without ambiguity.

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 through the mention of 'SQL SELECT query' and 'query results', suggesting it's for exporting data from database queries. However, it lacks explicit guidance on when to use this tool versus alternatives like export_to_csv or execute_query, nor does it mention prerequisites or exclusions.

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

insert_rowA

Insert a new row into a table.

Args:
    table: Table name (can include schema: 'dbo.Users' or 'Users')
    data: Dictionary of column names and values to insert

Returns:
    Dictionary with:
    - status: 'success' or error
    - table: Full table name
    - inserted: The inserted row (including generated identity columns)
ParametersJSON Schema
NameRequiredDescriptionDefault
tableYes
dataYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.6/5.0
Behavior3/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 implies a write operation ('Insert') and describes the return structure, which is helpful. However, it doesn't cover critical aspects like permissions needed, error handling details, transactional behavior, or side effects (e.g., triggers), leaving gaps in transparency for a mutation tool.

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?

The description is well-structured with clear sections (Args, Returns) and uses bullet points for readability. It's concise with no wasted sentences, though the 'Returns' section could be slightly more detailed (e.g., explaining error cases). Overall, it's efficiently presented and front-loaded with the core purpose.

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 complexity (a mutation with 2 parameters), no annotations, and an output schema that documents the return structure, the description is reasonably complete. It covers the purpose, parameter semantics, and return values, though it could improve by adding usage guidelines and more behavioral context (e.g., permissions). The output schema reduces the need to explain returns in detail.

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

Parameters5/5

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

The description adds significant meaning beyond the input schema, which has 0% description coverage. It explains that 'table' can include schema (e.g., 'dbo.Users') and that 'data' is a dictionary of column-value pairs. This clarifies the semantics and format of both parameters, fully compensating for the lack of schema descriptions.

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: 'Insert a new row into a table.' It specifies the verb ('Insert') and resource ('row into a table'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'update_row' or 'delete_row' beyond the basic action, 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 'update_row' or 'execute_query'. It lacks context about prerequisites (e.g., needing a connection or specific database), exclusions, or comparisons with sibling tools, leaving the agent to infer usage based on 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.

list_connectionsA

List all active database connections.

Returns:
    List of active connections with their details (name, host, database,
    connection time, and active status).
ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses that this is a read operation (implied by 'List') and describes the return format, which is helpful. However, it doesn't mention behavioral aspects like rate limits, authentication needs, or whether it requires an active session, leaving 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 efficiently structured in two sentences: one stating the purpose and another detailing the return format. Every sentence adds value without redundancy, making it front-loaded and easy to parse.

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 simplicity (0 parameters, no annotations, but with an output schema), the description is reasonably complete. It explains what the tool does and what it returns, though it could benefit from more behavioral context (e.g., permissions or session requirements) to fully compensate for the lack of annotations.

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 tool has 0 parameters with 100% schema description coverage, so the schema already fully documents this. The description doesn't need to add parameter details, and it doesn't introduce any confusion, earning a baseline score above 3 for compensating with clarity in other areas.

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 ('List') and resource ('all active database connections'), making the purpose immediately understandable. However, it doesn't explicitly differentiate this from sibling tools like 'list_databases' or 'list_tables' beyond the resource type, 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 'list_databases' or 'connect'. It doesn't mention prerequisites (e.g., needing an active connection first) or exclusions, leaving the agent to infer usage from context alone.

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

list_databasesA

List all available databases on the SQL Server.

Queries sys.databases to discover accessible databases. System databases
(master, tempdb, model, msdb) are excluded by default. Databases in the
blocklist (MSSQL_BLOCKED_DATABASES) are always excluded.

Args:
    include_system: If True, include system databases in the list

Returns:
    Dictionary with:
    - databases: List of available database names
    - current_database: The currently active database
    - count: Number of databases returned
    - blocked_count: Number of databases hidden due to blocklist
ParametersJSON Schema
NameRequiredDescriptionDefault
include_systemNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by disclosing key behaviors: it queries sys.databases, excludes system databases by default, respects a blocklist, and returns structured data. It doesn't mention authentication needs, rate limits, or whether it's read-only (though implied), leaving some gaps.

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 well-structured and front-loaded with the core purpose, followed by implementation details, parameter explanation, and return format. Every sentence adds value without redundancy, making it efficient and easy to parse.

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

Completeness5/5

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

Given the tool's low complexity (1 parameter), no annotations, and the presence of an output schema that documents return values, the description is complete. It covers purpose, behavior, parameter semantics, and output structure adequately without needing to explain return values in detail.

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

Parameters5/5

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

The description adds significant meaning beyond the input schema, which has 0% description coverage. It explains the include_system parameter's effect ('include system databases in the list'), compensating fully for the schema's lack of documentation and providing clear usage context.

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 ('List all available databases') and resource ('on the SQL Server'), distinguishing it from siblings like list_tables or list_stored_procs. It provides precise scope details about system databases and blocklist exclusions.

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

Usage Guidelines4/5

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

The description implies usage context by specifying what databases are excluded and when to use the include_system parameter. However, it doesn't explicitly state when to choose this tool over alternatives like list_connections or describe_table, nor does it mention prerequisites like requiring an active connection.

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

list_stored_procsA

List available stored procedures in the database.

Args:
    schema: Filter by schema name (e.g., 'dbo')
    pattern: Filter by name pattern using SQL LIKE syntax (e.g., 'sp_%', '%User%')

Returns:
    Dictionary with:
    - procedures: List of procedure info (schema, name, created, modified)
    - count: Number of procedures found
ParametersJSON Schema
NameRequiredDescriptionDefault
schemaNo
patternNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.1/5.0
Behavior3/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 effectively describes the tool as a read-only listing operation (implied by 'List'), specifies filtering capabilities, and details the return structure. However, it misses behavioral aspects like potential performance impacts, authentication requirements, or error handling. It adds value beyond the schema but doesn't fully cover all behavioral traits.

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 appropriately sized and well-structured, with a clear purpose statement followed by dedicated 'Args' and 'Returns' sections. Each sentence earns its place by providing essential information without redundancy. It is front-loaded with the main purpose and efficiently organized for quick comprehension.

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 (2 parameters, no annotations, but with an output schema), the description is largely complete. It covers the purpose, parameters, and return values in detail. The output schema existence means the description doesn't need to explain return values, which it does anyway, adding clarity. However, it could improve by addressing usage context relative to siblings or behavioral nuances like error cases.

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

Parameters5/5

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

The schema description coverage is 0%, so the description must compensate fully. It does this excellently by explaining both parameters ('schema' and 'pattern') with clear semantics, examples (e.g., 'dbo', 'sp_%'), and usage context (filtering by schema name and SQL LIKE syntax). This adds significant meaning beyond the bare schema, making the parameters understandable and actionable.

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 tool's purpose with a specific verb ('List') and resource ('available stored procedures in the database'). It distinguishes itself from siblings like 'describe_stored_proc' (which provides details on a specific procedure) and 'list_tables' (which lists tables instead of procedures). The description is precise and unambiguous about what the tool does.

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 through the parameter explanations (e.g., filtering by schema or pattern), but it does not explicitly state when to use this tool versus alternatives. For example, it doesn't clarify if this should be used before 'describe_stored_proc' or how it differs from 'list_tables' in terms of database object types. The guidance is functional but lacks explicit context or exclusions.

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

list_tablesA

List all tables and views in the database.

Args:
    schema: Filter by schema name (e.g., 'dbo'). If not specified, returns all schemas.
    include_views: Include views in results (default: True)
    pattern: Filter by name pattern using SQL LIKE syntax (e.g., 'Cust%', '%Order%')

Returns:
    Dictionary with:
    - tables: List of table/view info (schema, name, type)
    - count: Number of results
ParametersJSON Schema
NameRequiredDescriptionDefault
schemaNo
include_viewsNo
patternNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.4/5.0
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. It effectively discloses that this is a read operation (listing), describes filtering behavior, and specifies the return format. However, it doesn't mention potential limitations like pagination, rate limits, or authentication requirements.

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?

Perfectly structured with a clear purpose statement followed by organized sections for Args and Returns. Every sentence earns its place, providing essential information without redundancy. The description is appropriately sized and front-loaded.

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

Completeness5/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, no annotations, and the presence of an output schema, the description is complete. It explains what the tool does, documents all parameters thoroughly, and references the return structure, making it fully adequate for agent understanding.

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

Parameters5/5

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

The schema has 0% description coverage, so the description fully compensates by explaining all three parameters with clear semantics, examples, and default values. It adds significant value beyond the bare schema, making parameter usage understandable.

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 ('List all tables and views') and resource ('in the database'), distinguishing it from siblings like list_databases, list_stored_procs, or describe_table. It precisely defines the scope of what is being listed.

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 retrieving database objects, but provides no explicit guidance on when to use this tool versus alternatives like list_databases or describe_table. It mentions filtering capabilities but doesn't contrast with other listing tools.

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

read_rowsA

Read rows from a table by primary key or filter.

Provide one of: id (single row), ids (multiple rows), or filter (WHERE clause).

Args:
    table: Table name (can include schema: 'dbo.Users' or 'Users')
    id: Single primary key value (for composite keys, use filter)
    ids: List of primary key values
    filter: WHERE clause without 'WHERE' keyword (e.g., "status = 'active'")
    columns: List of columns to return (default: all columns)
    max_rows: Maximum rows to return

Returns:
    Dictionary with:
    - table: Full table name
    - rows: List of row dictionaries
    - count: Number of rows returned
ParametersJSON Schema
NameRequiredDescriptionDefault
tableYes
idNo
idsNo
filterNo
columnsNo
max_rowsNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.6/5.0
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. It effectively discloses key behaviors: it's a read operation (implied by 'read'), supports multiple query methods, returns a dictionary structure with table name, rows, and count, and includes a max_rows limit for result control. It doesn't mention permissions, rate limits, or error handling, but covers core functionality well.

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 well-structured and front-loaded: the first sentence states the purpose, followed by parameter guidance, a detailed Args section, and a Returns section. Every sentence adds value—no fluff. It efficiently covers complex functionality in a compact format.

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

Completeness5/5

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

Given the tool's complexity (6 parameters, read operation), no annotations, and an output schema provided, the description is complete. It explains all parameters thoroughly, details the return structure, and provides usage examples. The output schema likely defines the return dictionary, so the description doesn't need to duplicate that, focusing instead on practical guidance.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate fully. It does so excellently: it explains each parameter's purpose (e.g., 'table: Table name', 'filter: WHERE clause without WHERE keyword'), provides examples ('dbo.Users', "status = 'active'"), clarifies defaults ('columns: default: all columns'), and notes constraints ('for composite keys, use filter'). This adds substantial meaning beyond the bare schema.

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 tool's purpose: 'Read rows from a table by primary key or filter.' It specifies the verb ('read'), resource ('rows from a table'), and mechanism ('by primary key or filter'), distinguishing it from siblings like execute_query (general queries) or describe_table (metadata).

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

Usage Guidelines4/5

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

The description provides clear usage guidance: 'Provide one of: id (single row), ids (multiple rows), or filter (WHERE clause).' This helps the agent choose between parameters. However, it doesn't explicitly contrast with alternatives like execute_query for complex queries or list_tables for metadata, leaving some sibling differentiation implicit.

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

switch_databaseA

Switch the active database context.

Changes the current database using the USE statement. The database must
exist, be online, and not be in the blocklist (MSSQL_BLOCKED_DATABASES).

Args:
    database_name: Name of the database to switch to

Returns:
    Dictionary with:
    - status: "switched" on success, "error" on failure
    - database: The new active database name
    - previous_database: The previously active database
    - error: Error message if switch failed
ParametersJSON Schema
NameRequiredDescriptionDefault
database_nameYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by disclosing behavioral traits: it explains the action ('Changes the current database using the USE statement'), constraints (existence, online status, blocklist), and response structure. However, it lacks details on permissions, rate limits, or side effects on other tools.

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 appropriately sized and front-loaded: the first sentence states the purpose, followed by key constraints, then structured Args and Returns sections. Every sentence adds value without redundancy.

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

Completeness5/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 (1 parameter, no annotations, but with output schema), the description is complete: it covers purpose, usage, constraints, parameters, and return values. The output schema exists, so the description needn't explain return values beyond what's provided, and it adequately addresses the context.

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?

Schema description coverage is 0%, so the description must compensate. It adds meaning by explaining 'database_name' as 'Name of the database to switch to' and detailing constraints in the main text, though it could specify format (e.g., case sensitivity) or examples.

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 tool's purpose with specific verb ('switch') and resource ('active database context'), and distinguishes it from siblings like 'connect', 'disconnect', or 'list_databases' by focusing on context switching rather than connection management or listing.

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool ('switch the active database context') and includes prerequisites ('database must exist, be online, and not be in the blocklist'), but does not explicitly mention when not to use it or name specific alternatives among siblings.

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

update_rowA

Update an existing row by primary key.

Args:
    table: Table name (can include schema: 'dbo.Users' or 'Users')
    id: Primary key value of the row to update
    data: Dictionary of column names and new values

Returns:
    Dictionary with:
    - status: 'success' or error
    - table: Full table name
    - updated: The updated row
ParametersJSON Schema
NameRequiredDescriptionDefault
tableYes
idYes
dataYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.7/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 covers basic operation. It doesn't disclose critical behavioral traits like required permissions, whether updates are atomic/reversible, error handling beyond status codes, or constraints (e.g., data validation, triggers). The return format is described, but mutation risks and side effects are omitted.

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 efficiently structured with a clear purpose statement followed by organized sections for Args and Returns. Each sentence adds value: the first defines the operation, subsequent lines explain parameters, and the last details output. No redundant or verbose content.

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?

For a mutation tool with 3 parameters, 0% schema coverage, no annotations, but an output schema, the description is partially complete. It covers parameters and return structure adequately, but lacks context on safety, error conditions, and operational constraints, leaving gaps for an agent to use it correctly in complex scenarios.

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?

Schema description coverage is 0%, but the description adds meaningful context: 'table' can include schema prefixes, 'id' is the primary key value, and 'data' is a dictionary of column-value pairs. This clarifies parameter roles beyond schema types, though it doesn't detail data format constraints or id type expectations.

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 ('Update an existing row'), target resource ('by primary key'), and distinguishes from siblings like 'insert_row' (creates new) and 'delete_row' (removes). It uses precise terminology that differentiates its function within the database operation toolset.

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 modifying existing rows identified by primary key, but doesn't explicitly state when to use this vs. alternatives like 'insert_row' for new rows or 'execute_query' for complex updates. No guidance on prerequisites (e.g., connection state) or exclusions is provided.

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

validate_queryA

Check if a query is safe to execute without running it.

Validates the query against:
- Statement type (SELECT, INSERT, UPDATE, DELETE, DDL, EXEC)
- Blocked commands list
- Read-only mode compliance
- Potential issues (missing WHERE clause, unbounded SELECT)

Args:
    query: SQL statement to validate

Returns:
    Dictionary with:
    - query: The original query
    - valid: Whether the query is valid
    - statement_type: Type of SQL statement
    - warnings: List of warning messages
    - suggestions: List of suggested improvements
    - error: Error message if invalid
ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.8/5.0
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 effectively describes what the tool does (validates queries against specific criteria like statement types and blocked commands) and outlines the return structure. However, it doesn't mention potential limitations such as rate limits, authentication needs, or system-specific constraints, leaving some behavioral aspects uncovered.

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 well-structured and front-loaded, starting with a clear purpose statement followed by bullet points for validation criteria and structured sections for args and returns. Every sentence adds value without redundancy, making it efficient and easy to parse for an AI agent.

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

Completeness5/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 with multiple criteria), no annotations, and an output schema that details the return structure, the description is complete enough. It covers the purpose, usage, validation aspects, parameter semantics, and return values, providing all necessary context for effective tool selection and invocation.

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

Parameters5/5

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

The description adds significant meaning beyond the input schema, which has 0% description coverage. It explains that the 'query' parameter is an 'SQL statement to validate', clarifying its purpose and format. This compensates fully for the schema's lack of documentation, providing essential context for the single parameter.

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 tool's purpose with a specific verb ('check if a query is safe to execute') and resource ('a query'), distinguishing it from siblings like execute_query (which runs queries) and other database tools. It explicitly differentiates by stating 'without running it', making the distinction 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 provides explicit guidance on when to use this tool: to validate SQL queries for safety before execution. It implies an alternative (execute_query for actual execution) and specifies use cases like checking statement types, blocked commands, and compliance issues, making it clear this is for pre-execution validation rather than running queries.

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

TDQS

A4.2/5.0
Disambiguation5/5

Every tool has a clearly distinct purpose with no ambiguity. For example, call_stored_proc is for executing procedures while describe_stored_proc is for inspecting them, and read_rows is for reading data while execute_query is for running SELECT queries. The tools cover different aspects of SQL Server interaction without overlap.

Naming Consistency5/5

All tools follow a consistent verb_noun naming pattern throughout. Examples include describe_table, list_tables, insert_row, update_row, and export_to_csv. The naming is predictable and follows the same convention across all 18 tools.

Tool Count4/5

With 18 tools, the count is slightly high but reasonable for a comprehensive SQL Server interface. The tools cover connection management, CRUD operations, stored procedures, metadata inspection, and data export, which justifies the number. It's well-scoped but could potentially be streamlined.

Completeness5/5

The tool surface provides complete coverage for SQL Server interaction. It includes connection management (connect, disconnect, list_connections), database operations (list_databases, switch_database), table operations (full CRUD with insert_row, read_rows, update_row, delete_row), stored procedure handling, metadata inspection, query execution, validation, and data export. No obvious gaps exist for the domain.

Maintenance

ActivityInactive
ResponsivenessSyncing

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
    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
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to interact with Microsoft SQL Server databases through a standardized interface. Supports executing SQL queries, browsing database schemas, and viewing table data with flexible authentication options for both local and Azure SQL databases.
    5
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Enables AI models to interact with MS SQL Server databases through a standardized interface. Supports executing SQL queries with parameters, listing tables, and describing table schemas.
    3
    222
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to interact with Microsoft SQL Server databases via introspection and query tools. Supports single or multiple databases with read-only mode by default and an optional write capability.
    408
    4
    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/bpamiri/pymssql-mcp'

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