List indexes
list_indexesRetrieve all indexes defined on a PostgreSQL table, including index method, creation statement, and partitioning status.
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 |