Skip to main content
Glama
sql-mcp
by ohankay

list_sessions

Read-onlyIdempotent

Lists SQL Server sessions with login, host, database, status, blocking, wait, CPU, and current SQL to help diagnose activity and blocking.

Instructions

Server sessions with login, host, program, database, status, blocking session, wait, CPU and current SQL.

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

Input Schema

NameRequiredDescriptionDefault
connectionNo
only_activeNo
include_systemNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

C2.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is fully covered. The description's contribution is the set of returned columns (blocking session, wait, CPU, current SQL), which is genuinely useful since no output schema exists, but it says nothing about the result being filtered by default or about any server-side cost/side effects.

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?

It is compact and wastes no words, but the structure is a comma-separated attribute list rather than a sentence, so there is no front-loaded statement of action or scope. Brevity here comes at the cost of clarity.

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?

For a read-only list tool with no output schema, the description should at minimum state the default filtering behavior and explain the three undocumented parameters. Annotations cover safety, but the parameter and result-shape gaps leave the definition short of what is needed to call it correctly.

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

Parameters1/5

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

Schema description coverage is 0% for three parameters, and the description compensates for none of them: 'connection', 'only_active' (default true) and 'include_system' (default false) are never explained. The field list it does provide does not map to any parameter, so an agent cannot know that only_active silently narrows results.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The phrase 'Server sessions with login, host, program...' identifies the resource and enumerates which attributes are returned, so the agent can infer this is a session-listing tool. However, it is a bare noun phrase with no verb ('list'/'retrieve') and gives no explicit differentiation from siblings such as list_connections or list_databases beyond the word 'sessions'.

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 guidance at all: nothing says when to call this versus list_connections or how it relates to kill_session. No prerequisites, no mention of the default-only-active filtering that would affect whether the agent even sees blocking sessions.

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