Skip to main content
Glama

Extension report

pg_extension_report
Read-onlyIdempotent

Inspect an installed PostgreSQL extension to report its version, schema, created objects, settings, and extension-specific details such as indexes, jobs, or foreign tables.

Instructions

Report on one installed extension: version, schema, the objects it created (functions, types, tables, operators), its settings, and extension-specific facts.

Specific parts exist for pg_stat_statements (entries), pg_buffercache (cache summary), pg_trgm (trigram indexes), hypopg (hypothetical indexes), vector/pgvector (vector columns, hnsw and ivfflat indexes), postgis (version, geometry columns, SRID, spatial indexes), pg_cron (jobs and last runs), pg_partman (configured tables), pgaudit, postgres_fdw and dblink (servers, foreign tables, never user mapping options), pgstattuple, pgcrypto and timescaledb (hypertables). Any other extension gets the generic part. If the extension is not installed the error says how to install it; pg_extensions lists what exists.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "extension": "<extension>"
    },
    "name": "pg_extension_report"
  }
}

Input Schema

NameRequiredDescriptionDefault
extensionYes
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?

Annotations already declare readOnly, idempotent, non-destructive, closed-world behavior, so the safety profile is covered. The description adds real behavioral value beyond that: dispatch on extension name to extension-specific sub-reports, a generic fallback for unlisted extensions, and the fact that a not-installed extension yields an instructive error rather than an empty result.

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

Conciseness3/5

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

The opening sentence is well front-loaded and states the core purpose plus contents. The follow-up is a single long run-on sentence cataloguing ten extension names and their part types; each item is informative but the block is heavy and could be compressed (grouped or bulleted) without losing meaning.

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 takes on the job of describing return content and does so thoroughly — down to specific fields like SRID and hnsw/ivfflat indexes and a notable negative detail ('never user mapping options'). The main remaining gap is that argument semantics are not covered, which matters for a required parameter.

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?

Schema coverage is 0%, so the description must carry the parameter burden, and it only partially does: 'one installed extension' implies the `extension` argument is a single extension name but gives no format, case sensitivity, or qualified-name guidance. The `connection` parameter is never mentioned at all, leaving half the parameters undocumented in both schema and description.

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?

States a specific verb and resource ('Report on one installed extension') and immediately enumerates the report contents: version, schema, created objects, settings, extension-specific facts. It also distinguishes itself from the sibling that only enumerates availability ('pg_extensions lists what exists'), so an agent can choose between them without opening either 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?

Gives clear routing: use pg_extensions to see what exists, use this tool for a per-extension breakdown, and it explains the failure path when the extension is absent ('the error says how to install it'). It lacks an explicit negative case (e.g. don't use for cross-extension comparisons or aggregate statistics), which keeps it below a 5.

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