Find Product by SKU
find_product_by_skuRetrieve core product details by SKU, including entity ID, type, attribute set, and timestamps from Magento.
Instructions
Looks up catalog_product_entity by SKU. Returns entity_id, type_id, attribute_set_id, timestamps. For EAV attribute values use execute_select_query on catalog_product_entity_* tables — use get_eav_attribute first to find backend_type.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sku | Yes | Product SKU. Use find_product_by_sku instead of guessing EAV table joins. | |
| 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 |