listSubscriptions

Return logical replication subscriptions for the current database with owner, enabled status, publications, slot name, and sync settings (never exposes the connection string, which may contain credentials).

read-onlyany connectionsweeps instancesweeps group

Synopsis

listSubscriptions()

Description

Return logical replication subscriptions for the current database with owner, enabled status, publications, slot name, and sync settings (never exposes the connection string, which may contain credentials). Structure only -- what CREATE SUBSCRIPTION declared. For whether the subscriber is actually keeping up call subscriptionStats.

Parameters

None of its own.

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

Output

Keyed by subscription name; each value is its publication, slot and state. 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": "listSubscriptions",
    "arguments": {}
  }
}

Result

{
  "from_erp": {
    "owner": "migrator",
    "enabled": true,
    "publications": [
      "erp_invoices"
    ],
    "slot_name": "from_erp",
    "synchronous_commit": "off",
    "binary": false,
    "stream": "parallel",
    "two_phase": "disabled",
    "disable_on_error": false,
    "origin": "any",
    "run_as_owner": false,
    "failover": 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

replicationStats, listForeignTables, listForeignServers, listPublications, subscriptionStats, replicationSlots