poolerConfig

Return a PgBouncer pooler's settings (SHOW CONFIG) and its version.

read-onlyany connectionsweeps groupcan return data values

Synopsis

poolerConfig([all], [pattern])

Description

Return a PgBouncer pooler's settings (SHOW CONFIG) and its version. By default only the settings that differ from PgBouncer's built-in default, which is the set describing this pooler: pool_mode, the pool sizes, the timeouts, max_client_conn. A number is compared as a number, so unix_socket_mode 511 is its default 0777. A setting PgBouncer gives no default -- conffile, auth_file -- has nothing to differ from and is returned under without_default with its value, not as a change.

File paths and user names appear as configured -- auth_file, admin_users, stats_users -- and never a password, which lives in the auth file rather than the configuration. Reads the admin console with SHOW commands only; see poolerStatus. Reads a PgBouncer admin console, not a database: 'connection' names a section with kind = pgbouncer, or a database section declaring pooler = <that section>, which is answered by its console about its own pool; 'group' asks every pooler carrying that label, one result each.

This operation can return values that came from your data. It never changes anything and never returns rows, but read what reaches the caller before connecting it to a database whose contents are sensitive.

Parameters

all optionalboolean
include settings still at their default; defaults to false
pattern optionalstring
only settings whose name contains this: a literal, case-insensitive substring, so _ and % match themselves and nothing is stemmed

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

Output

PgBouncer's settings, non-default unless all is set. An absent extension or a missing grant is reported as {error, hint} instead.

FieldType
allboolean | null
notestring | null
poolerstring | null
settingsobject | null
unavailableobject | null
versionstring | null
without_defaultobject | null

Example mocked data

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "poolerConfig",
    "arguments": {
      "connection": "pooler_prod",
      "pattern": "pool"
    }
  }
}

Result

{
  "version": "PgBouncer 1.25.2",
  "settings": {
    "default_pool_size": {
      "value": "40",
      "default": "20",
      "changeable": "yes"
    },
    "pool_mode": {
      "value": "transaction",
      "default": "session",
      "changeable": "yes"
    }
  },
  "all": false
}

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

poolerStatus, poolerConnections