Get Table Indexes
get_table_indexesRetrieves index definitions for any Magento table to identify lookup paths and optimize query performance.
Instructions
Returns index definitions for a Magento table (SHOW INDEX). Useful for optimizing queries and understanding lookup paths. Use describe_table for column-level details.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | Magento database table name (e.g. sales_order, catalog_product_entity). | |
| profile | No | Override the MAGENTO_SQL_PROFILE env var for this call only. Use list_connection_profiles to see available names. | |
| magentoRoot | No | Absolute path to the Magento root (must contain app/etc/env.php). Defaults to MAGENTO_ROOT env var or auto-discovery. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| rows | Yes | ||
| sampled | No | ||
| rowCount | Yes | ||
| truncated | No |