Why This Matters
many SQL tools repeat the same wrapper pattern: resolve config, call integration helper, attach optional warning, return dict.
Read First
app/tools/AzureSQLCurrentQueriesTool/__init__.py
app/tools/AzureSQLSlowQueriesTool/__init__.py
app/tools/PostgreSQLCurrentQueriesTool/__init__.py
app/tools/PostgreSQLSlowQueriesTool/__init__.py
app/tools/MySQLCurrentProcessesTool/__init__.py
app/tools/MariaDBProcessListTool/__init__.py
Scope
- Add one small wrapper helper under
app/tools/utils/ for the repeated "default DB + call + warning injection" flow.
- Migrate only the six tools above in the first pass.
- Leave vendor-specific config builders and query functions where they are.
Tests / Coverage
- keep the existing six tool test modules green
- add one helper test proving the wrapper preserves returned dicts
- add one regression test for warning injection after the wrapped call
Acceptance Criteria
- the repeated wrapper logic exists in one place
- tool names, schemas, and output keys stay unchanged
- the scope stays limited to the six listed tools
Why This Matters
many SQL tools repeat the same wrapper pattern: resolve config, call integration helper, attach optional warning, return dict.
Read First
app/tools/AzureSQLCurrentQueriesTool/__init__.pyapp/tools/AzureSQLSlowQueriesTool/__init__.pyapp/tools/PostgreSQLCurrentQueriesTool/__init__.pyapp/tools/PostgreSQLSlowQueriesTool/__init__.pyapp/tools/MySQLCurrentProcessesTool/__init__.pyapp/tools/MariaDBProcessListTool/__init__.pyScope
app/tools/utils/for the repeated "default DB + call + warning injection" flow.Tests / Coverage
Acceptance Criteria