kill_session
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.
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
| Name | Required | Description | Default |
|---|---|---|---|
| target | No | ||
| dry_run | No | ||
| session_id | Yes |