SQL Server MCP
The SQL Server MCP server enables AI assistants like Claude to interact with Microsoft SQL Server databases through natural language and a standardized protocol.
Connection Management: Connect to and disconnect from databases, list active connections, list available databases (including system databases), and switch between database contexts.
Data Querying & Reading: Execute read-only SQL SELECT queries with automatic row limits, read rows by primary key, multiple IDs, or custom filters, validate query safety, and select specific or all columns from tables.
CRUD Operations: Insert new rows with automatic identity column handling, update existing rows by primary key, delete rows by primary key, and use schema-qualified table names.
Schema Exploration: List tables and views with optional schema and pattern filtering, examine columns, data types, nullability, primary/foreign key relationships, and indexes.
Stored Procedure Management: List available stored procedures with filtering, describe parameters (name, type, direction), execute procedures with input parameters, and retrieve multiple result sets.
Data Export: Export query results to JSON or CSV files with custom delimiters, and get file metadata including path, row count, and file size.
Transaction Control: Begin, commit, and roll back database transactions.
Safety & Security Features: Read-only mode, command blocking for dangerous SQL operations (DROP, TRUNCATE, etc.), maximum row limits, query validation with warnings and suggestions, schema restrictions, database blocklists, and parameterized queries to prevent SQL injection.
AI Integration Features: Knowledge persistence to save and retrieve learned information about the database, search saved knowledge for context-aware interactions, natural language query support, and automatic connection recovery with watchdog functionality.
Deployment Options: Run locally with Claude Desktop, as HTTP server, or with OAuth for Claude.ai integration.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@SQL Server MCPshow me the top 5 customers by total purchases"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.
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 |
Understanding MCP and pymssql-mcp | |
Complete installation guide | |
Get running in 10 minutes | |
All configuration options | |
Detailed tool documentation | |
Common usage patterns | |
Claude.ai integration with SSO |
Quick Start
1. Install
pip install pymssql-mcp2. 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 to the database |
| Close all connections |
| List available databases |
| Switch database context |
Queries & Schema
Tool | Description |
| Run a SELECT query |
| Check if a query is safe |
| List tables and views |
| Get column information |
CRUD Operations
Tool | Description |
| Read rows by ID or filter |
| Insert a new row |
| Update an existing row |
| Delete a row |
Stored Procedures
Tool | Description |
| List available procedures |
| Get procedure parameters |
| Execute a procedure |
Export & Transactions
Tool | Description |
| Export results to JSON |
| Export results to CSV |
| Start a transaction |
| Commit changes |
| Rollback changes |
Knowledge Persistence
Tool | Description |
| Save learned information |
| Retrieve all knowledge |
| Search saved knowledge |
Configuration
Required Variables
Variable | Description |
| SQL Server hostname |
| Database username |
| Database password |
| Database name |
Safety Settings
Variable | Default | Description |
|
| Block all write operations |
|
| Maximum rows per query |
|
| Commands to block |
| (all) | Restrict to specific schemas |
| (none) | Hide specific databases |
See Configuration Reference for all options.
Deployment Modes
Local (Default)
Run as a local process with Claude Desktop:
pymssql-mcpHTTP/SSE Server
Run as a shared HTTP server for multiple users:
pymssql-mcp --http --host 0.0.0.0 --port 8080Streamable HTTP (Claude.ai Integration)
Run with OAuth authentication for Claude.ai:
pymssql-mcp --streamable-http --host 0.0.0.0 --port 8080See 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.
Links
Available Tools
18 toolscall_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
| Name | Required | Description | Default |
|---|---|---|---|
| procedure | Yes | ||
| params | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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)
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | ||
| id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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.)
| Name | Required | Description | Default |
|---|---|---|---|
| procedure | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| max_rows | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| filename | Yes | ||
| delimiter | No | , |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| filename | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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)
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | ||
| data | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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).
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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
| Name | Required | Description | Default |
|---|---|---|---|
| include_system | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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
| Name | Required | Description | Default |
|---|---|---|---|
| schema | No | ||
| pattern | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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
| Name | Required | Description | Default |
|---|---|---|---|
| schema | No | ||
| include_views | No | ||
| pattern | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | ||
| id | No | ||
| ids | No | ||
| filter | No | ||
| columns | No | ||
| max_rows | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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
| Name | Required | Description | Default |
|---|---|---|---|
| database_name | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | ||
| id | Yes | ||
| data | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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
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.
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.
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.
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
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
Safe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.
The all-in-one data stack for agents. Upload files, run SQL, evolve tables, and render charts.
Query PostgreSQL databases in plain English — LLM-generated, safety-validated SQL.
Ask data questions in natural language. Get SQL, insights, and charts from your databases.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables 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.1MIT
- AlicenseNot gradedqualityDmaintenanceEnables 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.5MIT
- AlicenseAqualityDmaintenanceEnables 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.3222MIT
- AlicenseNot gradedqualityDmaintenanceEnables 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.4084MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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