Skip to main content
Glama

blocking_lock_chain_rca

Read-only

Build a PostgreSQL wait-for tree from blocking pairs to identify and name the root blocker, using live or supplied blocking-pair data.

Instructions

[READ] Build the wait-for tree from blocking pairs and name the root blocker.

Pass 'pairs' (as from the live blocking-pairs read) for pure/offline analysis,
or omit to pull the current blocking graph live.

Args:
    pairs: Injected blocking pairs {blockedPid, blockingPid, ...}; if omitted,
        pulled live from pg_blocking_pids.
    target: Target name from config; omit for the default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pairsNo
targetNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

readOnlyHint=true is consistent with the '[READ]' tag, so no contradiction. The description adds real behavioral context beyond annotations: omitting 'pairs' triggers a live pull from pg_blocking_pids, while supplying it enables offline analysis. No mention of permissions or result volume, but the annotation already covers the safety profile.

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?

Front-loads the '[READ]' marker and core purpose, then usage modes, then parameter notes. Every line earns its place with no padding or redundancy.

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?

With no output schema, the description should ideally sketch the return shape; it implies one ('the wait-for tree' and root blocker name) but does not describe it. For a 2-param read-only tool it is otherwise complete: purpose, mode selection, and both parameter behaviors are present.

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?

Schema description coverage is 0%, so the description has to carry the load, and it does: 'pairs' is explained as {blockedPid, blockingPid, ...} with a live fallback, and 'target' as a config name with default fallback. It adds genuine meaning the schema lacks, though the structure is shown only by example rather than fully specified.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and output: 'Build the wait-for tree from blocking pairs and name the root blocker,' which is clearly distinct from sibling reads like list_locks or list_activity. It does not explicitly name a sibling to contrast against, so it falls just short of top marks.

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?

Gives a clear usage fork: pass 'pairs' for pure/offline analysis, or omit to pull the blocking graph live. This is actionable context, though it addresses which mode to use rather than when to pick this tool over alternatives like slow_query_rca or list_locks.

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