Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MSSQL_HOSTNoSQL Server hostname
MSSQL_PORTNoSQL Server port (default: 1433)
MSSQL_USERNoSQL auth username
MSSQL_DATABASENoDefault database
MSSQL_PASSWORDNoSQL auth password
MSSQL_MCP_CONFIGNoPath to YAML config file

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_serversA

List all configured SQL Server connections and their details (host, database, auth type, security mode)

list_databasesA

List all accessible databases on the SQL Server instance

list_schemasA

List all schemas in the current database

list_tablesA

List all tables in a database, optionally filtered by schema

list_viewsA

List all views in a database, optionally filtered by schema

describe_tableA

Get detailed column information for a table or view (columns, types, defaults, nullability, identity, computed)

get_foreign_keysC

Get foreign key relationships for a table

get_indexesC

Get index information for a table

get_constraintsB

Get constraints (PK, unique, check, default) for a table

get_triggersB

Get triggers defined on a table

execute_queryB

Execute a read-only SQL query (SELECT). Automatically applies row limits from configuration.

execute_mutationA

Execute a data modification query (INSERT, UPDATE, DELETE, MERGE). Requires readwrite or admin security mode.

list_proceduresA

List all stored procedures in a database, optionally filtered by schema

describe_procedureA

Get parameter information and source code for a stored procedure

execute_procedureB

Execute a stored procedure with parameters. Requires readwrite or admin security mode.

get_query_planA

Get the estimated execution plan for a SQL query (without executing it)

get_active_queriesB

Show currently running queries on the server (from sys.dm_exec_requests)

get_table_statsB

Get table statistics: row count, total size, index size, and fragmentation

get_index_usageC

Get index usage statistics: seeks, scans, lookups, and updates (from sys.dm_db_index_usage_stats)

get_missing_indexesC

Get missing index suggestions from SQL Server DMVs (sys.dm_db_missing_index_details)

get_server_infoA

Get SQL Server instance information: version, edition, OS, memory, CPU

get_database_infoC

Get detailed database information: size, files, status, recovery model

compare_schemasB

Compare schemas between two databases — shows tables, columns, and indexes that differ (useful for dev vs prod comparison)

generate_codeB

Generate TypeScript interface, C# class, or CREATE TABLE script from a table's schema

generate_insert_scriptsA

Generate INSERT statements from existing table data (for migration/seeding)

generate_er_diagramB

Generate a Mermaid ER diagram from database foreign key relationships

sample_tableA

Get a random sample of rows from a table (useful for understanding data patterns)

export_queryB

Execute a SELECT query and return results as CSV or JSON format

get_wait_statsB

Get top server wait statistics — identifies performance bottlenecks (CPU, I/O, locks, etc.)

get_deadlocksA

Get recent deadlock events from the system_health Extended Events session

get_blocking_chainsB

Show current blocking chains — which sessions are blocking others

get_long_transactionsB

Show long-running open transactions that may be holding locks

get_space_usageC

Get detailed disk space usage by table in a database

rebuild_indexB

Rebuild or reorganize a fragmented index. Requires admin security mode.

get_backup_historyB

Get recent backup history for a database from msdb

get_query_store_statsA

Get top resource-consuming queries from Query Store (SQL Server 2016+). Query Store must be enabled on the database.

generate_test_dataB

Generate INSERT statements with realistic fake/test data based on table schema

health_checkC

Check SQL Server connection health and basic responsiveness

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

B3.4/5.0

Scored across 38 tools

Disambiguation5/5

Each tool has a clear, distinct purpose, covering different aspects of SQL Server management like schema comparison, query execution, performance monitoring, and code generation. No two tools appear to do the same thing, and descriptions clearly differentiate them.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern with lowercase and underscores (e.g., describe_table, get_indexes, execute_query). This makes it easy for agents to predict and understand the function of each tool.

Tool Count2/5

With 38 tools, the server is overly heavy for typical MCP usage. While the scope is broad, this many tools can overwhelm agents and slow down selection. A more focused set of 15-25 would be more appropriate.

Completeness4/5

The tool set covers a wide range of SQL Server operations: discovery, querying, mutation, monitoring, maintenance, and code generation. Minor gaps exist (e.g., no DDL operations like create/alter table or kill session), but the core needs are well addressed.

Maintenance

ActivityInactive
ResponsivenessUnresponsive