Skip to main content
Glama
call518

MCP PostgreSQL Operations

get_bgwriter_stats

Analyze PostgreSQL background writer and checkpoint performance statistics to monitor I/O efficiency and troubleshoot checkpoint-related issues.

Instructions

[Tool Purpose]: Analyze background writer and checkpoint performance statistics with version compatibility

[Exact Functionality]:

  • Show checkpoint execution statistics (timed vs requested)

  • Display checkpoint timing information (write and sync times)

  • Provide buffer writing statistics by different processes

  • Analyze background writer performance and efficiency

  • Automatically adapts to PostgreSQL version (15+ uses separate checkpointer view)

[Required Use Cases]:

  • When user requests "checkpoint stats", "bgwriter performance", "buffer stats", etc.

  • When analyzing I/O performance and checkpoint impact

  • When investigating background writer efficiency

  • When troubleshooting checkpoint-related performance issues

[Strictly Prohibited Use Cases]:

  • Requests for checkpoint execution or configuration changes

  • Requests for background writer parameter modifications

  • Requests for statistics reset

Returns: Background writer and checkpoint performance statistics with version-appropriate data

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Since no annotations are provided, the description carries the full burden of behavioral disclosure. It does well by describing key behavioral traits: it's a read-only analysis tool (implied by 'show', 'display', 'provide', 'analyze'), it automatically adapts to PostgreSQL version (15+ uses separate checkpointer view), and it returns performance statistics. However, it doesn't mention potential limitations like data freshness, permission requirements, or performance impact of running the tool. With no annotations, this is strong but not perfect.

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 with clear sections ([Tool Purpose], [Exact Functionality], [Required Use Cases], [Strictly Prohibited Use Cases], Returns). Every sentence earns its place by providing specific guidance or information. Despite being comprehensive, it avoids redundancy and stays focused on helping the agent understand when and how to use this tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that the tool has 0 parameters, no annotations, but does have an output schema, the description provides excellent contextual completeness. It explains what the tool does, when to use it, when not to use it, and what it returns. The output schema will handle the return value details, so the description appropriately focuses on usage context rather than output structure. For a parameterless analysis tool, this description is complete.

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 tool has 0 parameters with 100% schema description coverage, so the baseline would be 4. The description appropriately doesn't waste space discussing parameters that don't exist. It focuses instead on what the tool analyzes and returns, which is the correct approach for a parameterless tool.

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 explicitly states the tool's purpose as 'Analyze background writer and checkpoint performance statistics with version compatibility' in the [Tool Purpose] section. It clearly distinguishes this from sibling tools by specifying it focuses on background writer/checkpoint statistics rather than connections, tables, replication, or other database metrics. The description provides specific verbs ('analyze', 'show', 'display', 'provide') and resources ('background writer', 'checkpoint performance statistics').

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

The description includes both [Required Use Cases] and [Strictly Prohibited Use Cases] sections that provide explicit guidance. It specifies when to use this tool ('When user requests "checkpoint stats", "bgwriter performance", etc.', 'When analyzing I/O performance', 'When troubleshooting checkpoint-related performance issues') and when not to use it ('Requests for checkpoint execution or configuration changes', 'Requests for background writer parameter modifications', 'Requests for statistics reset'). This clearly distinguishes it from potential alternatives for configuration changes.

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/call518/MCP-PostgreSQL-Ops'

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