Skip to main content
Glama

Operation progress

pg_progress
Read-onlyIdempotent

Show live progress for PostgreSQL long-running operations from pg_stat_progress views—VACUUM, ANALYZE, index builds, backups, COPY, and REPACK—so you can tell if a job is stuck or just slow.

Instructions

Show long operations that are running now with their progress: VACUUM, ANALYZE, CLUSTER/VACUUM FULL, CREATE INDEX / REINDEX, base backups, COPY and REPACK, from the pg_stat_progress_* views that exist on this server version.

Each operation lists the process, user, table, phase, how long it has run, percent done when it can be computed and the raw counters. When nothing is running it says so. Use it to answer "is it stuck or just slow?" for index builds and vacuums.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "pg_progress"
  }
}

Input Schema

NameRequiredDescriptionDefault
connectionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

With readOnlyHint, idempotentHint, and destructiveHint clearly set, the safety profile is already covered, and the description adds real context beyond that: the response shape (process, user, table, phase, duration, percent, raw counters), the empty-result behavior, and the important caveat that available pg_stat_progress_* views depend on the server version. That version-dependence disclosure is exactly the kind of behavior an agent cannot infer from annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with the verb and the operation list, then the result shape, then the use case. The enumeration is long but each item is informative; little waste, though the operation list could arguably be trimmed.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/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 does a decent job of describing the returned fields and the empty case, and it flags the version-dependency of the underlying views. However, it leaves the single input parameter completely unaddressed, which is a real gap for a tool the agent must call correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There is one parameter (connection) with null default and 0% schema description coverage, and the description says nothing about it. The only parameter is therefore entirely undocumented across both schema and prose, leaving the agent to guess what it accepts and whether omitting it is valid.

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 names a specific verb and resource ('Show long operations that are running now with their progress') and enumerates exactly which operations qualify (VACUUM, ANALYZE, CLUSTER/VACUUM FULL, CREATE INDEX/REINDEX, base backups, COPY, REPACK). It also names the data source (pg_stat_progress_* views), so an agent can distinguish it from siblings such as pg_activity or pg_locks without opening any schema.

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?

It gives a concrete usage scenario: use it to answer 'is it stuck or just slow?' for index builds and vacuums, and it notes the empty-result case ('when nothing is running it says so'). It stops short of explicit when-not guidance or naming an alternative tool for general session monitoring, which keeps it out of 5 territory.

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