Skip to main content
Glama

kill_session

Destructive

Terminate a MySQL session by connection ID to clear blocking or runaway queries. Use dry_run=True to preview; no undo.

Instructions

[WRITE][risk=high] Terminate a session (KILL CONNECTION). No safe inverse.

Captures the session's user/host/query for the audit trail; a kill cannot be undone, so no undo is offered. Pass dry_run=True to preview.

Refuses this tool's own session id — including under dry_run, which must report a refusal rather than preview a call that will be refused.

Args: session_id: Session/connection id (from list_sessions). dry_run: If True, preview without killing. target: Target name from config; omit for the default.

Input Schema

NameRequiredDescriptionDefault
targetNo
dry_runNo
session_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A4/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, yet the description adds substantial context beyond them: the kill is irreversible with no undo offered, the session's user/host/query is captured for the audit trail, and it refuses this tool's own session id (even under dry_run). This is exactly the behavioral disclosure an agent needs for a high-risk write.

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?

Front-loaded with the action and risk tag, then behavior, then a structured Args block. Slightly redundant — 'No safe inverse' and 'a kill cannot be undone, so no undo is offered' restate the same point — but overall efficient.

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 3-param destructive tool with full annotation coverage and no output schema, the description covers irreversibility, audit capture, self-session refusal, and the dry_run preview path. It does not describe the response/error shape, but annotations and the absence of an output schema make that a minor gap.

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 description coverage is 0%, so the description must carry the load, and it documents all three parameters: session_id (with its source, list_sessions), dry_run (preview semantics), and target (config name, omit for default). Coverage is complete though the per-parameter notes are terse.

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 and resource — 'Terminate a session (KILL CONNECTION)' — which clearly separates it from kill_query by resource type. It does not name any sibling explicitly, but the verb+resource is unambiguous. Strong but short of the explicit sibling differentiation that earns a 5.

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?

Implied usage is present: the session_id comes 'from list_sessions' and dry_run=True is offered as a preview path. However, there is no explicit guidance on when to use kill_session versus kill_query or other siblings, so the alternative-selection question is left to inference.

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