Skip to main content
Glama
sql-mcp
by ohankay

kill_session

Destructive

Terminates a specified SQL Server session to resolve blocking or free resources; requires ALTER ANY CONNECTION and cannot target the tool's own session.

Instructions

KILL a server session (requires ALTER ANY CONNECTION). Cannot kill this tool's own session.

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": {
      "session_id": "<session_id>"
    },
    "name": "kill_session"
  }
}

Input Schema

NameRequiredDescriptionDefault
connectionNo
session_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false and idempotentHint=false, so the safety profile is covered. The description adds genuinely new behavioral context: the permission prerequisite and the constraint that the agent cannot kill its own session, which prevents a predictable failure. It still doesn't say what happens to in-flight queries or whether the kill is immediate versus graceful.

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?

Two short sentences, front-loaded with the action, and every clause carries a distinct constraint (permission, self-exclusion). No filler or restatement of the title.

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 destructive one-shot operation with no output schema, the definition covers the action, prerequisite and one hard limit, which is enough to avoid misuse. It is incomplete on how to discover a valid session_id and on the meaning of the 'connection' parameter, both of which an agent needs to call it correctly.

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

Parameters2/5

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

Schema description coverage is 0% for two parameters, so the description must carry the semantics and it largely does not. It implies session_id identifies the target session but adds no format or sourcing guidance, and the 'connection' parameter is never mentioned at all, leaving half the inputs unexplained.

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?

States a specific verb and resource ('KILL a server session') with a capitalized verb that removes ambiguity about what the tool does. It also delimits scope with two boundary statements (permission required, cannot target its own session), so an agent can distinguish it from list_sessions or stop_job without opening a schema.

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?

Usage is implied: an agent should call this to terminate an active session, and the prerequisite 'requires ALTER ANY CONNECTION' is stated, plus the exclusions of killing the tool's own session. However, it never mentions how to obtain a session_id (the sibling list_sessions) or when to prefer alternative actions, leaving a real operational gap.

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