Skip to main content
Glama

list_locks

Read-only

List held and awaited PostgreSQL locks with owning backend and object to diagnose blocking and lock contention.

Instructions

[READ] Held/awaited locks joined to their owning backend and object.

Args:
    target: Target name from config; omit for the default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

The readOnlyHint annotation already establishes this is a safe read, and the '[READ]' prefix merely restates it. The description does contribute useful behavioral context beyond the annotation by stating that lock rows are joined to the owning backend and object, but it says nothing about volume, ordering, or permissions required to see other backends' locks.

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?

Two short lines, front-loaded with the operation and scope, followed by a single argument note. No filler, nothing that restates the tool name or the annotation.

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 one-parameter, read-only listing tool with a readOnlyHint annotation and no output schema, the description covers the action, the scope of the join, and the single argument. A brief note on what the returned columns/ordering look like would make it fully self-sufficient.

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 carries the burden and largely does: it explains that 'target' is a target name from config and that omitting it selects the default. That is more than the schema's bare anyOf[string, null] reveals, though it does not say where the config names come from or whether the name is case-sensitive.

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 resource (list held/awaited locks) and adds scope detail ('joined to their owning backend and object'), so an agent knows it is a raw lock listing rather than an analysis tool. It does not name the closer sibling blocking_lock_chain_rca, so it stops short of full sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: the description frames this as a raw inventory of held and awaited locks, which an agent can infer is the prerequisite view before reaching for blocking_lock_chain_rca. There is no explicit when-to-use, when-not-to-use, or alternative guidance anywhere in the text.

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