List views with definitions
pg_list_viewsGet views and materialized views in a schema with their SQL definitions. Specify schema name to filter; includes materialized views by default.
Instructions
List views and materialized views in a schema with their SQL definitions. Use this over pg_list_tables with includeViews: true when you want the view body, not just names.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "pg_list_views"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schema | No | Schema name (defaults to 'public'). | public |
| includeMaterialized | No | If true, include materialized views. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes |