Skip to main content
Glama
SQL Server MCP Server

SQL Server MCP Server

by fanzhenddz

connect_db

Connect to a SQL Server database using host, user, password, and database name, with optional port, encryption, and certificate settings, to enable querying and schema access.

Instructions

Connect to a SQL Server database

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "host": "<host>",
      "user": "<user>",
      "password": "<password>",
      "database": "<database>"
    },
    "name": "connect_db"
  }
}

Input Schema

NameRequiredDescriptionDefault
hostYesDatabase host
portNoDatabase port (default: 1433)
userYesDatabase user
encryptNoEncrypt connection (default: true)
databaseYesDatabase name
passwordYesDatabase password
trustServerCertificateNoTrust server certificate (default: false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.8/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden, yet it discloses nothing about connection lifecycle: whether the connection is pooled or persistent, whether it returns a handle/identifier, what happens on failure, or whether reconnect attempts are made. For a stateful connection-establishing tool this is a meaningful gap.

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

Conciseness3/5

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

A single front-loaded clause with no filler, which is structurally clean. However, for a seven-parameter, stateful connection tool the brevity crosses from concise into under-specified, so it does not merit a top score.

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?

The tool has seven parameters, no annotations, and no output schema, so the description must supply all behavioral context and supplies none. An agent cannot tell from the definition whether this returns a connection object, whether it stays open, or how it interacts with the sibling query and execute tools.

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 each of the seven properties individually documented including defaults for port, encrypt, and trustServerCertificate. The description adds no meaning beyond that, so the baseline of 3 applies.

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 states a specific verb and resource: 'Connect to a SQL Server database'. This is enough to separate it from siblings like query, execute, and list_tables, which operate on data rather than establishing a connection, though the description never names those siblings or clarifies the relationship explicitly.

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?

There is no guidance on when this tool must be called versus the sibling query/execute tools, and no statement of prerequisites or ordering (for example, whether a connection must exist before querying). The sentence gives no conditions, exclusions, or alternatives.

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