Skip to main content
Glama
MCPg - Production-grade PostgreSQL MCP Server

MCPg - Production-grade PostgreSQL MCP Server

Get logical replication status

get_logical_replication_status
Read-only

Reports whether PostgreSQL 19's on-demand wal_level flip is available, showing configured and effective wal_level plus max_replication_slots so agents can detect pending reloads.

Instructions

Report whether PG 19's on-demand wal_level flip is usable, plus the configured wal_level, the new PG 19 effective_wal_level preset GUC, and max_replication_slots. When configured and effective diverge the agent can tell that an ALTER SYSTEM has been done but a reload is still pending. Never raises. Returns an object with available (bool), server_version_num, server_version, wal_level, effective_wal_level, max_replication_slots, and detail.

Example: get_logical_replication_status()

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_logical_replication_status"
  }
}

Input Schema

NameRequiredDescriptionDefault
databaseNoOptional: a database id from list_databases, to target a configured secondary (read-only) database; omit for the primary. Database names that are not configured ids are rejected.

Output Schema

NameRequiredDescriptionDefault
detailYes
availableYes
wal_levelYes
server_versionYes
server_version_numYes
effective_wal_levelYes
max_replication_slotsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.8.4
    • changedInput schema / properties / database / description
      Previous value: -"Optional: target a configured secondary (read-only) database by name; omit for the primary. Call list_databases to see the configured ids."New value: +"Optional: a database id from list_databases, to target a configured secondary (read-only) database; omit for the primary. Database names that are not configured ids are rejected."
  2. First observedv0.6.8

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already establish readOnlyHint=true and openWorldHint=false, but the description adds two traits annotations cannot express: the tool never raises, and it is version-sensitive (PG 19 features, surfaced through an `available` flag). The divergence interpretation (ALTER SYSTEM done, reload pending) is also substantive behavioral context. Return-field enumeration overlaps the output schema slightly, keeping it off a 5.

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?

It is front-loaded with the core purpose and the diagnostic interpretation, with no filler sentences. The explicit list of returned keys is somewhat redundant given a companion output schema, which is the only wasted space.

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 version-gated read tool this covers what an agent needs: what is checked, why divergence matters, that it never raises, and an example invocation. The only gap is that the optional `database` targeting behavior is left entirely to the schema, which is acceptable given an output schema already documents the return shape.

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?

Schema coverage is 100% and the `database` parameter is fully documented in the schema, including the rejection of non-configured names. The description says nothing about the parameter, so it adds no meaning beyond the schema — baseline 3 for a high-coverage single-parameter 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 states a precise verb (report) and a precisely scoped resource: whether the PG 19 on-demand wal_level flip is usable plus configured wal_level, effective_wal_level, and max_replication_slots. That is specific enough to separate it from neighbors like inspect_guc, list_replicas, or list_publications without opening the schema.

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 interpretation note — read this to confirm a wal_level change has actually taken effect after ALTER SYSTEM — but the description never says when to call it versus inspect_guc or list_replicas, and names no alternatives. An agent has to infer the workflow context.

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

Deploy Server

Other Tools