Skip to main content
Glama
pg-perf-mcp

pg-perf-mcp

by dixitgurv

active_queries

Lists currently running queries with run time, transaction age and wait events to identify long-running or blocked sessions causing PostgreSQL slowdowns.

Instructions

Currently running queries with run time, transaction age and wait events.

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

Input Schema

NameRequiredDescriptionDefault
limitNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3/5.0
Behavior3/5

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

No annotations are provided, so the description carries the burden. It usefully discloses which diagnostic columns come back (run time, transaction age, wait events), implying a read-only monitoring call, but never states that it is non-mutating, what permissions are required, or what load it places on the server.

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 short sentence fragment with no filler, and the key information is front-loaded. It is slightly under-specified rather than padded, so it loses a point only for terseness.

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?

An output schema exists, so return values need not be explained, and the description correctly focuses on what the tool observes. However, with no annotations and an undocumented limit parameter, an agent still lacks enough to call it confidently in edge cases.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The single parameter 'limit' has 0% schema description coverage and is never mentioned in the description, so its default of 20 and any upper bound or behavior when omitted are left entirely undocumented. The description does not compensate for the coverage gap.

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 specific resource ('Currently running queries') and the metrics returned (run time, transaction age, wait events), which clearly separates it from a historical analysis tool like slow_queries. It lacks an explicit contrast with the sibling, so it stops short of 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 Guidelines2/5

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

There is no guidance on when to call this versus slow_queries, database_overview, or explain_query, and no stated preconditions. The agent must infer from the phrase 'currently running' that this is for live troubleshooting only.

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