Skip to main content
Glama
db-conn-mcp

db-conn-mcp

show_activity

Inspect current database server activity—PID, state, wait events, and query/transaction age—to identify what is holding connections; sanitized by default and pairs with cancel_query.

Instructions

Show current server activity: pid, state, wait events, query/transaction age.

Sanitized by default — no user names, client addresses, or query text (pass include_query=true for truncated query text). Answers "what is holding connections"; pair with cancel_query(pid) to kill a stuck statement.

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>"
    },
    "name": "show_activity"
  }
}

Input Schema

NameRequiredDescriptionDefault
databaseYes
include_queryNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/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 well: it discloses that output is sanitized by default, exactly what is withheld (user names, client addresses, query text), and the opt-in that returns truncated query text. It omits privileges required and whether it is strictly read-only, but the safety-relevant behavior is clearly surfaced.

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?

Three short sentences, front-loaded with what is shown, then the sanitization caveat, then the operational next step. No redundancy and every sentence carries decision-relevant information.

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?

No output schema exists, and the description compensates by listing the returned columns and the redaction behavior, which is the right coverage for a read-only diagnostic tool. The only real hole is the unexplained required 'database' parameter, which leaves part of the invocation underspecified.

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 coverage is 0%, so the description must compensate. It adds real meaning for include_query (default off, enables truncated query text) and ties sanitization to that flag, but the required 'database' parameter is never mentioned or explained — an agent must guess whether it scopes the activity view or is merely a connection target.

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 ('Show current server activity') and enumerates the returned fields: pid, state, wait events, query/transaction age. It also frames the tool's role relative to the sibling cancel_query, so an agent can distinguish 'diagnose what is blocking' from 'kill the blocker' 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 Guidelines4/5

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

Gives a concrete use case ('Answers "what is holding connections"') and an explicit follow-up pairing with cancel_query(pid) for stuck statements. It does not state when not to use it or name alternatives for other diagnostic needs (e.g. table_stats, check_database), so it stops short of full routing guidance.

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