listExtensions

Return installed PostgreSQL extensions with version, schema, relocatable flag, and description.

read-onlyany connectionsweeps instancesweeps group

Synopsis

listExtensions([available])

Description

Return installed PostgreSQL extensions with version, schema, relocatable flag, and description. With available: true, also the extensions whose files are on the server but which are not created in this database (from pg_available_extensions), each entry then carrying installed: true or false and default_version, the version CREATE EXTENSION would install -- which says whether an extension a plan needs is one command away or needs a package first.

Parameters

available optionalboolean
also list extensions that are available on the server and not installed in this database, and mark every entry installed: true or false. Defaults to false, which returns installed extensions only

Also accepts connection, instance, group, described once under arguments every tool takes.

Output

Keyed by extension name; each value is its version and installation schema. An absent extension or a missing grant is reported as {error, hint} in place of the map.

Scope

A physical replica is byte-identical here, so asking each member of a replication group adds nothing.

Example mocked data

Request

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

Result

{
  "pg_stat_statements": {
    "version": "1.11",
    "schema": "extensions",
    "relocatable": true,
    "description": "track planning and execution statistics of all SQL statements executed"
  },
  "hypopg": {
    "version": "1.4.1",
    "schema": "extensions",
    "relocatable": true,
    "description": "Hypothetical indexes for PostgreSQL"
  }
}

Invented values on a fictional shop database, shaped by and checked against this tool's output schema. Real output is returned as structuredContent to clients that negotiate MCP 2025-06-18 or later.

See also

listRoles, listTablespaces, listEventTriggers, listLanguages, listAccessMethods, listCasts