listOperatorClasses

Return operator classes in a schema with their index access method, input type, and default flag; describes what index types (btree/gist/gin/etc) a type supports.

read-onlyany connectionsweeps instancesweeps group

Synopsis

listOperatorClasses(schema)

Description

Return operator classes in a schema with their index access method, input type, and default flag; describes what index types (btree/gist/gin/etc) a type supports.

Parameters

schema requiredstring

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

Output

Keyed by opclass name and access method; each value is its input type and default flag. 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": "listOperatorClasses",
    "arguments": {
      "schema": "shop"
    }
  }
}

Result

{
  "money_amount_ops (btree)": {
    "access_method": "btree",
    "input_type": "money_amount",
    "default": true,
    "description": null
  }
}

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

listCollations, listOperators, listTextSearchConfigs