Skip to main content
Glama

mssql_connect

Read-only

Opens a SQL Server session from a saved profile or server/database pair and returns a connection ID with environment context for subsequent queries.

Instructions

Opens a SQL Server session using a saved profileId, profileName (optionally qualified as 'antigravity:Name' or 'vscode:Name'), or serverName + database. Returns a connectionId and database environment context.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "mssql_connect"
  }
}

Input Schema

NameRequiredDescriptionDefault
databaseNoOptional database name override.
profileIdNoProfile UUID from mssql_list_servers (or profile name).
serverNameNoServer host or profile name if profileId is omitted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior3/5

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

The definition discloses the return shape ('connectionId and database environment context') and documents the qualified-name syntax, which is useful context beyond the readOnlyHint=true annotation. However, it is silent on the session lifecycle: whether a new session supersedes an existing one, whether it must be closed with mssql_disconnect, auth or timeout behaviour, and any errors if the profile cannot be resolved. Note that readOnlyHint=true sits somewhat oddly with an operation that provisions a stateful session, although it does not modify data, so this is not a contradiction.

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?

It uses two sentences, states the identifier options first, states the return value second, and contains no filler wording.

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 three-optional-string connect tool with no output schema, the definition covers both input modes and the return value, which is close to sufficient. It would be complete if it stated what happens on a repeat call and what the returned 'environment context' contains.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3. The description earns more because it adds a semantics detail absent from the schema: profileName may be qualified as 'antigravity:Name' or 'vscode:Name'. It also makes the fallback relationship between the identifier modes explicit, so the agent can choose which parameter to populate.

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 definition opens with a specific verb and resource ('Opens a SQL Server session') and enumerates the three identifier routes (profileId, profileName, serverName + database), which is enough for an agent to distinguish it from mssql_disconnect and the mssql_list_* siblings without opening any schema.

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?

It gives clear context for connecting and explains how the identifier options relate (profile vs. server+database). What it lacks is explicit when-not guidance, e.g. reusing an existing connection instead of opening a new one, or pairing with mssql_disconnect.

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