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
listOperatorClasses(schema)
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.
Also accepts connection, instance, group, described once under arguments every tool takes.
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.
A physical replica is byte-identical here, so asking each member of a replication group adds nothing.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "listOperatorClasses",
"arguments": {
"schema": "shop"
}
}
}
{
"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.