Skip to main content
Glama

mssql_change_database

Read-only

Switches the active database catalog on an open connection, letting you target a different database without reconnecting.

Instructions

Switches the active database catalog on an open connectionId.

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": {
      "connectionId": "<connectionId>",
      "database": "<database>"
    },
    "name": "mssql_change_database"
  }
}

Input Schema

NameRequiredDescriptionDefault
databaseYesTarget database name.
connectionIdYesThe connectionId returned by mssql_connect.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

The description adds the useful constraint that the connection must be open, which the schema does not state. Beyond that it is silent on the interesting behaviors: whether the switch persists for later queries on that connectionId, what happens if the database does not exist, and whether any session state is reset. The 'switches' wording is a state change while annotations declare readOnlyHint=true — arguably consistent since no data is written, but the tension is left unexplained.

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?

One sentence with the action, the target resource, and the required context front-loaded; no filler and nothing repeated from the schema.

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 two-parameter, fully documented tool with no output schema and a read-only annotation, a single sentence is close to sufficient. Still missing are the post-switch effects an agent needs to sequence calls correctly — persistence of the switch and failure behavior for an invalid database name.

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 coverage is 100%, with both parameters documented inline, so the schema already carries the meaning. The description contributes only the qualifier that the connectionId must be open, adding marginal value over structured data.

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?

States a specific verb ('Switches') and a specific resource ('the active database catalog'), scoped to a particular connectionId. That is clearly distinguishable from connect/disconnect/list/run_query siblings without naming them, though it stops short of explicit sibling routing.

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 phrase 'on an open connectionId' implies the prerequisite that a connection must already exist, and the schema links connectionId to mssql_connect. However, there is no explicit 'use this before mssql_run_query to target a given database' guidance and no statement of 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.