Skip to main content
Glama
call518

MCP PostgreSQL Operations

by call518

get_wal_status

Monitor PostgreSQL WAL status, archiving lag, and generation metrics to diagnose replication issues and review current LSN and file activity.

Instructions

[Tool Purpose]: Monitor WAL (Write Ahead Log) status and statistics

[Exact Functionality]:

  • Show current WAL location and LSN information

  • Display WAL file generation rate and size statistics

  • Monitor WAL archiving status and lag

  • Provide WAL-related configuration and activity metrics

[Required Use Cases]:

  • When user requests "WAL status", "WAL monitoring", "log shipping status", etc.

  • When diagnosing replication lag or WAL archiving issues

  • When monitoring database write activity and WAL generation

[Strictly Prohibited Use Cases]:

  • Requests for WAL configuration changes

  • Requests for manual WAL switching or archiving

  • Requests for WAL file manipulation or cleanup

Returns: WAL status information including current LSN, WAL files, archiving status, and statistics

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv3.4.2
    • addedInput schema / additionalProperties
      Added value: +false
    • removedOutput schema / properties / result / title
      Removed value: -"Result"
    • removedOutput schema / title
      Removed value: -"_WrappedResult"
  2. Addedv1.0.0

TDQS

A4.1/5.0
Behavior3/5

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

With no annotations, the description must carry the full behavioral burden; it does communicate indirectly that the tool is a read-only monitor by explicitly prohibiting config changes, WAL switching/archiving, and file manipulation. However it never states permissions required, expected cost/overhead of sampling WAL directories, or whether results are point-in-time snapshots versus cumulative counters.

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?

Bracketed section headers keep it scannable and the purpose and functionality are front-loaded before the use-case lists. Slightly verbose — the 'Returns' block largely restates the functionality bullets and duplicates the output schema.

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?

For a zero-parameter, read-only monitoring tool with an output schema, the description covers purpose, scope, and boundaries well enough to invoke correctly. Missing behavioral notes (snapshot vs. cumulative, overhead, permissions) keep it short of 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 takes zero parameters, so there is nothing to disambiguate and the baseline of 4 applies. The description correctly avoids inventing parameter semantics.

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 opens with a specific verb+resource ('Monitor WAL (Write Ahead Log) status and statistics') and then enumerates exactly what is covered: LSN/location, generation rate and size, archiving status and lag, configuration and activity metrics. This is clearly separable from siblings such as get_wal_summarizer_status, get_bgwriter_stats, or get_replication_status.

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?

It gives explicit trigger phrases ('WAL status', 'WAL monitoring', 'log shipping status') plus scenario-based guidance (diagnosing replication lag, archiving issues) and a strict prohibition list. The only gap is that it never names an alternative tool for overlapping cases such as replication diagnosis or config inspection.

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