Skip to main content
Glama

List extensions

pg_extensions
Read-onlyIdempotent

Lists installed and installable PostgreSQL extensions, with versions, schemas, upgrade options, and superuser requirements. Use it to see database capabilities and missing extensions.

Instructions

List the extensions installed in this database (version, schema, whether a newer version can be installed with ALTER EXTENSION ... UPDATE, comment) and the ones the server could install with CREATE EXTENSION.

Use it to see what a database can do (pg_stat_statements, PostGIS, pgvector, pg_cron...) and what is missing. pattern filters by name (* wildcard); only_installed skips the available list. For the available ones it says whether installing needs a superuser (trusted extensions, PostgreSQL 13+, only need CREATE on the database). pg_extension_report describes one installed extension.

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_extensions"
  }
}

Input Schema

NameRequiredDescriptionDefault
patternNo
connectionNo
only_installedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, non-destructive, closed-world, so the description is free to add substantive context: what the result set contains, that installing trusted extensions on PG13+ only needs CREATE on the database, and that ALTER EXTENSION ... UPDATE availability is reported. No mention of result size or pagination for a potentially long listing.

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?

Front-loads the return content, then usage, then parameter effects, then the sibling pointer — a sensible order with little filler. The first sentence is long and parenthetical, but every clause carries information about what is returned.

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 no output schema and zero schema description coverage, the description carries the full burden and does so: it enumerates returned fields, explains both meaningful parameters, and covers the privilege nuance for the available list. Nothing essential to calling it correctly is missing.

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 coverage is 0%, so the description must compensate, and it does for two of three parameters: `pattern` is documented as a name filter with `*` wildcard syntax, and `only_installed` as skipping the available list. The `connection` parameter is left unexplained, presumably a convention shared across the server.

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 ('List the extensions installed in this database') and enumerates the returned fields (version, schema, update availability, comment) plus the available-but-not-installed set. It is immediately distinguishable from pg_extension_report, which is named as the single-extension variant.

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 concrete usage contexts ('see what a database can do ... and what is missing') and routes the single-extension case to pg_extension_report. It also explains when to set only_installed. It lacks an explicit when-not statement, but the alternative is named clearly enough for selection.

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