Skip to main content
Glama
isdaniel

PostgreSQL-Performance-Tuner-Mcp

analyze_wait_events

Read-onlyIdempotent

Identify PostgreSQL performance bottlenecks by analyzing wait events for client backend processes, helping detect I/O issues, lock contention, and resource saturation in application queries.

Instructions

Analyze PostgreSQL wait events to identify bottlenecks.

Note: This tool focuses on client backend processes and excludes system background processes to help identify bottlenecks in your application queries.

Wait events indicate what processes are waiting for:

  • Lock: Waiting for locks on tables/rows

  • IO: Waiting for disk I/O

  • CPU: Waiting for CPU time

  • Client: Waiting for client communication

  • Extension: Waiting in extension code

This helps identify:

  • I/O bottlenecks

  • Lock contention patterns

  • Resource saturation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
active_onlyNoOnly include active (running) queries
Behavior4/5

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

The description adds valuable behavioral context beyond what annotations provide. While annotations indicate read-only, non-destructive, and idempotent operations, the description explains what wait events represent (Lock, IO, CPU, Client, Extension) and what insights can be gained (I/O bottlenecks, lock contention patterns, resource saturation). This helps the agent understand the tool's analytical focus and output interpretation.

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 well-structured and appropriately sized. It starts with the core purpose, adds an important note about scope, then provides explanatory context about wait events and insights. Every sentence adds value without redundancy. The bulleted lists efficiently convey information without unnecessary verbosity.

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 tool's analytical nature, the absence of an output schema, and comprehensive annotations, the description provides good contextual completeness. It explains what wait events are, what they indicate, and what insights can be derived. However, it doesn't describe the format or structure of the analysis results, which would be helpful since there's no output schema provided.

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?

With 100% schema description coverage for the single parameter 'active_only', the schema already fully documents this parameter. The description doesn't add any additional parameter information beyond what's in the schema. According to scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no parameter info in the description.

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's purpose: 'Analyze PostgreSQL wait events to identify bottlenecks.' It specifies the resource (PostgreSQL wait events), the verb (analyze), and distinguishes it from siblings by focusing on client backend processes while excluding system background processes. This differentiation from tools like 'get_active_queries' or 'get_slow_queries' is explicit.

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 clear context for when to use this tool: 'to help identify bottlenecks in your application queries.' It explicitly excludes system background processes, which helps differentiate it from general monitoring tools. However, it doesn't name specific alternatives among the sibling tools or provide explicit 'when-not-to-use' guidance beyond the exclusion mentioned.

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/isdaniel/pgtuner-mcp'

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