Problem
sql_execute tool fails with:
core7.getStatementTypes is not a function. (In ?, ? is undefined)
36 occurrences observed in a single day across multiple sessions.
Impact
- Users attempting to execute SQL queries hit this error silently
- The function
getStatementTypes is being called on an object (core7) where it is either undefined or not yet initialized
- This suggests a race condition in module loading, or a version mismatch where
core7 doesn't expose getStatementTypes
Suggested investigation
- Check where
core7.getStatementTypes is called in the sql_execute tool path
- Verify
core7 is properly initialized before getStatementTypes is invoked
- Check if this is version-specific — could be a regression in a recent CLI release
- Add defensive check:
if (typeof core7?.getStatementTypes !== 'function') with a clear error message