listSchemas

Return schema list with basic summaries: table_count, up to 25 table names, and role grants per schema.

read-onlyany connectionsweeps instancesweeps group

Synopsis

listSchemas()

Description

Return schema list with basic summaries: table_count, up to 25 table names, and role grants per schema. tables_truncated says when a schema holds more than the names shown -- listTables is the tool that names every relation in one schema, and it takes one schema at a time so its size stays bounded by the caller.

Parameters

None of its own.

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

Output

Keyed by schema name; each value is that schema's tables, views and role grants. 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": "listSchemas",
    "arguments": {
      "connection": "shop_prod"
    }
  }
}

Result

{
  "shop": {
    "table_count": 3,
    "tables": [
      "customers",
      "order_items",
      "orders"
    ],
    "tables_truncated": false,
    "roles": {
      "app_rw": [
        "USAGE"
      ],
      "reporting": [
        "USAGE"
      ]
    }
  },
  "audit": {
    "table_count": 1,
    "tables": [
      "events"
    ],
    "tables_truncated": false,
    "roles": {
      "auditor": [
        "USAGE"
      ]
    }
  }
}

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

listTables, tableDetails, tableStats, largeObjects, listPartitions, partitionDetails, listTableStats, tableSize, listTableSizes, listFunctions, functionDetails, listEnums, enumDetails, listTypes, typeDetails, columnHistogram, listExtendedStatistics, listSequences