Skip to main content
Glama
Cyronius

claude-database-tools

by Cyronius

claude-database-tools

SQL Server CLI and MCP server for Claude Code.

Why This Tool?

This project is an alternative to Microsoft's official mssql MCP server with some key advantages:

  • SQL Server Authentication: Supports SQL Server authentication (username/password), not just Windows/Entra authentication. Ideal for development environments, Docker containers, or scenarios where integrated auth isn't available.

  • CLI-First Design: The CLI tools can be used directly from a Claude Code skill, giving you database access without requiring MCP server setup. This is useful when you want simpler configuration or need to work in environments where MCP servers are problematic.

  • MCP Server Included: Also provides an MCP server if you prefer that integration approach.

Related MCP server: SQL Server MCP

Features

  • CLI Tool: Command-line interface for SQL Server operations

  • MCP Server: Model Context Protocol server for Claude integration (experimental)

  • Security: Built-in SQL injection prevention and query validation

  • Operations: List tables, describe schemas, query data, insert/update/delete records, DDL generation

Installation

git clone https://github.com/cyronius/claude-database-tools.git
cd claude-database-tools
npm install
npm run build

Configuration

Copy .env.example to .env and configure your database connection:

cp .env.example .env

Edit .env with your SQL Server credentials:

SQL_SERVER=localhost
SQL_DATABASE=your_database
SQL_USER=your_username
SQL_PASSWORD=your_password
SQL_PORT=1433
SQL_ENCRYPT=false
SQL_TRUST_SERVER_CERTIFICATE=true

CLI Usage

After building, run commands with:

node dist/cli/index.js <command> [options]

Or install globally:

npm install -g .
sql-cli <command> [options]

Commands

Command

Description

list-tables [schemas...]

List tables, optionally filtered by schema

describe-table <tableName>

Get table schema (columns, indexes, foreign keys)

read-data <query>

Execute a SELECT query

insert-data <tableName> <jsonData>

Insert records

update-data <tableName> <updates> <whereClause>

Update records

delete-data <tableName> <whereClause> --confirm

Delete records

exec-proc <procedureName> [params]

Execute stored procedure

create-table <tableName> <columns>

Create a new table

drop-table <tableName>

Drop a table

create-index <tableName> <indexName> <columns>

Create an index

get-ddl <tableName>

Generate CREATE TABLE DDL

get-alter-ddl <tableName>

Generate ALTER TABLE DDL

Examples

# List all tables
sql-cli list-tables

# List tables in specific schemas
sql-cli list-tables dbo sales

# Describe a table
sql-cli describe-table dbo.Users

# Query data
sql-cli read-data "SELECT TOP 10 * FROM dbo.Users"

# Insert data
sql-cli insert-data dbo.Users '{"name": "John", "email": "john@example.com"}'

# Update data
sql-cli update-data dbo.Users '{"name": "Jane"}' "id = 1"

# Delete data (requires --confirm flag)
sql-cli delete-data dbo.Users "id = 1" --confirm

# Get table DDL
sql-cli get-ddl dbo.Users

MCP Server (Experimental)

Note: The MCP server integration has not been fully tested. Use at your own risk.

The MCP server allows Claude Code to interact with your SQL Server database directly.

Setup

Add to your ~/.claude/mcp.json:

{
  "mcpServers": {
    "mssql": {
      "command": "node",
      "args": ["/path/to/claude-database-tools/dist/index.js"],
      "env": {
        "SQL_SERVER": "your-server",
        "SQL_DATABASE": "your-database",
        "SQL_USER": "your-username",
        "SQL_PASSWORD": "your-password",
        "SQL_ENCRYPT": "true",
        "READONLY": "true"
      }
    }
  }
}

Restart Claude Code to load the MCP server.

Available MCP Tools

Read-Only (available when READONLY=true):

  • list_tables - List tables

  • describe_table - Get table schema

  • read_data - Execute SELECT queries

  • get_table_ddl - Generate CREATE TABLE DDL

  • get_table_alter_ddl - Generate ALTER TABLE DDL

Write (requires READONLY=false):

  • insert_data - Insert records

  • update_data - Update records

  • delete_data - Delete records

  • create_table - Create tables

  • create_index - Create indexes

  • drop_table - Drop tables

  • execute_stored_proc - Execute stored procedures

Security

  • SQL Injection Prevention: SELECT queries are validated against dangerous keywords and patterns

  • Parameterized Queries: All INSERT/UPDATE/DELETE operations use parameterized queries

  • WHERE Clause Required: UPDATE and DELETE operations require WHERE clauses

  • Query Limits: Maximum query length of 10,000 characters, result sets limited to 10,000 records

  • Read-Only Mode: Set READONLY=true to disable write operations

License

MIT

Available Tools

12 tools
create_indexC

Creates an index on a specified column or columns in an MSSQL Database table

ParametersJSON Schema
NameRequiredDescriptionDefault
tableNameYesName of the table to create index on (can include schema: schema.table)
indexNameYesName for the new index
columnsYesArray of column names to include in the index
isUniqueNoWhether the index should enforce uniqueness (default: false)
isClusteredNoWhether the index should be clustered (default: false)

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. While 'creates an index' implies a schema mutation operation, the description doesn't address critical behavioral aspects: whether this requires specific database permissions, whether the operation is reversible, potential performance impacts during creation, or what happens if the index already exists. For a database mutation tool with zero annotation coverage, this represents significant 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 a single, efficient sentence that clearly states the tool's purpose without unnecessary words. It's appropriately sized for a straightforward database operation and front-loads the essential information. Every word earns its place in conveying the core functionality.

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

Completeness2/5

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

For a database schema mutation tool with 5 parameters, no annotations, and no output schema, the description is insufficiently complete. It doesn't address behavioral implications, error conditions, performance considerations, or relationship to sibling tools. The agent would need to make assumptions about permissions, side effects, and appropriate usage contexts that aren't documented.

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

Parameters3/5

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

The description mentions 'on a specified column or columns' which aligns with the 'columns' parameter, but doesn't add meaningful semantics beyond what the 100% schema coverage already provides. The schema descriptions comprehensively document each parameter's purpose, defaults, and requirements, so the description adds minimal value. The baseline score of 3 reflects adequate but not enhanced parameter understanding.

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

Purpose4/5

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

The description clearly states the action ('creates an index') and target ('on a specified column or columns in an MSSQL Database table'), providing a specific verb+resource combination. However, it doesn't distinguish this tool from potential alternatives like 'create_table' or 'get_table_alter_ddl' which might also involve database schema modifications.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. With sibling tools like 'create_table', 'drop_table', and 'get_table_alter_ddl' available, there's no indication of when index creation is appropriate versus other schema operations or how it relates to data manipulation tools like 'insert_data' or 'update_data'.

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

create_tableC

Creates a new table in the MSSQL Database with the specified columns.

ParametersJSON Schema
NameRequiredDescriptionDefault
tableNameYesName of the table to create
columnsYesArray of column definitions (e.g., [{ name: 'id', type: 'INT PRIMARY KEY' }, ...])

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states the tool creates a table but doesn't disclose critical behavioral traits: whether it requires specific permissions, if it's idempotent (e.g., fails if table exists), what happens on success/failure, or any side effects (e.g., locking). This is a significant gap 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste. It's front-loaded with the core action and resource, making it easy to scan and understand quickly without unnecessary elaboration.

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

Completeness2/5

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

Given this is a mutation tool (creates a table) with no annotations and no output schema, the description is incomplete. It lacks information on permissions, error handling, return values, or how it differs from siblings like 'get_table_alter_ddl'. For a tool that modifies database state, more context is needed.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema fully documents both parameters (tableName and columns). The description adds no additional meaning beyond implying column definitions are specified, which is already clear from the schema. Baseline 3 is appropriate when the schema does the heavy lifting.

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

Purpose4/5

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

The description clearly states the action ('Creates') and resource ('new table in the MSSQL Database'), making the purpose immediately understandable. It distinguishes from siblings like 'list_tables' or 'drop_table' by specifying creation, though it doesn't explicitly contrast with similar tools like 'get_table_ddl' or 'describe_table'.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., database permissions), when to choose this over other table-related tools like 'get_table_ddl' for planning, or any constraints (e.g., table name uniqueness).

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

delete_dataA

Executes a physical DELETE operation on table records. WARNING: This database uses soft delete patterns (__deleted flag). Consider using update_data to set __deleted = 1 instead for most use cases.

ParametersJSON Schema
NameRequiredDescriptionDefault
tableNameYesName of the table to delete from
whereClauseYesWHERE clause to identify which records to delete. REQUIRED for safety.
confirmDeleteYesMust be set to true to confirm physical deletion. Physical deletes are permanent and bypass the soft delete pattern.

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 full burden and does so effectively: it discloses that this is a physical DELETE (implying permanent, destructive operation), mentions the database's soft delete pattern, and warns about permanence. It doesn't cover rate limits or auth needs, but provides substantial 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 concise with two sentences that each earn their place: the first states the core operation, the second provides critical warnings and alternatives. No wasted words, front-loaded with essential information.

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?

For a destructive tool with no annotations and no output schema, the description provides excellent context about the permanent nature of the operation and the soft delete alternative. It could mention what happens on success/failure or return values, but given the warnings and alternatives provided, it's largely complete.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all three parameters thoroughly. The description adds no additional parameter information beyond what's in the schema, meeting the baseline expectation for high schema coverage.

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 ('Executes a physical DELETE operation') and resource ('on table records'), distinguishing it from sibling tools like update_data. It explicitly contrasts with soft delete patterns, making the purpose unambiguous.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool versus alternatives: it warns that the database uses soft delete patterns and recommends using update_data instead for most cases. This directly addresses sibling tool selection.

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

describe_tableA

Describes the complete schema of a specified MSSQL Database table, including columns, types, constraints, indexes, and foreign keys.

ParametersJSON Schema
NameRequiredDescriptionDefault
tableNameYesName of the table to describe (can include schema: schema.table)

TDQS

A4/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-only metadata operation ('Describes') rather than a mutation, and specifies the scope of information returned. However, it doesn't mention potential limitations like permission requirements, performance considerations for large tables, or error conditions for non-existent tables.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficiently constructed sentence that front-loads the core purpose and follows with specific details about what information is returned. Every element serves a purpose with no wasted words or redundant information.

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?

For a single-parameter read operation with no output schema, the description provides good context about what information is returned. It could be more complete by mentioning the return format or any limitations, but it adequately covers the tool's purpose and scope given its simplicity and the absence of annotations.

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

Parameters3/5

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

Schema description coverage is 100% with the single parameter 'tableName' well-documented in the schema. The description doesn't add any parameter-specific information beyond what the schema already provides about table naming conventions. This meets the baseline expectation when schema coverage is complete.

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 ('Describes') and resource ('complete schema of a specified MSSQL Database table'), with explicit details about what information is included ('columns, types, constraints, indexes, and foreign keys'). It distinguishes this read-only metadata tool from sibling tools that perform data manipulation or DDL operations.

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 it describes 'MSSQL Database table' schemas, which helps differentiate it from generic table operations. However, it doesn't explicitly state when to use this versus alternatives like 'get_table_ddl' or 'list_tables', nor does it provide exclusion guidance for when other tools might be more appropriate.

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

drop_tableC

Drops a table from the MSSQL Database.

ParametersJSON Schema
NameRequiredDescriptionDefault
tableNameYesName of the table to drop

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('drops') which implies a destructive mutation, but doesn't clarify critical aspects like whether this is irreversible, what permissions are required, whether it cascades to dependent objects, or what happens on success/failure. For a high-risk operation like dropping a database table, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that communicates the core purpose without unnecessary words. It's appropriately sized for a tool with one parameter and no complex behavioral nuances to explain. Every word earns its place in this minimal description.

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

Completeness2/5

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

Given this is a destructive database operation with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what 'drops' entails (permanent deletion?), what happens to dependent objects, what permissions are needed, or what the tool returns. For such a high-stakes tool, more contextual information is warranted.

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

Parameters3/5

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

The schema description coverage is 100%, with the single parameter 'tableName' clearly documented in the schema. The description doesn't add any additional parameter information beyond what the schema provides (e.g., format requirements, case sensitivity, or examples). This meets the baseline expectation when schema coverage is complete.

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

Purpose4/5

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

The description clearly states the action ('drops') and resource ('a table from the MSSQL Database'), making the purpose immediately understandable. It distinguishes from siblings like 'delete_data' (which removes rows) and 'create_table' (which creates tables). However, it doesn't specify whether this is a permanent deletion or if it can be undone, 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. It doesn't mention prerequisites (e.g., needing admin permissions), when not to use it (e.g., for temporary removal), or direct alternatives like 'delete_data' for removing rows instead of entire tables. This leaves the agent with minimal context for decision-making.

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

execute_stored_procC

Executes a stored procedure with optional parameters. Supports input parameters and returns result sets, output parameters, and return values.

ParametersJSON Schema
NameRequiredDescriptionDefault
procedureNameYesName of the stored procedure to execute (can include schema: schema.procname)
parametersNoObject with parameter name/value pairs. Example: { 'accountId': '123', 'groupId': '456' }

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations provided, the description carries full burden but only states basic functionality. It doesn't disclose critical behavioral traits like authentication needs, error handling, transaction behavior, or rate limits, which are essential for a database execution tool. No contradiction exists, but the disclosure is minimal.

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 a single, efficient sentence that front-loads the core action and key features. It avoids unnecessary words, though it could be slightly more structured by separating usage notes from functionality.

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

Completeness2/5

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

Given the complexity of executing stored procedures (with potential side effects, security implications, and varied outputs) and no annotations or output schema, the description is inadequate. It lacks details on return formats, error cases, or operational constraints, leaving significant gaps for an AI agent.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents both parameters thoroughly. The description adds minimal value by mentioning 'optional parameters' and 'input parameters', but doesn't provide additional syntax or format details beyond what the schema specifies, such as parameter types or constraints.

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

Purpose4/5

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

The description clearly states the action ('Executes') and resource ('a stored procedure'), specifying it handles parameters and returns results. It distinguishes from siblings like create_table or read_data by focusing on procedure execution rather than table operations, though it doesn't explicitly contrast with them.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives like read_data or insert_data, nor does it mention prerequisites such as needing an existing stored procedure. The description implies usage for executing procedures 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.

get_table_alter_ddlB

Generates ALTER TABLE DDL statements to add columns and constraints from an existing table.

ParametersJSON Schema
NameRequiredDescriptionDefault
tableNameYesName of the table to generate ALTER DDL for (can include schema: schema.table)

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool generates DDL statements but doesn't clarify if this is a read-only operation, whether it requires specific database permissions, if it modifies the table (it likely doesn't, as it 'generates' statements), or what the output format is. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior and safety.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any fluff or redundancy. It is front-loaded with the key action ('Generates') and resource, making it easy to parse quickly. Every word earns its place, contributing to clarity.

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

Completeness3/5

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

Given the tool's moderate complexity (generating DDL statements), lack of annotations, and no output schema, the description is somewhat complete but has gaps. It explains what the tool does but misses behavioral details like output format or usage context. For a tool with no structured safety or output information, it should provide more guidance to be fully helpful.

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

Parameters3/5

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

The input schema has 100% description coverage, with the parameter 'tableName' well-documented in the schema itself. The description adds no additional semantic information about parameters beyond what the schema provides, such as examples or constraints. Since schema coverage is high, the baseline score of 3 is appropriate, as the schema does the heavy lifting.

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

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: 'Generates ALTER TABLE DDL statements to add columns and constraints from an existing table.' It specifies the verb ('Generates'), resource ('ALTER TABLE DDL statements'), and scope ('from an existing table'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'get_table_ddl' or 'describe_table', which might also involve table metadata, so it misses full sibling distinction.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, such as needing an existing table, or compare it to siblings like 'get_table_ddl' (which might generate full CREATE statements) or 'alter_table' (if such a tool existed). Without this context, users might struggle to choose the right tool for their needs.

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

get_table_ddlB

Generates CREATE TABLE DDL script for an existing table, including columns, constraints, and optionally indexes.

ParametersJSON Schema
NameRequiredDescriptionDefault
tableNameYesName of the table to generate DDL for (can include schema: schema.table)
includeIndexesNoInclude index definitions (default: true)
includeConstraintsNoInclude foreign key constraints (default: true)

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions generating a DDL script but doesn't specify whether this is a read-only operation (likely safe), what permissions are required, whether it affects database state, or what the output format looks like (e.g., plain text SQL). For a tool with no annotation coverage, this leaves significant gaps in understanding its behavior and safety.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose without unnecessary words. It directly states what the tool does and includes key optional features, making it easy to parse quickly. Every part of the sentence earns its place by adding relevant information.

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

Completeness3/5

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

Given the tool's moderate complexity (generating DDL scripts), lack of annotations, and no output schema, the description is somewhat incomplete. It covers the basic purpose but misses behavioral details like safety, permissions, and output format. However, it does hint at the scope (columns, constraints, indexes), which aligns with the parameters, making it minimally adequate but with clear gaps.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all three parameters thoroughly. The description adds minimal value beyond the schema by mentioning 'including columns, constraints, and optionally indexes,' which loosely maps to the parameters but doesn't provide additional syntax, format details, or examples. The baseline score of 3 is appropriate when the schema does the heavy lifting.

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: 'Generates CREATE TABLE DDL script for an existing table, including columns, constraints, and optionally indexes.' It specifies the verb ('Generates'), resource ('CREATE TABLE DDL script'), and scope ('for an existing table'). However, it doesn't explicitly differentiate from sibling tools like 'describe_table' or 'get_table_alter_ddl', which might have overlapping purposes.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose this over 'describe_table' (which might provide metadata without DDL) or 'get_table_alter_ddl' (which might generate ALTER statements). There's no context about prerequisites, such as requiring the table to exist, or exclusions for when not to use it.

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

insert_dataA

Inserts data into an MSSQL Database table. Supports both single record insertion and multiple record insertion using standard SQL INSERT with VALUES clause. FORMAT EXAMPLES: Single Record Insert: { "tableName": "Users", "data": { "name": "John Doe", "email": "john@example.com", "age": 30, "isActive": true, "createdDate": "2023-01-15" } } Multiple Records Insert: { "tableName": "Users", "data": [ { "name": "John Doe", "email": "john@example.com", "age": 30, "isActive": true, "createdDate": "2023-01-15" }, { "name": "Jane Smith", "email": "jane@example.com", "age": 25, "isActive": false, "createdDate": "2023-01-16" } ] } GENERATED SQL FORMAT:

  • Single: INSERT INTO table (col1, col2) VALUES (@param1, @param2)

  • Multiple: INSERT INTO table (col1, col2) VALUES (@param1, @param2), (@param3, @param4), ... IMPORTANT RULES:

  • For single record: Use a single object for the 'data' field

  • For multiple records: Use an array of objects for the 'data' field

  • All objects in array must have identical column names

  • Column names must match the actual database table columns exactly

  • Values should match the expected data types (string, number, boolean, date)

  • Use proper date format for date columns (YYYY-MM-DD or ISO format)

ParametersJSON Schema
NameRequiredDescriptionDefault
tableNameYesName of the table to insert data into
dataYes

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 does well by specifying the tool supports both single and multiple record insertion and provides important rules about data formatting and constraints. However, it doesn't mention critical behavioral aspects like transaction handling, error behavior, permission requirements, or whether the operation is idempotent - significant gaps for a database 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 (FORMAT EXAMPLES, GENERATED SQL FORMAT, IMPORTANT RULES) and front-loads the core purpose. While comprehensive, some information could be more concise - the examples are quite detailed and the rules section is lengthy. Every sentence adds value, but the overall length might benefit from tighter editing.

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 database mutation tool with no annotations and no output schema, the description does a good job covering the insertion mechanics and data formatting. However, it lacks critical context about what happens after insertion - whether it returns the inserted records, generated IDs, row counts, or error information. The absence of output information and permission/transaction context leaves significant gaps 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?

With only 50% schema description coverage (only 'tableName' has a description in the schema), the description compensates excellently. It provides comprehensive examples for both single and multiple record insertion, explains the 'data' parameter's dual nature, specifies format rules, and adds crucial semantic information about column name matching, data types, and date formatting that goes far beyond the minimal schema documentation.

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 'inserts data into an MSSQL Database table' with specific verbs ('inserts') and resources ('MSSQL Database table'). It distinguishes from siblings like 'update_data', 'delete_data', and 'read_data' by specifying insertion functionality. The mention of 'standard SQL INSERT with VALUES clause' further clarifies the technical approach.

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 about when to use this tool (for inserting data into tables) and implicitly distinguishes it from alternatives like 'update_data' for modifications or 'read_data' for queries. However, it doesn't explicitly state when NOT to use it or name specific alternative tools for related operations like bulk loading or upserts.

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

list_tablesC

Lists tables in an MSSQL Database, or list tables in specific schemas

ParametersJSON Schema
NameRequiredDescriptionDefault
schemasNoSchemas to filter by (optional)

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While it mentions the optional schema filtering, it doesn't describe what the tool returns (e.g., table names, counts, or metadata), whether it's paginated, if it requires specific permissions, or any performance considerations. For a read operation in a database context, this leaves significant gaps in understanding how the tool behaves.

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 a single, efficient sentence that front-loads the core purpose ('Lists tables in an MSSQL Database') and adds the optional filtering detail. There's no wasted verbiage or redundancy. However, it could be slightly improved by structuring it as two sentences for better readability (e.g., separating the base action from the filtering option).

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete for a database tool. It doesn't explain what information is returned (e.g., table names, schemas, row counts), how results are formatted, or any constraints (e.g., permission requirements, database connection details). For a tool that interacts with MSSQL, more context is needed to use it effectively without trial and error.

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

Parameters3/5

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

The input schema has 100% description coverage, with the 'schemas' parameter clearly documented as optional for filtering. The description adds marginal value by restating this filtering capability ('or list tables in specific schemas'), but doesn't provide additional context like schema naming conventions, default behavior when omitted, or examples. With high schema coverage, the baseline score of 3 is appropriate.

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

Purpose4/5

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

The description clearly states the action ('Lists tables') and resource ('in an MSSQL Database'), making the purpose immediately understandable. It also specifies the optional filtering capability ('or list tables in specific schemas'), which adds useful detail. However, it doesn't explicitly differentiate this tool from its siblings like 'describe_table' or 'get_table_ddl', 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. With siblings like 'describe_table' (for detailed table info) and 'get_table_ddl' (for schema definitions), the description fails to clarify that this tool is for listing table names only, not for retrieving detailed metadata or definitions. There's no mention of prerequisites, limitations, or typical use cases.

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

read_dataA

Executes a SELECT query on an MSSQL Database table. The query must start with SELECT and cannot contain any destructive SQL operations for security reasons.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesSQL SELECT query to execute (must start with SELECT and cannot contain destructive operations). Example: SELECT * FROM movies WHERE genre = 'comedy'

TDQS

A3.9/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 adds useful context about security restrictions (no destructive SQL operations) and query requirements (must start with SELECT), but it does not cover other behavioral traits like error handling, performance limits, or output format. The description does not contradict any 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 appropriately sized with two sentences that are front-loaded and zero waste. The first sentence states the core purpose, and the second adds essential security and usage constraints, making it efficient and well-structured.

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

Completeness3/5

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

Given the tool's moderate complexity (single parameter, no output schema), the description is adequate but has gaps. It covers the purpose and basic constraints, but without annotations or output schema, it lacks details on return values, error conditions, or advanced usage. It is complete enough for basic use but not fully comprehensive.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents the single parameter 'query' with its constraints and an example. The description adds minimal value by restating the same constraints (must start with SELECT, no destructive operations), but does not provide additional syntax, format details, or semantic meaning beyond what the schema provides.

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 ('Executes a SELECT query') and resource ('on an MSSQL Database table'), distinguishing it from siblings like insert_data, update_data, or delete_data. It precisely defines the tool's function 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 provides clear context for when to use this tool (for SELECT queries) and implicitly excludes destructive operations, but it does not explicitly name alternatives or specify when-not scenarios. It helps differentiate from siblings like execute_stored_proc or list_tables, though it lacks explicit guidance on choosing between similar read-only tools.

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

update_dataB

Updates data in an MSSQL Database table using a WHERE clause. The WHERE clause must be provided for security.

ParametersJSON Schema
NameRequiredDescriptionDefault
tableNameYesName of the table to update
updatesYesKey-value pairs of columns to update. Example: { 'status': 'active', 'last_updated': '2025-01-01' }
whereClauseYesWHERE clause to identify which records to update. Example: "genre = 'comedy' AND created_date <= '2025-07-05'"

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions the WHERE clause requirement 'for security', which hints at safety considerations, but doesn't describe other critical behaviors: whether updates are reversible, what permissions are needed, how errors are handled, or what the response looks like. For a mutation tool with zero annotation coverage, this leaves significant gaps in understanding the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise (two sentences) and front-loaded with the core purpose. Every sentence earns its place: the first states what the tool does, and the second provides a critical constraint. There's zero waste or redundancy.

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

Completeness2/5

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

Given this is a mutation tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what happens on success/failure, return values, error conditions, or transactional behavior. The security note about WHERE clause is helpful but doesn't compensate for the lack of behavioral context needed for safe agent invocation.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all three parameters thoroughly with examples. The description adds minimal value beyond the schema by emphasizing the WHERE clause requirement, but doesn't provide additional semantic context about parameter interactions or edge cases. This meets the baseline for high schema coverage.

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

Purpose4/5

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

The description clearly states the action ('Updates data') and resource ('in an MSSQL Database table'), making the purpose immediately understandable. It distinguishes from siblings like insert_data (adds new records) and delete_data (removes records) by specifying it modifies existing data. However, it doesn't explicitly mention what 'data' refers to (e.g., column values), 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 Guidelines3/5

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

The description provides some usage context by specifying 'using a WHERE clause' and that it 'must be provided for security', which implies this tool should be used when you need to modify specific records rather than all records. However, it doesn't explicitly state when to choose this over alternatives like delete_data or when not to use it (e.g., for bulk operations without filtering). The guidance is implied rather than explicit.

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

Tool Schema Changelog

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

  1. 12 tool updatesv1.0.0
    • First observedcreate_index
    • First observedcreate_table
    • First observeddelete_data
    • First observeddescribe_table
    • First observeddrop_table
    • First observedexecute_stored_proc
    • First observedget_table_alter_ddl
    • First observedget_table_ddl
    • First observedinsert_data
    • First observedlist_tables
    • First observedread_data
    • First observedupdate_data

TDQS

A3.7/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose with no ambiguity. Tools like create_table, describe_table, and drop_table target different table operations, while insert_data, update_data, delete_data, and read_data cover distinct CRUD actions. The descriptions reinforce these boundaries, such as the warning in delete_data about soft deletes versus update_data.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern using snake_case, such as create_table, describe_table, and execute_stored_proc. There are no deviations in naming conventions, making the set predictable and easy to understand at a glance.

Tool Count5/5

With 12 tools, this server is well-scoped for MSSQL database operations. The count covers essential tasks like table management, data manipulation, and schema inspection without being overwhelming. Each tool serves a clear purpose, such as get_table_ddl for DDL generation and list_tables for discovery.

Completeness4/5

The tool set provides comprehensive coverage for core database operations, including table creation, schema description, data CRUD, and stored procedure execution. Minor gaps exist, such as no explicit tools for managing indexes beyond create_index (e.g., drop_index) or handling transactions, but agents can work around these with existing tools like execute_stored_proc.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    F
    maintenance
    An MCP server for Microsoft SQL Server integration that enables users to query, monitor, and analyze databases directly through Claude. It supports schema exploration, performance analysis, and optional write operations via natural language commands.
    9
    1
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    A read-only MCP server for SQL Server database introspection that enables Claude to explore and query databases via tools like listing objects and executing SELECT queries.
    20
    1
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables Claude Code and other MCP clients to interact with Microsoft SQL Server databases through standardized tools for query execution, schema exploration, table management, and stored procedure execution.
    222
    1
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    A Model Context Protocol server that enables Claude to query, monitor, and analyze SQL Server databases, with support for schema exploration, performance analysis, and optional write operations.
    33
    1
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Cyronius/claude-database-tools'

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