Skip to main content
Glama
db-conn-mcp

db-conn-mcp

cancel_query

Cancel a running database statement by backend PID and database while keeping the session alive; returns cancelled=false if the PID is missing or permissions are insufficient.

Instructions

Cancel the statement running in server backend pid (find pids via show_activity).

Cancels the statement only — the session survives. cancelled=false means the pid doesn't exist or you lack permission (same database user required).

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": {
      "database": "<database>",
      "pid": "<pid>"
    },
    "name": "cancel_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
pidYes
databaseYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so well: it discloses that only the statement is cancelled and the session survives, that a same-database-user permission is required, and what a false result means. It omits whether cancellation is immediate/blocking and what happens if the statement already finished.

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 paragraphs, front-loaded with the action, then the key behavioral caveats. Every clause adds information and nothing is padded.

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 two-parameter, annotation-free mutation-like tool with no output schema, the description covers the critical semantics (scope, permission, failure meaning). The unexplained `database` parameter is the one gap that an agent could stumble on.

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 0%, so the description must supply all parameter meaning. It explains `pid` usefully as a server backend id discoverable via show_activity, but never explains the required `database` parameter or why it is needed (presumably permission/connection scoping). Half the parameters remain unmotivated.

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?

The description states a specific verb and resource — cancel the statement running in server backend `pid` — and immediately names the sibling (`show_activity`) that produces the identifier it needs. An agent can distinguish this from other query tools without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives clear context for use (you have a pid from show_activity) and implicitly covers the when-not case by noting that cancelled=false means the pid doesn't exist or permissions are lacking. It does not explicitly state alternatives such as closing a session outright, so it falls short of a full 5.

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