List indexes
list_indexesList indexes on a PostgreSQL table to retrieve their name, method, definition, and partitioning status for performance analysis.
Instructions
List the indexes defined on a table. Returns a list of objects with name, method (btree / gin / gist / brin / hash / spgist / hnsw / ivfflat / …), definition (the CREATE INDEX statement), and partitioned.
Example: list_indexes(schema='public', table='users')
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | ||
| schema | Yes | ||
| database | No | Optional: target a configured secondary (read-only) database by name; omit for the primary. Call list_databases to see the configured ids. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |