Skip to main content
Glama
esauro

pg-logical-mcp

by esauro

diagnose_stuck_subscription

Explains the cause of a wedged logical replication subscription, identifies the conflicting row from the subscriber log, and presents two fixes: resolve the conflict or skip the offending transaction.

Instructions

Explain why apply is wedged and lay out the two real fixes.

Judgment tool (the marquee one). Correlates subscription error state with the LSN apply is stuck at, explains the usual cause (a unique/primary-key conflict on the subscriber), and presents the two options: resolve the conflicting row, or skip the offending transaction. Points you at the subscriber server log for the exact conflicting row. Run this on the SUBSCRIBER.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations, the description carries full burden. It discloses that the tool correlates subscription error state with LSN, explains the usual cause (unique/primary-key conflict), specifies two options (resolve conflicting row or skip transaction), and mentions pointing to subscriber server log. This is highly transparent.

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 extremely concise: two short sentences plus two line items. Every sentence adds value, and the most critical information is front-loaded ('Explain why apply is wedged'). No wasted words.

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 zero parameters, no annotations, but presence of an output schema, the description fully explains the tool's behavior and output. It covers cause, symptoms, fixes, and log reference, making it complete for an agent to understand.

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 tool has zero parameters, so the schema covers everything. The description adds context beyond the schema by detailing what the tool does and how it works. Baseline 4 is appropriate as no parameters need explanation.

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: 'Explain why apply is wedged and lay out the two real fixes.' It specifies the resource (stuck subscription) and action (diagnose), and distinguishes itself from sibling tools like skip_apply_transaction by calling itself a 'judgment 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 explicit guidance: 'Run this on the SUBSCRIBER.' It implies use when apply is wedged, but does not explicitly list when not to use or compare with all alternatives. However, it contrasts with sibling tools by being a judgment tool.

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