Skip to main content
Glama

mnemon_admin_kill_query

Terminate rogue or long-running PostgreSQL queries by PID, query ID, or duration threshold to stop resource drain and restore database stability.

Instructions

Emergency termination of a rogue or long-running query by PID or duration threshold.

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

Input Schema

NameRequiredDescriptionDefault
pidNoPostgreSQL backend process ID
query_idNoQuery identifier
duration_secNoKill all queries running longer than this duration (seconds)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.6

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It conveys destructiveness through "emergency termination" and "kill," which is meaningful. However, it does not say whether the kill is graceful (cancel) or hard (terminate the backend), what happens to the connection, whether privileges are required, whether the action is reversible, or what the response reports, all of which matter greatly for an irreversible admin operation.

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 zero filler: the action and its targeting criteria come first. It is efficient, though arguably under-specified rather than optimally concise for a destructive tool.

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, annotation-free admin tool with no output schema, an agent still needs to know the execution semantics (cancel vs terminate), privilege requirements, and what a successful call returns or how partial failures are reported. The description covers intent and targeting but leaves these operational gaps.

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%, so all three parameters are already documented in the input schema, which sets the baseline at 3. The description adds one piece of meaning the schema does not: that PID and duration threshold are alternative targeting strategies. It says nothing about query_id or how combining parameters is resolved.

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?

The description names a concrete verb (termination) and resource (query) and specifies both targeting modes: PID or duration threshold. That is far more specific than the tool name alone. It stops short of distinguishing itself from the obvious neighbor, mnemon_get_slow_queries, which is the natural way to find the queries this tool then kills.

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?

"Emergency" and "rogue or long-running" imply the situation, so an agent can infer when to reach for it. But there is no explicit when-not guidance, no mention of using mnemon_get_slow_queries to identify candidates first, and no stated prerequisite such as confirming the query is genuinely rogue before terminating.

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

Deploy Server

Other Tools