Get Store Hierarchy
get_store_hierarchyMap store and website IDs by retrieving the Magento hierarchy of websites, store groups, and views with codes and names.
Instructions
Returns the Magento store hierarchy: websites, store groups, and store views with codes and names. Use to map store_id / website_id when querying scoped data.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| 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 |