Skip to main content
Glama
devopam

MCPg - Production-grade PostgreSQL MCP Server

Check PITR readiness

check_pitr_readiness
Read-only

Assesses PostgreSQL cluster readiness for point-in-time recovery by verifying archiving, wal_level, max_wal_senders, and full_page_writes, returning readiness status and remediation for failing gates.

Instructions

Assess whether the cluster is ready for point-in-time recovery (PITR) — the one-call 'could I actually recover to an arbitrary point right now, and if not what's missing?' check. Composes get_wal_archive_status (5.2) with the GUCs that gate PITR: continuous archiving must be healthy, wal_level >= replica, max_wal_senders >= 1 (so pg_basebackup can stream a base backup), and full_page_writes on (torn-page safety during replay). Read-only advisor — changes nothing, emits no secrets. Returns an object with available, ready (bool — true only when all gates pass), wal_level, archiving_healthy, gates (list of objects with name, ok, observed, remediation), remediation (ordered fixes for failing gates), and detail.

Example: check_pitr_readiness()

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
databaseNoOptional: target a configured secondary (read-only) database by name; omit for the primary. Call list_databases to see the configured ids.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
gatesYes
readyYes
detailNo
availableYes
wal_levelYes
remediationYes
archiving_healthyYes
Behavior5/5

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

The description fully discloses behavior: read-only, no secrets emitted, checks specific GUCs and archiving status. Annotations already indicate readOnlyHint=true, so the description adds value by detailing what is checked and what is not changed.

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 concise yet comprehensive. It front-loads the core purpose, then details the composed checks and return fields. Every sentence adds value without redundancy.

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 the presence of an output schema (context signals), the description does not need to explain return values. It covers the logical flow and includes an example call. Complete for the tool's complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the description adds meaning beyond the schema by explaining the parameter's purpose (target secondary database) and providing guidance (call list_databases). This is very helpful for the agent.

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: assessing PITR readiness for a cluster. It uses specific verbs ('assess', 'check') and defines the resource (cluster readiness). It distinguishes itself by referencing sibling tools like get_wal_archive_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?

The description explains the tool is a read-only advisor that changes nothing, implying safe use. It mentions composing other tools but does not explicitly state when not to use it or provide alternatives. However, the context of a readiness check is clear.

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/devopam/MCPg'

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