Skip to main content
Glama
MSSQL MCP Server

MSSQL MCP Server

by Elad-Health

get_connected_users

Retrieves currently connected users and sessions on a SQL Server instance, with optional filters for database and active requests to help monitor and troubleshoot activity.

Instructions

Get currently connected users and sessions

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": "get_connected_users"
  }
}

Input Schema

NameRequiredDescriptionDefault
serverNoSQL Server instance (e.g., "server\instance" or "server,port"). Uses default if not specified.
databaseNoFilter by database name
activeOnlyNoOnly show sessions with active requests

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.0

TDQS

C2.9/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, and it discloses very little: 'currently' implies a point-in-time snapshot but nothing about required permissions (e.g., VIEW SERVER STATE), cost, or whether system sessions are included. For a monitoring tool with zero annotation coverage this is a significant gap.

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?

A single front-loaded sentence with no filler. It is efficient, though its brevity comes at the cost of the behavioral detail noted above rather than from trimming 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?

With no annotations and no output schema, the description is the only source of behavioral context, and it says nothing about what is returned (user names, session IDs, status) or permission requirements. For a three-parameter diagnostic tool this leaves real gaps for an 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 coverage is 100%, with all three optional parameters documented in the schema itself, so the baseline of 3 applies. The description adds no meaning beyond the schema — it does not explain the default server behavior or how database filtering interacts with activeOnly.

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 ('Get') and resource ('currently connected users and sessions'), making the operation unambiguous. It does not explicitly differentiate itself from nearby siblings such as get_running_queries, though 'connected users and sessions' is a distinct concept.

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 when-to-use or when-not-to-use guidance, and no alternative tool is named for related questions like 'what queries are running'. Usage must be inferred entirely from the phrase 'currently connected'.

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