Skip to main content
Glama
MCPg - Production-grade PostgreSQL MCP Server

MCPg - Production-grade PostgreSQL MCP Server

List resource groups

list_resource_groups
Read-only

Lists configured WarehousePG resource groups with CPU, memory, concurrency, running, and queued workload metrics to diagnose workload bottlenecks. Read-only; unavailable on vanilla PostgreSQL.

Instructions

List configured WarehousePG resource groups + their utilisation. Reads gp_toolkit.gp_resgroup_status for concurrency, cpu_max_percent, cpu_weight, memory_limit, memory_shared_quota, plus live num_running / num_queueing. Pairs with analyze_workload for 'where's my workload time going' diagnosis. Read-only. On vanilla PG returns available=false.

Example: list_resource_groups()

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": "list_resource_groups"
  }
}

Input Schema

NameRequiredDescriptionDefault
databaseNoOptional: a database id from list_databases, to target a configured secondary (read-only) database; omit for the primary. Database names that are not configured ids are rejected.

Output Schema

NameRequiredDescriptionDefault
detailYes
groupsYes
availableYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.8.4
    • changedInput schema / properties / database / description
      Previous value: -"Optional: target a configured secondary (read-only) database by name; omit for the primary. Call list_databases to see the configured ids."New value: +"Optional: a database id from list_databases, to target a configured secondary (read-only) database; omit for the primary. Database names that are not configured ids are rejected."
  2. First observedv0.6.8

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, and the description reinforces 'Read-only' while adding real substance beyond them: the underlying source view (`gp_toolkit.gp_resgroup_status`), the specific columns read, live counters, and graceful degradation to `available=false` on vanilla PG. That degradation behavior is exactly the kind of non-obvious trait an agent needs; only missing details are cost/latency and any privilege requirements.

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?

Purpose and payload are front-loaded in the first sentence, with behavioral caveats following. Dense but each clause carries information; the trailing `Example: list_resource_groups()` is largely redundant for a zero-required-argument call, which is the only real waste.

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?

With an output schema present (so return shape needn't be described), full annotation coverage, and a fully documented single parameter, the description supplies everything else an agent needs: what it lists, where the data comes from, how it degrades on non-WarehousePG, and which tool to combine it with.

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

Parameters3/5

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

There is a single optional `database` parameter whose schema description is already complete (100% coverage, explaining it targets a configured secondary read-only database and that non-id names are rejected). The description adds nothing about this parameter, so the baseline 3 applies — the schema does all the work.

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 states a specific verb and resource ('List configured WarehousePG resource groups') and immediately scopes the payload ('+ their utilisation'), then enumerates the exact metrics returned. No sibling tool covers resource groups, and the WarehousePG qualifier prevents confusion with generic PG listing tools like list_databases or list_roles.

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 an explicit pairing ('Pairs with `analyze_workload` for where's-my-workload-time-going diagnosis'), which tells the agent the diagnostic workflow this belongs to, and warns that on vanilla PG it returns `available=false` — an implicit when-not-applicable condition. It stops short of naming a direct alternative or stating prerequisites (e.g. extension installed) outright.

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

Deploy Server

Other Tools