Skip to main content
Glama
dbadmin-mcp

dbadmin-mcp

by legavaz

slow_queries

Lists top database queries by total execution time using pg_stat_statements or dm_exec_query_stats, and shows how to enable the required statistics when unavailable.

Instructions

Топ запросов по суммарному времени (pg_stat_statements / dm_exec_query_stats) или подсказка, как его включить.

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

Input Schema

NameRequiredDescriptionDefault
limitNo
connectionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/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 it does disclose a genuinely important behavioral trait: if the stats extension is not enabled, the tool degrades to returning enablement instructions rather than data. That dual-mode outcome is exactly the kind of thing an agent needs to anticipate. It still omits whether it is strictly read-only and what privileges are needed on the target instance.

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?

A single sentence that front-loads the ranking criterion and then the fallback behavior, with no filler. Every clause carries information.

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?

No output schema and no annotations mean the description must do all the work, and it adequately covers what is returned and the failure mode. It is incomplete regarding parameter semantics and supported database engines (implied but not stated, which matters when choosing the right connection), so an agent can call it but not confidently.

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?

Schema description coverage is 0% and neither parameter is mentioned: the meaning of limit (row cap on the ranking) and especially connection (which instance/credential context to query) is left entirely undocumented. The description adds no parameter meaning beyond the bare property names, which is a real gap for a tool that presumably fans out across connections.

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 states a specific verb and resource: top queries ranked by cumulative time, with the concrete source views named (pg_stat_statements / dm_exec_query_stats). This is enough to separate it from siblings such as explain (single-plan analysis) or top_tables (table-level attribution), though it never states those distinctions explicitly.

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?

Usage is only implied — the reader must infer this is a performance-triage tool to reach for when overall time is concentrated in a few statements. There is no explicit when-to-use versus explain/locks/table_profile and no stated prerequisites, so routing depends on the agent's own reasoning.

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