Skip to main content
Glama
Dmitriusan

mcp-db-analyzer

by Dmitriusan

analyze_connections

Detect idle-in-transaction sessions, lock contention, and long-running queries on PostgreSQL to troubleshoot blocking and connection pool issues.

Instructions

Analyze active database connections. Detects idle-in-transaction sessions and lock contention between sessions (PostgreSQL), long-running queries flagged at >30 seconds, and connection pool utilization. Idle-in-transaction and lock contention detection are not available on MySQL — use this tool's output to investigate PostgreSQL-specific blocking scenarios. Not available for SQLite.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timeout_msNoConnection timeout in milliseconds (default: 30000). Increase for slow or remote databases.
Behavior3/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It describes what the tool detects but does not state whether it is read-only or has any side effects. The description is adequate but could be improved by explicitly noting the tool is non-destructive.

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?

The description is concise with three sentences. The first sentence states the purpose, the second elaborates on specific detections and database differences, and the third provides a constraint. No redundant or unnecessary 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?

Given the complexity of analyzing database connections, the description covers key detection items and database-specific limitations. However, the absence of an output schema means the agent must infer the return format, which could be clarified.

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?

The only parameter (timeout_ms) has a schema description that is clear, but the tool description adds additional context: 'Increase for slow or remote databases.' This provides practical usage advice beyond the schema.

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 clearly states the tool analyzes active database connections and lists specific detections (idle-in-transaction, lock contention, long-running queries, connection pool utilization). It also differentiates between PostgreSQL, MySQL, and SQLite, effectively distinguishing it from sibling tools like analyze_slow_queries.

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?

The description provides explicit guidance on when not to use (MySQL/SQLite for certain features) and suggests using for PostgreSQL-specific blocking scenarios. However, it does not explicitly compare with alternatives like analyze_slow_queries or explain_query.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Dmitriusan/mcp-db-analyzer'

If you have feedback or need assistance with the MCP directory API, please join our Discord server