Skip to main content
Glama
esauro

pg-logical-mcp

by esauro

inspect_subscriptions

Inspect PostgreSQL logical replication subscriptions to identify apply-lag signals by reviewing subscription metadata, worker state, and LSN positions.

Instructions

Inspect subscriptions and their apply-lag signals.

Deterministic. Joins pg_subscription with pg_stat_subscription for worker state, received/latest-end LSNs, and apply-lag signals (last_msg_send_time vs last_msg_receipt_time). The connection string (subconninfo) is deliberately omitted — it holds a password. Reading pg_subscription needs elevated privileges. Run this on the SUBSCRIBER.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

No annotations are provided, but the description fully discloses behavioral traits: deterministic (read-only), omitted connection string for password security, required privileges, and the data it returns (worker state, LSNs, apply-lag signals).

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 (5 lines) and front-loaded with the purpose. Every sentence adds value: deterministic, joins, omitted field, privileges, where to run.

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 tool with an output schema, the description mentions key output columns (worker state, LSNs, apply-lag signals) without listing every field. It also addresses security. This is sufficient, but could explicitly reference the output schema.

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?

There are no parameters, so the description adds no parameter details. Given zero parameters, the baseline is 4, and the description does not need to add more.

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 inspects subscriptions and their apply-lag signals, specifying the resources pg_subscription and pg_stat_subscription. It distinguishes from siblings like diagnose_stuck_subscription or subscription_errors by being a general inspection tool.

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 clear context by noting that it must be run on the subscriber and requires elevated privileges. 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