Read a system view
pg_stat_viewRead system views and catalog tables from pg_catalog or information_schema by name, including views without a dedicated tool or added by newer PostgreSQL versions.
Instructions
Read any system view or catalog table from pg_catalog or information_schema by name, for example pg_stat_user_functions, pg_stat_slru, pg_stat_ssl, pg_prepared_xacts, pg_stat_wal, pg_stat_replication or pg_replication_slots.
Use it for everything that has no dedicated tool, and for views added by newer
PostgreSQL versions. view is name or schema.name; columns selects columns (all by
default); order_by sorts by a column, largest first unless descending=false. Names
are checked against the real columns on this server. Catalogs that hold credentials
(pg_authid, pg_shadow, pg_user_mapping...) are refused.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"view": "<view>"
},
"name": "pg_stat_view"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| view | Yes | ||
| limit | No | ||
| columns | No | ||
| order_by | No | ||
| connection | No | ||
| descending | No |