Get Connection Status
get_connection_statusTests database connectivity for the active Magento SQL profile, returning host, database, latency, and error details. Use it to verify connection before running queries on an unfamiliar environment.
Instructions
Tests database connectivity for the active MAGENTO_SQL_PROFILE. Returns host, database, latency, and error details if unreachable. Use before running queries on an unfamiliar environment.
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 |
|---|---|---|---|
| host | Yes | ||
| port | Yes | ||
| user | Yes | ||
| error | No | ||
| profile | Yes | ||
| database | Yes | ||
| connected | Yes | ||
| latencyMs | No | ||
| magentoRoot | Yes |