@berthojoris/mcp-mysql-server 1.33.5 → 1.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,36 @@ All notable changes to the MySQL MCP Server will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.35.0] - 2026-03-04
9
+
10
+ ### Removed
11
+ - Removed AI enhancement category (`ai_enhancement`) and 16 AI tools from MCP exposure and runtime routing.
12
+ - Removed AI enhancement tool modules: intelligent query assistant, smart discovery, documentation generator, schema design, security audit, index recommendation, test data generation, schema pattern analysis, query visualization, and forecasting tools.
13
+
14
+ ### Changed
15
+ - Updated category filtering config by removing `DocCategory.AI_ENHANCEMENT` and related mappings.
16
+ - Updated README.md and DOCUMENTATIONS.md tool/category listings and totals (150 → 134 tools).
17
+ - Bumped package version to `1.35.0`.
18
+
19
+ ## [1.34.0] - 2026-03-04
20
+
21
+ ### Removed
22
+ - **REST API Server**: Removed `src/server.ts` and all REST API functionality to reduce bundle size and simplify the codebase
23
+ - Removed unused dependencies: `express`, `cors`, `helmet`, `morgan`, `express-rate-limit`, `jsonwebtoken`
24
+ - Removed unused devDependencies: `@types/cors`, `@types/express`, `@types/helmet`, `@types/morgan`, `@types/jsonwebtoken`
25
+ - Removed npm scripts: `start:mcp`, `start:api`, `dev:mcp`, `dev:api` (consolidated to `start` and `dev`)
26
+ - This reduces the package size and attack surface, focusing purely on MCP protocol via stdio
27
+
28
+ ### Changed
29
+ - Simplified npm scripts: `start` now runs `mcp-server.js`, `dev` now runs `mcp-server.ts`
30
+
31
+ ## [1.33.6] - 2026-01-25
32
+
33
+ ### Documentation
34
+ - **Added `"type": "stdio"` to all configuration examples**: Some MCP clients (like Droid CLI, Factory) require explicit `"type": "stdio"` in the configuration to establish proper connection
35
+ - Updated README.md and DOCUMENTATIONS.md with the required `type` field in all JSON config examples
36
+ - This fixes "disconnected" status issues when using the MCP server with certain AI agent clients
37
+
8
38
  ## [1.33.5] - 2026-01-25
9
39
 
10
40
  ### Fixed
package/DOCUMENTATIONS.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # MySQL MCP Server - Documentation
2
2
 
3
- **Last Updated:** 2026-01-25 11:30:00
4
- **Version:** 1.33.5
5
- **Total Tools:** 150
3
+ **Last Updated:** 2026-03-04 12:00:00
4
+ **Version:** 1.35.0
5
+ **Total Tools:** 134
6
6
 
7
7
  Comprehensive documentation for the MySQL MCP Server. For quick start, see [README.md](README.md).
8
8
 
@@ -31,6 +31,7 @@ Configure MySQL MCP with two access-control layers:
31
31
  "mcpServers": {
32
32
  "mysql": {
33
33
  "command": "npx",
34
+ "type": "stdio",
34
35
  "args": [
35
36
  "-y",
36
37
  "@berthojoris/mcp-mysql-server",
@@ -270,24 +271,6 @@ Tool enabled = (Has Permission) AND (Has Category OR No categories specified)
270
271
  - `reset_failed_migration` - Reset a failed migration
271
272
  - `generate_migration_from_diff` - Generate migration from schema diff
272
273
 
273
- ### 24. AI Enhancement (16 tools)
274
- - `build_query_from_intent` - Convert natural language to SQL
275
- - `suggest_query_improvements` - Suggest query optimizations
276
- - `smart_search` - Semantic search for tables, columns, data
277
- - `find_similar_columns` - Find columns similar to a given column
278
- - `discover_data_patterns` - Discover data patterns in tables
279
- - `generate_documentation` - Generate database documentation
280
- - `generate_data_dictionary` - Generate data dictionary for tables
281
- - `generate_business_glossary` - Generate business glossary
282
- - `design_schema_from_requirements` - Design schema from requirements
283
- - `audit_database_security` - Audit database security
284
- - `recommend_indexes` - Recommend indexes for optimization
285
- - `generate_test_data` - Generate test data for tables
286
- - `analyze_schema_patterns` - Analyze schema design patterns
287
- - `visualize_query` - Visualize query execution plan
288
- - `predict_query_performance` - Predict query performance
289
- - `forecast_database_growth` - Forecast database growth
290
-
291
274
  ---
292
275
 
293
276
  ## Core Operations
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  **A production-ready Model Context Protocol (MCP) server for MySQL database integration with AI agents**
6
6
 
7
- **Last Updated:** 2026-01-25 11:30:00
7
+ **Last Updated:** 2026-03-04 12:00:00
8
8
 
9
9
  [![npm version](https://img.shields.io/npm/v/@berthojoris/mcp-mysql-server)](https://www.npmjs.com/package/@berthojoris/mcp-mysql-server)
10
10
  [![npm downloads](https://img.shields.io/npm/dm/@berthojoris/mcp-mysql-server)](https://www.npmjs.com/package/@berthojoris/mcp-mysql-server)
@@ -33,6 +33,7 @@ Add to your AI agent config (`.mcp.json`, `.cursor/mcp.json`, etc.):
33
33
  "mcpServers": {
34
34
  "mysql": {
35
35
  "command": "npx",
36
+ "type": "stdio",
36
37
  "args": [
37
38
  "-y",
38
39
  "@berthojoris/mcp-mysql-server",
@@ -124,6 +125,7 @@ If you want ready-to-copy snippets per client (Claude Code/Cursor/Windsurf/Cline
124
125
  "mcpServers": {
125
126
  "mysql": {
126
127
  "command": "npx",
128
+ "type": "stdio",
127
129
  "args": [
128
130
  "-y",
129
131
  "@berthojoris/mcp-mysql-server",
@@ -141,6 +143,7 @@ If you want ready-to-copy snippets per client (Claude Code/Cursor/Windsurf/Cline
141
143
  "mcpServers": {
142
144
  "mysql": {
143
145
  "command": "npx",
146
+ "type": "stdio",
144
147
  "args": [
145
148
  "-y",
146
149
  "@berthojoris/mcp-mysql-server",
@@ -166,6 +169,7 @@ Alternative approach using environment variables instead of connection string:
166
169
  "mcpServers": {
167
170
  "mysql": {
168
171
  "command": "npx",
172
+ "type": "stdio",
169
173
  "args": ["-y", "@berthojoris/mcp-mysql-server"],
170
174
  "env": {
171
175
  "DB_HOST": "localhost",
@@ -187,6 +191,7 @@ Alternative approach using environment variables instead of connection string:
187
191
  "mcpServers": {
188
192
  "mysql": {
189
193
  "command": "npx",
194
+ "type": "stdio",
190
195
  "args": ["-y", "@berthojoris/mcp-mysql-server"],
191
196
  "env": {
192
197
  "DB_HOST": "localhost",
@@ -263,13 +268,12 @@ Use documentation categories to fine-tune which tools are exposed (Layer 2):
263
268
  | `data_migration` | Migrate data between databases or systems | `clone_table, compare_table_structure, copy_table_data, move_table_data, sync_table_data` |
264
269
  | `schema_migrations` | Version control for database schema changes | `apply_migrations, create_migration, generate_migration_from_diff, get_migration_status, get_schema_version, init_migrations_table, reset_failed_migration, rollback_migration, validate_migrations` |
265
270
  | `analysis` | Data analysis and reporting tools | `get_column_statistics, get_database_summary, get_schema_erd, get_schema_rag_context` |
266
- | `ai_enhancement` | AI-powered features and smart automation | `analyze_schema_patterns, audit_database_security, build_query_from_intent, design_schema_from_requirements, discover_data_patterns, find_similar_columns, forecast_database_growth, generate_business_glossary, generate_data_dictionary, generate_documentation, generate_test_data, predict_query_performance, recommend_indexes, smart_search, suggest_query_improvements, visualize_query` |
267
271
 
268
272
  <details>
269
273
  <summary>Copy/paste list (comma-separated, no spaces)</summary>
270
274
 
271
275
  ```text
272
- database_discovery,crud_operations,bulk_operations,custom_queries,schema_management,utilities,transaction_management,stored_procedures,views_management,triggers_management,functions_management,index_management,constraint_management,table_maintenance,server_management,performance_monitoring,cache_management,query_optimization,backup_restore,import_export,data_migration,schema_migrations,analysis,ai_enhancement
276
+ database_discovery,crud_operations,bulk_operations,custom_queries,schema_management,utilities,transaction_management,stored_procedures,views_management,triggers_management,functions_management,index_management,constraint_management,table_maintenance,server_management,performance_monitoring,cache_management,query_optimization,backup_restore,import_export,data_migration,schema_migrations,analysis
273
277
  ```
274
278
 
275
279
  </details>
@@ -280,14 +284,9 @@ Full category → tool mapping (and examples) lives in **[DOCUMENTATIONS.md →
280
284
 
281
285
  ## Available Tools
282
286
 
283
- The server exposes **150 tools** organized into categories (CRUD, schema, backups, migrations, perf/monitoring, and AI enhancement).
287
+ The server exposes **134 tools** organized into categories (CRUD, schema, backups, migrations, and perf/monitoring).
284
288
 
285
289
  - Complete list of tools: **[DOCUMENTATIONS.md → Complete Tools Reference](DOCUMENTATIONS.md#🔧-complete-tools-reference)**
286
- - AI enhancement tools overview: **[DOCUMENTATIONS.md → AI Enhancement Tools](DOCUMENTATIONS.md#🤖-ai-enhancement-tools)**
287
-
288
- ### 🤖 AI Enhancement Tools
289
-
290
- The full **Phase 1–3 (implemented)** overview, examples, and per-tool documentation lives in **[DOCUMENTATIONS.md](DOCUMENTATIONS.md#🤖-ai-enhancement-tools)**.
291
290
 
292
291
  ---
293
292
 
@@ -303,7 +302,6 @@ For comprehensive documentation, see **[DOCUMENTATIONS.md](DOCUMENTATIONS.md)**:
303
302
  - **Schema Versioning** - Version control for database schema changes
304
303
  - **Transaction Management** - ACID transactions
305
304
  - **Stored Procedures** - Create and execute with IN/OUT/INOUT parameters
306
- - **🤖 AI Enhancement** - Natural language to SQL, smart data discovery, schema design, security audit, index recommendations, data generation, visualization, and forecasting (Phase 1-3)
307
305
  - **Query Logging** - See all SQL queries executed automatically
308
306
  - **Security Features** - Built-in security and best practices
309
307
  - **Bulk Operations** - High-performance batch processing
@@ -40,8 +40,7 @@ export declare enum DocCategory {
40
40
  IMPORT_EXPORT = "import_export",
41
41
  DATA_MIGRATION = "data_migration",
42
42
  SCHEMA_MIGRATIONS = "schema_migrations",
43
- ANALYSIS = "analysis",
44
- AI_ENHANCEMENT = "ai_enhancement"
43
+ ANALYSIS = "analysis"
45
44
  }
46
45
  /**
47
46
  * Map of tool names to their legacy categories
@@ -52,7 +52,6 @@ var DocCategory;
52
52
  DocCategory["DATA_MIGRATION"] = "data_migration";
53
53
  DocCategory["SCHEMA_MIGRATIONS"] = "schema_migrations";
54
54
  DocCategory["ANALYSIS"] = "analysis";
55
- DocCategory["AI_ENHANCEMENT"] = "ai_enhancement";
56
55
  })(DocCategory || (exports.DocCategory = DocCategory = {}));
57
56
  /**
58
57
  * Map of tool names to their legacy categories
@@ -198,25 +197,6 @@ exports.toolCategoryMap = {
198
197
  getConnectionPoolStats: ToolCategory.UTILITY,
199
198
  getDatabaseHealthCheck: ToolCategory.UTILITY,
200
199
  resetPerformanceStats: ToolCategory.UTILITY,
201
- // Phase 1: AI Enhancement Tools
202
- buildQueryFromIntent: ToolCategory.READ,
203
- suggestQueryImprovements: ToolCategory.UTILITY,
204
- smartSearch: ToolCategory.LIST,
205
- findSimilarColumns: ToolCategory.LIST,
206
- discoverDataPatterns: ToolCategory.READ,
207
- generateDocumentation: ToolCategory.UTILITY,
208
- generateDataDictionary: ToolCategory.UTILITY,
209
- generateBusinessGlossary: ToolCategory.UTILITY,
210
- // Phase 2: AI Enhancement Tools
211
- designSchemaFromRequirements: ToolCategory.UTILITY,
212
- auditDatabaseSecurity: ToolCategory.UTILITY,
213
- recommendIndexes: ToolCategory.UTILITY,
214
- // Phase 3: AI Enhancement Tools
215
- generateTestData: ToolCategory.UTILITY,
216
- analyzeSchemaPatterns: ToolCategory.UTILITY,
217
- visualizeQuery: ToolCategory.UTILITY,
218
- predictQueryPerformance: ToolCategory.UTILITY,
219
- forecastDatabaseGrowth: ToolCategory.UTILITY,
220
200
  // Full-Text Search Tools
221
201
  createFulltextIndex: ToolCategory.DDL,
222
202
  fulltextSearch: ToolCategory.READ,
@@ -379,25 +359,6 @@ exports.toolDocCategoryMap = {
379
359
  getSchemaERD: DocCategory.ANALYSIS,
380
360
  getColumnStatistics: DocCategory.ANALYSIS,
381
361
  getSchemaRagContext: DocCategory.ANALYSIS,
382
- // Phase 1: AI Enhancement
383
- buildQueryFromIntent: DocCategory.AI_ENHANCEMENT,
384
- suggestQueryImprovements: DocCategory.AI_ENHANCEMENT,
385
- smartSearch: DocCategory.AI_ENHANCEMENT,
386
- findSimilarColumns: DocCategory.AI_ENHANCEMENT,
387
- discoverDataPatterns: DocCategory.AI_ENHANCEMENT,
388
- generateDocumentation: DocCategory.AI_ENHANCEMENT,
389
- generateDataDictionary: DocCategory.AI_ENHANCEMENT,
390
- generateBusinessGlossary: DocCategory.AI_ENHANCEMENT,
391
- // Phase 2: AI Enhancement
392
- designSchemaFromRequirements: DocCategory.AI_ENHANCEMENT,
393
- auditDatabaseSecurity: DocCategory.AI_ENHANCEMENT,
394
- recommendIndexes: DocCategory.AI_ENHANCEMENT,
395
- // Phase 3: AI Enhancement
396
- generateTestData: DocCategory.AI_ENHANCEMENT,
397
- analyzeSchemaPatterns: DocCategory.AI_ENHANCEMENT,
398
- visualizeQuery: DocCategory.AI_ENHANCEMENT,
399
- predictQueryPerformance: DocCategory.AI_ENHANCEMENT,
400
- forecastDatabaseGrowth: DocCategory.AI_ENHANCEMENT,
401
362
  // Full-Text Search
402
363
  createFulltextIndex: DocCategory.INDEX_MANAGEMENT,
403
364
  fulltextSearch: DocCategory.INDEX_MANAGEMENT,
package/dist/index.d.ts CHANGED
@@ -25,16 +25,6 @@ export declare class MySQLMCP {
25
25
  private analysisTools;
26
26
  private aiTools;
27
27
  private macroTools;
28
- private intelligentQueryTools;
29
- private smartDiscoveryTools;
30
- private documentationGeneratorTools;
31
- private schemaDesignTools;
32
- private securityAuditTools;
33
- private indexRecommendationTools;
34
- private testDataTools;
35
- private schemaPatternTools;
36
- private queryVisualizationTools;
37
- private forecastingTools;
38
28
  private smartQueryBuilderTools;
39
29
  private fulltextSearchTools;
40
30
  private security;
@@ -1192,387 +1182,6 @@ export declare class MySQLMCP {
1192
1182
  message?: string;
1193
1183
  error?: string;
1194
1184
  }>;
1195
- buildQueryFromIntent(params: {
1196
- natural_language: string;
1197
- context?: "analytics" | "reporting" | "data_entry" | "schema_exploration";
1198
- max_complexity?: "simple" | "medium" | "complex";
1199
- safety_level?: "strict" | "moderate" | "permissive";
1200
- database?: string;
1201
- }): Promise<{
1202
- status: string;
1203
- data?: {
1204
- generated_sql: string;
1205
- explanation: string;
1206
- tables_involved: string[];
1207
- columns_involved: string[];
1208
- estimated_complexity: string;
1209
- safety_notes: string[];
1210
- optimization_hints: string[];
1211
- alternatives?: string[];
1212
- };
1213
- error?: string;
1214
- }>;
1215
- suggestQueryImprovements(params: {
1216
- query: string;
1217
- optimization_goal?: "speed" | "memory" | "readability";
1218
- database?: string;
1219
- }): Promise<{
1220
- status: string;
1221
- data?: {
1222
- original_query: string;
1223
- suggestions: Array<{
1224
- type: string;
1225
- description: string;
1226
- improved_query?: string;
1227
- }>;
1228
- estimated_improvement: string;
1229
- };
1230
- error?: string;
1231
- }>;
1232
- smartSearch(params: {
1233
- search_term: string;
1234
- search_type?: "column" | "table" | "data_pattern" | "relationship" | "all";
1235
- similarity_threshold?: number;
1236
- include_sample_data?: boolean;
1237
- max_results?: number;
1238
- database?: string;
1239
- }): Promise<{
1240
- status: string;
1241
- data?: {
1242
- search_term: string;
1243
- search_type: string;
1244
- results: {
1245
- tables: Array<{
1246
- name: string;
1247
- relevance_score: number;
1248
- match_reason: string;
1249
- column_count: number;
1250
- row_estimate: number;
1251
- matching_columns?: string[];
1252
- }>;
1253
- columns: Array<{
1254
- table_name: string;
1255
- column_name: string;
1256
- data_type: string;
1257
- relevance_score: number;
1258
- match_reason: string;
1259
- sample_values?: any[];
1260
- }>;
1261
- data_patterns: Array<{
1262
- table_name: string;
1263
- column_name: string;
1264
- pattern_type: string;
1265
- description: string;
1266
- sample_matches?: any[];
1267
- }>;
1268
- relationships: Array<{
1269
- from_table: string;
1270
- from_column: string;
1271
- to_table: string;
1272
- to_column: string;
1273
- relationship_type: string;
1274
- confidence: number;
1275
- }>;
1276
- };
1277
- total_matches: number;
1278
- search_time_ms: number;
1279
- };
1280
- error?: string;
1281
- }>;
1282
- findSimilarColumns(params: {
1283
- column_name?: string;
1284
- table_name?: string;
1285
- include_data_comparison?: boolean;
1286
- max_results?: number;
1287
- database?: string;
1288
- }): Promise<{
1289
- status: string;
1290
- data?: {
1291
- reference_column?: {
1292
- table: string;
1293
- column: string;
1294
- data_type: string;
1295
- };
1296
- similar_columns: Array<{
1297
- table_name: string;
1298
- column_name: string;
1299
- data_type: string;
1300
- similarity_score: number;
1301
- similarity_type: string;
1302
- data_overlap_percentage?: number;
1303
- }>;
1304
- potential_joins: Array<{
1305
- table1: string;
1306
- column1: string;
1307
- table2: string;
1308
- column2: string;
1309
- confidence: number;
1310
- reason: string;
1311
- }>;
1312
- };
1313
- error?: string;
1314
- }>;
1315
- discoverDataPatterns(params: {
1316
- table_name: string;
1317
- pattern_types?: Array<"unique" | "null" | "duplicate" | "format" | "range">;
1318
- max_columns?: number;
1319
- database?: string;
1320
- }): Promise<{
1321
- status: string;
1322
- data?: {
1323
- table_name: string;
1324
- patterns: Array<{
1325
- column_name: string;
1326
- pattern_type: string;
1327
- description: string;
1328
- metrics?: Record<string, any>;
1329
- recommendations?: string[];
1330
- }>;
1331
- summary: {
1332
- columns_analyzed: number;
1333
- patterns_found: number;
1334
- data_quality_score: number;
1335
- };
1336
- };
1337
- error?: string;
1338
- }>;
1339
- generateDocumentation(params: {
1340
- scope?: "database" | "table" | "column" | "relationship";
1341
- table_name?: string;
1342
- include_business_glossary?: boolean;
1343
- format?: "markdown" | "html" | "json";
1344
- include_examples?: boolean;
1345
- include_statistics?: boolean;
1346
- database?: string;
1347
- }): Promise<{
1348
- status: string;
1349
- data?: {
1350
- format: string;
1351
- scope: string;
1352
- content: string;
1353
- metadata: {
1354
- generated_at: string;
1355
- database: string;
1356
- tables_documented: number;
1357
- columns_documented: number;
1358
- };
1359
- };
1360
- error?: string;
1361
- }>;
1362
- generateDataDictionary(params: {
1363
- table_name: string;
1364
- include_sample_values?: boolean;
1365
- include_constraints?: boolean;
1366
- database?: string;
1367
- }): Promise<{
1368
- status: string;
1369
- data?: {
1370
- table_name: string;
1371
- description: string;
1372
- columns: Array<{
1373
- name: string;
1374
- data_type: string;
1375
- description: string;
1376
- constraints: string[];
1377
- is_nullable: boolean;
1378
- default_value: string | null;
1379
- sample_values?: any[];
1380
- business_term?: string;
1381
- }>;
1382
- primary_key: string[];
1383
- foreign_keys: Array<{
1384
- column: string;
1385
- references_table: string;
1386
- references_column: string;
1387
- }>;
1388
- indexes: Array<{
1389
- name: string;
1390
- columns: string[];
1391
- is_unique: boolean;
1392
- }>;
1393
- };
1394
- error?: string;
1395
- }>;
1396
- generateBusinessGlossary(params: {
1397
- include_descriptions?: boolean;
1398
- group_by?: "table" | "category" | "alphabetical";
1399
- database?: string;
1400
- }): Promise<{
1401
- status: string;
1402
- data?: {
1403
- glossary: Array<{
1404
- term: string;
1405
- technical_name: string;
1406
- source_table: string;
1407
- data_type: string;
1408
- description: string;
1409
- category: string;
1410
- related_terms?: string[];
1411
- }>;
1412
- categories: string[];
1413
- total_terms: number;
1414
- };
1415
- error?: string;
1416
- }>;
1417
- designSchemaFromRequirements(params: {
1418
- requirements_text: string;
1419
- entities?: Array<{
1420
- name: string;
1421
- fields?: string[];
1422
- }>;
1423
- naming_convention?: "snake_case" | "camelCase";
1424
- include_audit_columns?: boolean;
1425
- id_type?: "BIGINT" | "UUID";
1426
- engine?: string;
1427
- charset?: string;
1428
- collation?: string;
1429
- }): Promise<{
1430
- status: string;
1431
- data?: {
1432
- input: {
1433
- requirements_text: string;
1434
- inferred_entities_count: number;
1435
- };
1436
- tables: Array<{
1437
- table_name: string;
1438
- columns: Array<{
1439
- name: string;
1440
- type: string;
1441
- nullable: boolean;
1442
- primary_key?: boolean;
1443
- unique?: boolean;
1444
- references?: {
1445
- table: string;
1446
- column: string;
1447
- };
1448
- }>;
1449
- indexes: Array<{
1450
- name: string;
1451
- columns: string[];
1452
- unique?: boolean;
1453
- }>;
1454
- }>;
1455
- relationships: Array<{
1456
- from_table: string;
1457
- from_column: string;
1458
- to_table: string;
1459
- to_column: string;
1460
- type: "one_to_many" | "many_to_one";
1461
- }>;
1462
- ddl_statements: string[];
1463
- notes: string[];
1464
- };
1465
- error?: string;
1466
- }>;
1467
- auditDatabaseSecurity(params?: {
1468
- database?: string;
1469
- include_user_account_checks?: boolean;
1470
- include_privilege_checks?: boolean;
1471
- }): Promise<{
1472
- status: string;
1473
- data?: {
1474
- database: string;
1475
- findings: Array<{
1476
- severity: "critical" | "medium" | "info" | "low" | "high";
1477
- title: string;
1478
- evidence?: string;
1479
- recommendation: string;
1480
- }>;
1481
- summary: {
1482
- critical: number;
1483
- high: number;
1484
- medium: number;
1485
- low: number;
1486
- info: number;
1487
- };
1488
- notes: string[];
1489
- };
1490
- error?: string;
1491
- }>;
1492
- recommendIndexes(params?: {
1493
- database?: string;
1494
- max_query_patterns?: number;
1495
- max_recommendations?: number;
1496
- min_execution_count?: number;
1497
- min_avg_time_ms?: number;
1498
- include_unused_index_warnings?: boolean;
1499
- }): Promise<{
1500
- status: string;
1501
- data?: {
1502
- database: string;
1503
- analyzed_query_patterns: number;
1504
- recommendations: Array<{
1505
- table_name: string;
1506
- columns: string[];
1507
- proposed_index_name: string;
1508
- create_index_sql: string;
1509
- reason: string;
1510
- supporting_query_patterns: Array<{
1511
- query_pattern: string;
1512
- execution_count: number;
1513
- avg_execution_time_ms: number;
1514
- }>;
1515
- }>;
1516
- unused_index_warnings?: Array<{
1517
- table_schema: string;
1518
- table_name: string;
1519
- index_name: string;
1520
- note: string;
1521
- }>;
1522
- notes: string[];
1523
- };
1524
- error?: string;
1525
- }>;
1526
- generateTestData(params: {
1527
- table_name: string;
1528
- row_count: number;
1529
- batch_size?: number;
1530
- include_nulls?: boolean;
1531
- database?: string;
1532
- }): Promise<{
1533
- status: string;
1534
- data?: any;
1535
- error?: string;
1536
- }>;
1537
- analyzeSchemaPatterns(params?: {
1538
- scope?: "database" | "table";
1539
- table_name?: string;
1540
- database?: string;
1541
- }): Promise<{
1542
- status: string;
1543
- data?: any;
1544
- error?: string;
1545
- }>;
1546
- visualizeQuery(params: {
1547
- query: string;
1548
- include_explain_json?: boolean;
1549
- format?: "mermaid" | "json" | "both";
1550
- }): Promise<{
1551
- status: string;
1552
- data?: any;
1553
- error?: string;
1554
- }>;
1555
- predictQueryPerformance(params: {
1556
- query: string;
1557
- row_growth_multiplier?: number;
1558
- per_table_row_growth?: Record<string, number>;
1559
- include_explain_json?: boolean;
1560
- }): Promise<{
1561
- status: string;
1562
- data?: any;
1563
- error?: string;
1564
- }>;
1565
- forecastDatabaseGrowth(params?: {
1566
- horizon_days?: number;
1567
- growth_rate_percent_per_day?: number;
1568
- growth_rate_percent_per_month?: number;
1569
- per_table_growth_rate_percent_per_day?: Record<string, number>;
1570
- database?: string;
1571
- }): Promise<{
1572
- status: string;
1573
- data?: any;
1574
- error?: string;
1575
- }>;
1576
1185
  startQueryBuilder(params: {
1577
1186
  intent: string;
1578
1187
  context?: "analytics" | "reporting" | "data_entry" | "schema_exploration";