Skip to main content
Glama

replication_status

Read-only

Monitor connected PostgreSQL standbys and their replication replay lag from pg_stat_replication to detect lagging replicas. Omit target to check the default.

Instructions

[READ] Connected standbys and their replay lag (pg_stat_replication).

Args:
    target: Target name from config; omit for the default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=true, and the description's '[READ]' tag merely restates that. Beyond the data-source name, it discloses nothing about behavior for a read-only monitoring tool: that results may be empty with no standbys, that visibility of all rows requires pg_monitor/superuser privileges, or what the lag columns represent.

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?

Front-loaded with the operation and scope in one line, then a compact Args block. Minor waste in the '[READ]' tag that duplicates the annotation, and the trailing blank line, but overall tight.

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?

With no output schema, the description does state what is returned (standbys and replay lag), which is the key gap it must fill. It omits privilege requirements and empty-result behavior, which matter for a monitoring query against a stats view.

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?

Schema description coverage is 0%, so the description must compensate, and it does: it explains that target is a config name and that omitting it selects the default, which the bare anyOf/null schema does not convey. It stops short of saying what values are valid or what happens with an unknown target.

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?

States a specific resource and what is reported: connected standbys and their replay lag, and names the underlying source (pg_stat_replication). This is clearly separable from siblings like replication_slots and wal_status, which cover different replication objects.

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 implied by the content ('replay lag' clearly signals replication-lag monitoring), but there is no explicit when-to-use, when-not-to-use, or pointer to alternatives such as replication_slots or wal_status for adjacent replication questions.

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