Skip to main content
Glama
esauro

pg-logical-mcp

by esauro

assess_slot_risk

Identify which replication slot is closest to invalidation by sampling WAL generation rate and comparing to retention settings. Estimate time until disk fills if disk space is provided.

Instructions

Project which slot is closest to invalidation, and how soon.

Judgment tool. Samples the current WAL generation rate (reads pg_current_wal_lsn() twice, sample_interval_seconds apart), reads max_slot_wal_keep_size, and projects a rough time-to-invalidation per slot. Pass available_disk_bytes to also get a time-to-disk-fill estimate. Run this on the PUBLISHER.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
available_disk_bytesNo
sample_interval_secondsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description fully explains the tool's behavior: it samples pg_current_wal_lsn() twice, reads max_slot_wal_keep_size, and projects estimates. It calls itself a 'Judgment tool,' implying estimates rather than exact counts. No side effects are mentioned, but it appears read-only.

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 (4 sentences), each sentence provides essential information: purpose, methodology, optional parameter, and execution context. No unnecessary words.

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?

Given the presence of an output schema (not shown), the description need not detail return values. It covers algorithm, parameters, and execution context (publisher). Could mention prerequisites but overall adequate for a judgment tool.

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 input schema has 0% description coverage, but the description adds meaning: it explains 'available_disk_bytes' is for disk-fill estimate and 'sample_interval_seconds' is the time between samples. This adds value beyond the schema's type-only definitions.

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: 'Project which slot is closest to invalidation, and how soon.' It specifies the resource (replication slots) and the action (assess risk/invalidation), distinguishing it from siblings like list_replication_slots and drop_slot.

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 provides context: it's a 'Judgment tool' that samples WAL generation, reads max_slot_wal_keep_size, and projects time-to-invalidation. It notes to run on the PUBLISHER and explains the optional parameter for disk-fill estimate. However, it does not explicitly state when to use this tool versus alternatives or when not to use it.

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/esauro/pg-logical-mcp'

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