@berthojoris/mcp-mysql-server 1.15.0 → 1.16.1
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 +40 -0
- package/DOCUMENTATIONS.md +292 -5
- package/README.md +14 -13
- package/dist/config/featureConfig.d.ts +2 -1
- package/dist/config/featureConfig.js +20 -0
- package/dist/index.d.ts +225 -0
- package/dist/index.js +60 -0
- package/dist/mcp-server.js +311 -4
- package/dist/tools/ddlTools.js +1 -1
- package/dist/tools/documentationGeneratorTools.d.ts +145 -0
- package/dist/tools/documentationGeneratorTools.js +820 -0
- package/dist/tools/intelligentQueryTools.d.ts +94 -0
- package/dist/tools/intelligentQueryTools.js +713 -0
- package/dist/tools/smartDiscoveryTools.d.ts +163 -0
- package/dist/tools/smartDiscoveryTools.js +750 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,46 @@ 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.16.1] - 2025-12-09
|
|
9
|
+
|
|
10
|
+
### Improved
|
|
11
|
+
- **Enhanced Tool Descriptions** - Improved tool descriptions to help LLMs select the correct tool:
|
|
12
|
+
- `run_query`: Now explicitly states "⚡ USE THIS FOR SELECT QUERIES"
|
|
13
|
+
- `execute_sql`: Now explicitly states "⚡ USE THIS FOR INSERT/UPDATE/DELETE"
|
|
14
|
+
- `execute_ddl`: Now explicitly states "⚡ USE THIS FOR DDL ONLY" with clear guidance
|
|
15
|
+
- Added "NO SELECT queries!" warning to `execute_ddl` parameter description
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
- **Better Error Messages** - `execute_ddl` now suggests the correct tool when called with wrong query type:
|
|
19
|
+
- "For SELECT queries, use the 'run_query' tool instead"
|
|
20
|
+
- "For INSERT/UPDATE/DELETE, use the 'execute_sql' tool"
|
|
21
|
+
|
|
22
|
+
## [1.16.0] - 2025-12-09
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
- **Phase 1: AI Enhancement Tools** - 8 new intelligent tools for AI-powered database interactions:
|
|
26
|
+
|
|
27
|
+
#### Intelligent Query Assistant
|
|
28
|
+
- `build_query_from_intent` - Converts natural language to optimized SQL with context-aware query generation. Supports analytics, reporting, data_entry, and schema_exploration contexts. Includes safety levels and complexity controls.
|
|
29
|
+
- `suggest_query_improvements` - Analyzes SQL queries and suggests optimizations for speed, memory, or readability.
|
|
30
|
+
|
|
31
|
+
#### Smart Data Discovery Agent
|
|
32
|
+
- `smart_search` - Finds relevant tables, columns, data patterns, and relationships using semantic search. Essential for exploring large databases with hundreds of tables.
|
|
33
|
+
- `find_similar_columns` - Discovers columns with similar names or data across tables. Identifies potential join candidates and implicit relationships.
|
|
34
|
+
- `discover_data_patterns` - Analyzes tables for patterns including uniqueness, null rates, duplicates, formats, and value ranges. Provides data quality scores and recommendations.
|
|
35
|
+
|
|
36
|
+
#### AI-Powered Documentation Generator
|
|
37
|
+
- `generate_documentation` - Creates comprehensive database documentation with business glossary in Markdown, HTML, or JSON format. Includes schema, relationships, and example queries.
|
|
38
|
+
- `generate_data_dictionary` - Generates detailed data dictionaries for specific tables with column descriptions, constraints, sample values, and business terms.
|
|
39
|
+
- `generate_business_glossary` - Creates business glossaries from database column names with inferred descriptions and categorization.
|
|
40
|
+
|
|
41
|
+
- **New Documentation Category** - Added `ai_enhancement` category for organizing the new AI tools.
|
|
42
|
+
- **Updated Presets** - Added AI Enhancement tools to the `analyst` preset for immediate access.
|
|
43
|
+
|
|
44
|
+
### Changed
|
|
45
|
+
- Updated tool count from 126 to 134 tools.
|
|
46
|
+
- Enhanced enhancement tracking file to mark Phase 1 as completed.
|
|
47
|
+
|
|
8
48
|
## [1.15.0] - 2025-12-08
|
|
9
49
|
|
|
10
50
|
### Added
|
package/DOCUMENTATIONS.md
CHANGED
|
@@ -7,7 +7,7 @@ This file contains detailed documentation for all features of the MySQL MCP Serv
|
|
|
7
7
|
## Table of Contents
|
|
8
8
|
|
|
9
9
|
1. [Category Filtering System](#🆕-category-filtering-system) - NEW!
|
|
10
|
-
2. [🔧 Complete Tools Reference](#🔧-complete-tools-reference) - All
|
|
10
|
+
2. [🔧 Complete Tools Reference](#🔧-complete-tools-reference) - All 134 tools organized by category
|
|
11
11
|
3. [DDL Operations](#🏗️-ddl-operations)
|
|
12
12
|
4. [Data Export Tools](#📤-data-export-tools)
|
|
13
13
|
5. [Data Import Tools](#📥-data-import-tools)
|
|
@@ -24,8 +24,9 @@ This file contains detailed documentation for all features of the MySQL MCP Serv
|
|
|
24
24
|
16. [Table Maintenance](#🔧-table-maintenance)
|
|
25
25
|
17. [Process & Server Management](#📊-process--server-management)
|
|
26
26
|
18. [Performance Monitoring](#📈-performance-monitoring)
|
|
27
|
-
19. [
|
|
28
|
-
20. [
|
|
27
|
+
19. [AI Enhancement Tools](#🤖-ai-enhancement-tools) - NEW!
|
|
28
|
+
20. [Usage Examples](#📋-usage-examples)
|
|
29
|
+
21. [Query Logging & Automatic SQL Display](#📝-query-logging--automatic-sql-display)
|
|
29
30
|
|
|
30
31
|
Control which database operations are available to AI using a **dual-layer filtering system**:
|
|
31
32
|
|
|
@@ -53,14 +54,14 @@ Control which database operations are available to AI using a **dual-layer filte
|
|
|
53
54
|
### Documentation Categories Reference
|
|
54
55
|
|
|
55
56
|
```bash
|
|
56
|
-
# All
|
|
57
|
+
# All 23 available categories (comma-separated):
|
|
57
58
|
database_discovery,crud_operations,bulk_operations,custom_queries,
|
|
58
59
|
schema_management,utilities,transaction_management,stored_procedures,
|
|
59
60
|
views_management,triggers_management,functions_management,index_management,
|
|
60
61
|
constraint_management,table_maintenance,server_management,
|
|
61
62
|
performance_monitoring,cache_management,query_optimization,
|
|
62
63
|
backup_restore,import_export,data_migration,schema_migrations,
|
|
63
|
-
analysis
|
|
64
|
+
analysis,ai_enhancement
|
|
64
65
|
```
|
|
65
66
|
|
|
66
67
|
### Configuration Examples
|
|
@@ -3002,6 +3003,292 @@ Reset Performance Schema statistics to start fresh monitoring.
|
|
|
3002
3003
|
|
|
3003
3004
|
---
|
|
3004
3005
|
|
|
3006
|
+
## 🤖 AI Enhancement Tools
|
|
3007
|
+
|
|
3008
|
+
The AI Enhancement tools provide intelligent, AI-powered features for database exploration, query generation, and documentation. These tools are part of **Phase 1: Core AI Enhancement**.
|
|
3009
|
+
|
|
3010
|
+
### Tool Overview
|
|
3011
|
+
|
|
3012
|
+
| Tool | Description | Category |
|
|
3013
|
+
|------|-------------|----------|
|
|
3014
|
+
| `build_query_from_intent` | Converts natural language to optimized SQL with context-aware generation | `ai_enhancement` |
|
|
3015
|
+
| `suggest_query_improvements` | Analyzes SQL queries and suggests optimizations | `ai_enhancement` |
|
|
3016
|
+
| `smart_search` | Finds relevant tables, columns, and patterns using semantic search | `ai_enhancement` |
|
|
3017
|
+
| `find_similar_columns` | Discovers columns with similar names or data across tables | `ai_enhancement` |
|
|
3018
|
+
| `discover_data_patterns` | Analyzes tables for data patterns and quality issues | `ai_enhancement` |
|
|
3019
|
+
| `generate_documentation` | Generates comprehensive database documentation | `ai_enhancement` |
|
|
3020
|
+
| `generate_data_dictionary` | Creates detailed data dictionaries for tables | `ai_enhancement` |
|
|
3021
|
+
| `generate_business_glossary` | Builds business glossaries from column names | `ai_enhancement` |
|
|
3022
|
+
|
|
3023
|
+
### Intelligent Query Assistant
|
|
3024
|
+
|
|
3025
|
+
#### `build_query_from_intent`
|
|
3026
|
+
|
|
3027
|
+
Converts natural language descriptions to optimized SQL queries with context-aware generation.
|
|
3028
|
+
|
|
3029
|
+
```javascript
|
|
3030
|
+
// Basic usage
|
|
3031
|
+
{
|
|
3032
|
+
"tool": "build_query_from_intent",
|
|
3033
|
+
"arguments": {
|
|
3034
|
+
"natural_language": "show me all users who signed up last month"
|
|
3035
|
+
}
|
|
3036
|
+
}
|
|
3037
|
+
|
|
3038
|
+
// With context and safety settings
|
|
3039
|
+
{
|
|
3040
|
+
"tool": "build_query_from_intent",
|
|
3041
|
+
"arguments": {
|
|
3042
|
+
"natural_language": "count orders by product category for 2024",
|
|
3043
|
+
"context": "analytics",
|
|
3044
|
+
"max_complexity": "medium",
|
|
3045
|
+
"safety_level": "moderate"
|
|
3046
|
+
}
|
|
3047
|
+
}
|
|
3048
|
+
```
|
|
3049
|
+
|
|
3050
|
+
**Parameters:**
|
|
3051
|
+
| Parameter | Type | Description |
|
|
3052
|
+
|-----------|------|-------------|
|
|
3053
|
+
| `natural_language` | string | Natural language description of what you want to query (required) |
|
|
3054
|
+
| `context` | string | Query context: `analytics`, `reporting`, `data_entry`, `schema_exploration` |
|
|
3055
|
+
| `max_complexity` | string | Maximum complexity: `simple`, `medium`, `complex` |
|
|
3056
|
+
| `safety_level` | string | Safety level: `strict`, `moderate`, `permissive` |
|
|
3057
|
+
|
|
3058
|
+
**Response includes:**
|
|
3059
|
+
- Generated SQL query
|
|
3060
|
+
- Explanation of what the query does
|
|
3061
|
+
- Tables and columns involved
|
|
3062
|
+
- Safety notes and optimization hints
|
|
3063
|
+
- Alternative query suggestions
|
|
3064
|
+
|
|
3065
|
+
#### `suggest_query_improvements`
|
|
3066
|
+
|
|
3067
|
+
Analyzes a SQL query and provides suggestions for optimization.
|
|
3068
|
+
|
|
3069
|
+
```javascript
|
|
3070
|
+
{
|
|
3071
|
+
"tool": "suggest_query_improvements",
|
|
3072
|
+
"arguments": {
|
|
3073
|
+
"query": "SELECT * FROM users WHERE email LIKE '%@gmail.com'",
|
|
3074
|
+
"optimization_goal": "speed"
|
|
3075
|
+
}
|
|
3076
|
+
}
|
|
3077
|
+
```
|
|
3078
|
+
|
|
3079
|
+
**Optimization Goals:**
|
|
3080
|
+
- `speed` - Focuses on query execution time (default)
|
|
3081
|
+
- `memory` - Focuses on memory usage optimization
|
|
3082
|
+
- `readability` - Suggests formatting and clarity improvements
|
|
3083
|
+
|
|
3084
|
+
### Smart Data Discovery
|
|
3085
|
+
|
|
3086
|
+
#### `smart_search`
|
|
3087
|
+
|
|
3088
|
+
Search across the database schema using semantic matching to find relevant tables, columns, and data patterns.
|
|
3089
|
+
|
|
3090
|
+
```javascript
|
|
3091
|
+
// Search for anything related to "customer"
|
|
3092
|
+
{
|
|
3093
|
+
"tool": "smart_search",
|
|
3094
|
+
"arguments": {
|
|
3095
|
+
"search_term": "customer",
|
|
3096
|
+
"search_type": "all",
|
|
3097
|
+
"include_sample_data": true
|
|
3098
|
+
}
|
|
3099
|
+
}
|
|
3100
|
+
|
|
3101
|
+
// Search specifically for columns
|
|
3102
|
+
{
|
|
3103
|
+
"tool": "smart_search",
|
|
3104
|
+
"arguments": {
|
|
3105
|
+
"search_term": "email",
|
|
3106
|
+
"search_type": "column",
|
|
3107
|
+
"similarity_threshold": 0.5
|
|
3108
|
+
}
|
|
3109
|
+
}
|
|
3110
|
+
```
|
|
3111
|
+
|
|
3112
|
+
**Search Types:**
|
|
3113
|
+
- `all` - Search across tables, columns, patterns, and relationships
|
|
3114
|
+
- `table` - Search table names only
|
|
3115
|
+
- `column` - Search column names only
|
|
3116
|
+
- `data_pattern` - Search for patterns in actual data
|
|
3117
|
+
- `relationship` - Search for relationships between tables
|
|
3118
|
+
|
|
3119
|
+
#### `find_similar_columns`
|
|
3120
|
+
|
|
3121
|
+
Discover columns with similar names or data across tables to identify potential joins and relationships.
|
|
3122
|
+
|
|
3123
|
+
```javascript
|
|
3124
|
+
// Find columns similar to "user_id" in "orders" table
|
|
3125
|
+
{
|
|
3126
|
+
"tool": "find_similar_columns",
|
|
3127
|
+
"arguments": {
|
|
3128
|
+
"column_name": "user_id",
|
|
3129
|
+
"table_name": "orders",
|
|
3130
|
+
"include_data_comparison": true
|
|
3131
|
+
}
|
|
3132
|
+
}
|
|
3133
|
+
|
|
3134
|
+
// Find all potential join candidates across the database
|
|
3135
|
+
{
|
|
3136
|
+
"tool": "find_similar_columns",
|
|
3137
|
+
"arguments": {
|
|
3138
|
+
"include_data_comparison": false,
|
|
3139
|
+
"max_results": 50
|
|
3140
|
+
}
|
|
3141
|
+
}
|
|
3142
|
+
```
|
|
3143
|
+
|
|
3144
|
+
#### `discover_data_patterns`
|
|
3145
|
+
|
|
3146
|
+
Analyze a table to discover data patterns, quality issues, and get recommendations.
|
|
3147
|
+
|
|
3148
|
+
```javascript
|
|
3149
|
+
{
|
|
3150
|
+
"tool": "discover_data_patterns",
|
|
3151
|
+
"arguments": {
|
|
3152
|
+
"table_name": "users",
|
|
3153
|
+
"pattern_types": ["unique", "null", "duplicate", "format", "range"]
|
|
3154
|
+
}
|
|
3155
|
+
}
|
|
3156
|
+
```
|
|
3157
|
+
|
|
3158
|
+
**Pattern Types:**
|
|
3159
|
+
- `unique` - Find potentially unique columns not marked as UNIQUE
|
|
3160
|
+
- `null` - Detect high null rates and nullable mismatches
|
|
3161
|
+
- `duplicate` - Find duplicate values in columns
|
|
3162
|
+
- `format` - Detect data formats (email, phone, etc.)
|
|
3163
|
+
- `range` - Analyze numeric ranges and detect outliers
|
|
3164
|
+
|
|
3165
|
+
**Response includes:**
|
|
3166
|
+
- Data quality score (0-100)
|
|
3167
|
+
- Patterns found per column
|
|
3168
|
+
- Recommendations for each issue
|
|
3169
|
+
- Column-level metrics
|
|
3170
|
+
|
|
3171
|
+
### Documentation Generator
|
|
3172
|
+
|
|
3173
|
+
#### `generate_documentation`
|
|
3174
|
+
|
|
3175
|
+
Generate comprehensive database documentation in Markdown, HTML, or JSON format.
|
|
3176
|
+
|
|
3177
|
+
```javascript
|
|
3178
|
+
// Generate full database documentation
|
|
3179
|
+
{
|
|
3180
|
+
"tool": "generate_documentation",
|
|
3181
|
+
"arguments": {
|
|
3182
|
+
"format": "markdown",
|
|
3183
|
+
"include_business_glossary": true,
|
|
3184
|
+
"include_examples": true,
|
|
3185
|
+
"include_statistics": true
|
|
3186
|
+
}
|
|
3187
|
+
}
|
|
3188
|
+
|
|
3189
|
+
// Document a specific table
|
|
3190
|
+
{
|
|
3191
|
+
"tool": "generate_documentation",
|
|
3192
|
+
"arguments": {
|
|
3193
|
+
"scope": "table",
|
|
3194
|
+
"table_name": "orders",
|
|
3195
|
+
"format": "html"
|
|
3196
|
+
}
|
|
3197
|
+
}
|
|
3198
|
+
```
|
|
3199
|
+
|
|
3200
|
+
**Output Formats:**
|
|
3201
|
+
- `markdown` - Best for GitHub/GitLab wikis and documentation sites
|
|
3202
|
+
- `html` - Standalone HTML page with styling
|
|
3203
|
+
- `json` - Structured data for programmatic use
|
|
3204
|
+
|
|
3205
|
+
**Documentation includes:**
|
|
3206
|
+
- Table of contents
|
|
3207
|
+
- ER relationship diagrams (Mermaid.js in markdown)
|
|
3208
|
+
- Column details with data types and constraints
|
|
3209
|
+
- Foreign key relationships
|
|
3210
|
+
- Index information
|
|
3211
|
+
- Example SQL queries
|
|
3212
|
+
- Business glossary
|
|
3213
|
+
|
|
3214
|
+
#### `generate_data_dictionary`
|
|
3215
|
+
|
|
3216
|
+
Generate a detailed data dictionary for a specific table.
|
|
3217
|
+
|
|
3218
|
+
```javascript
|
|
3219
|
+
{
|
|
3220
|
+
"tool": "generate_data_dictionary",
|
|
3221
|
+
"arguments": {
|
|
3222
|
+
"table_name": "products",
|
|
3223
|
+
"include_sample_values": true,
|
|
3224
|
+
"include_constraints": true
|
|
3225
|
+
}
|
|
3226
|
+
}
|
|
3227
|
+
```
|
|
3228
|
+
|
|
3229
|
+
**Response includes:**
|
|
3230
|
+
- Column name, type, and description
|
|
3231
|
+
- Constraints (PK, FK, NOT NULL, UNIQUE)
|
|
3232
|
+
- Default values
|
|
3233
|
+
- Sample values from actual data
|
|
3234
|
+
- Business terms (auto-inferred)
|
|
3235
|
+
|
|
3236
|
+
#### `generate_business_glossary`
|
|
3237
|
+
|
|
3238
|
+
Create a business glossary from database column names with auto-generated descriptions.
|
|
3239
|
+
|
|
3240
|
+
```javascript
|
|
3241
|
+
{
|
|
3242
|
+
"tool": "generate_business_glossary",
|
|
3243
|
+
"arguments": {
|
|
3244
|
+
"include_descriptions": true,
|
|
3245
|
+
"group_by": "category"
|
|
3246
|
+
}
|
|
3247
|
+
}
|
|
3248
|
+
```
|
|
3249
|
+
|
|
3250
|
+
**Grouping Options:**
|
|
3251
|
+
- `category` - Group by inferred category (Identifiers, Timestamps, Contact, etc.)
|
|
3252
|
+
- `table` - Group by source table
|
|
3253
|
+
- `alphabetical` - A-Z sorting
|
|
3254
|
+
|
|
3255
|
+
### AI Enhancement Best Practices
|
|
3256
|
+
|
|
3257
|
+
1. **Start with Discovery**: Use `smart_search` and `find_similar_columns` to understand unfamiliar databases
|
|
3258
|
+
2. **Use Context**: When building queries, specify the `context` parameter for better results
|
|
3259
|
+
3. **Validate Generated SQL**: Always review generated SQL before executing, especially for complex queries
|
|
3260
|
+
4. **Update Documentation**: Regenerate documentation after schema changes
|
|
3261
|
+
5. **Quality Checks**: Run `discover_data_patterns` regularly to catch data quality issues early
|
|
3262
|
+
|
|
3263
|
+
### Example Workflow: Exploring a New Database
|
|
3264
|
+
|
|
3265
|
+
```javascript
|
|
3266
|
+
// Step 1: Get an overview
|
|
3267
|
+
{ "tool": "get_database_summary" }
|
|
3268
|
+
|
|
3269
|
+
// Step 2: Search for relevant tables
|
|
3270
|
+
{
|
|
3271
|
+
"tool": "smart_search",
|
|
3272
|
+
"arguments": { "search_term": "order sales revenue" }
|
|
3273
|
+
}
|
|
3274
|
+
|
|
3275
|
+
// Step 3: Generate documentation
|
|
3276
|
+
{
|
|
3277
|
+
"tool": "generate_documentation",
|
|
3278
|
+
"arguments": { "format": "markdown" }
|
|
3279
|
+
}
|
|
3280
|
+
|
|
3281
|
+
// Step 4: Build a query from natural language
|
|
3282
|
+
{
|
|
3283
|
+
"tool": "build_query_from_intent",
|
|
3284
|
+
"arguments": {
|
|
3285
|
+
"natural_language": "total sales by month for the last year"
|
|
3286
|
+
}
|
|
3287
|
+
}
|
|
3288
|
+
```
|
|
3289
|
+
|
|
3290
|
+
---
|
|
3291
|
+
|
|
3005
3292
|
## 📋 Usage Examples
|
|
3006
3293
|
|
|
3007
3294
|
### Example 1: Read Data
|
package/README.md
CHANGED
|
@@ -40,20 +40,19 @@ Add to your AI agent config (`.mcp.json`, `.cursor/mcp.json`, etc.):
|
|
|
40
40
|
|
|
41
41
|
## Table of Contents
|
|
42
42
|
|
|
43
|
-
- [
|
|
44
|
-
- [
|
|
45
|
-
- [
|
|
46
|
-
- [AI Agent Configuration](#-ai-agent-configuration)
|
|
43
|
+
- [Installation](#installation)
|
|
44
|
+
- [Quick Start](#quick-start)
|
|
45
|
+
- [AI Agent Configuration](#ai-agent-configuration)
|
|
47
46
|
- [Standard JSON Config](#standard-json-configuration)
|
|
48
47
|
- [OpenAI Codex (TOML)](#openai-codex-cli--vs-code-extension)
|
|
49
|
-
- [Zed IDE](#zed-ide)
|
|
48
|
+
- [Zed IDE](#zed-ide)
|
|
50
49
|
- [Environment Variables](#environment-variables-configuration)
|
|
51
50
|
- [Local Development](#local-path-configuration)
|
|
52
|
-
- [Permission System](
|
|
53
|
-
- [Available Tools (
|
|
54
|
-
- [Documentation](
|
|
55
|
-
- [Comparison: MCP vs Manual Access](
|
|
56
|
-
- [License](
|
|
51
|
+
- [Permission System](#permission-system)
|
|
52
|
+
- [Available Tools (134 total)](#available-tools)
|
|
53
|
+
- [Documentation](DOCUMENTATIONS.md)
|
|
54
|
+
- [Comparison: MCP vs Manual Access](#mysql-mcp-vs-manual-database-access)
|
|
55
|
+
- [License](#license)
|
|
57
56
|
|
|
58
57
|
---
|
|
59
58
|
| **Data Masking** | Protect PII/Secrets in responses with configurable profiles (soft/partial/strict) |
|
|
@@ -647,11 +646,11 @@ Use both 2nd argument (permissions) and 3rd argument (categories):
|
|
|
647
646
|
|
|
648
647
|
## Available Tools
|
|
649
648
|
|
|
650
|
-
The MCP server provides **
|
|
649
|
+
The MCP server provides **134 powerful tools** organized into 23 categories:
|
|
651
650
|
|
|
652
651
|
### Quick Reference
|
|
653
652
|
|
|
654
|
-
**
|
|
653
|
+
**134 Tools Available** - Organized into 23 categories
|
|
655
654
|
|
|
656
655
|
| Category | Count | Key Tools |
|
|
657
656
|
|----------|-------|-----------|
|
|
@@ -677,7 +676,8 @@ The MCP server provides **126 powerful tools** organized into 22 categories:
|
|
|
677
676
|
| Data Migration | 5 | `copy_table_data`, `sync_table_data` |
|
|
678
677
|
| Schema Migrations | 9 | `create_migration`, `apply_migrations` |
|
|
679
678
|
| Utilities | 4 | `test_connection`, `export_table_to_csv` |
|
|
680
|
-
| Analysis | 4 | `get_column_statistics`, `get_database_summary`, `get_schema_erd
|
|
679
|
+
| Analysis | 4 | `get_column_statistics`, `get_database_summary`, `get_schema_erd` |
|
|
680
|
+
| **AI Enhancement** | 8 | `build_query_from_intent`, `smart_search`, `generate_documentation` |
|
|
681
681
|
|
|
682
682
|
> **📖 For detailed tool descriptions, parameters, and examples, see [DOCUMENTATIONS.md](DOCUMENTATIONS.md#🔧-complete-tools-reference)**
|
|
683
683
|
|
|
@@ -695,6 +695,7 @@ For comprehensive documentation, see **[DOCUMENTATIONS.md](DOCUMENTATIONS.md)**:
|
|
|
695
695
|
- **Schema Versioning** - Version control for database schema changes
|
|
696
696
|
- **Transaction Management** - ACID transactions
|
|
697
697
|
- **Stored Procedures** - Create and execute with IN/OUT/INOUT parameters
|
|
698
|
+
- **AI Enhancement** - Natural language to SQL, smart discovery, and auto-documentation
|
|
698
699
|
- **Query Logging** - See all SQL queries executed automatically
|
|
699
700
|
- **Security Features** - Built-in security and best practices
|
|
700
701
|
- **Bulk Operations** - High-performance batch processing
|
|
@@ -40,7 +40,8 @@ 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"
|
|
43
|
+
ANALYSIS = "analysis",
|
|
44
|
+
AI_ENHANCEMENT = "ai_enhancement"
|
|
44
45
|
}
|
|
45
46
|
/**
|
|
46
47
|
* Permission preset bundles for faster, safer configuration
|
|
@@ -52,6 +52,7 @@ 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";
|
|
55
56
|
})(DocCategory || (exports.DocCategory = DocCategory = {}));
|
|
56
57
|
const normalizePresetName = (value) => (value || "").toLowerCase().replace(/[\s_-]/g, "");
|
|
57
58
|
const permissionPresets = {
|
|
@@ -84,6 +85,7 @@ const permissionPresets = {
|
|
|
84
85
|
DocCategory.QUERY_OPTIMIZATION,
|
|
85
86
|
DocCategory.CACHE_MANAGEMENT,
|
|
86
87
|
DocCategory.SERVER_MANAGEMENT,
|
|
88
|
+
DocCategory.AI_ENHANCEMENT,
|
|
87
89
|
],
|
|
88
90
|
},
|
|
89
91
|
dbalite: {
|
|
@@ -310,6 +312,15 @@ exports.toolCategoryMap = {
|
|
|
310
312
|
getConnectionPoolStats: ToolCategory.UTILITY,
|
|
311
313
|
getDatabaseHealthCheck: ToolCategory.UTILITY,
|
|
312
314
|
resetPerformanceStats: ToolCategory.UTILITY,
|
|
315
|
+
// Phase 1: AI Enhancement Tools
|
|
316
|
+
buildQueryFromIntent: ToolCategory.READ,
|
|
317
|
+
suggestQueryImprovements: ToolCategory.UTILITY,
|
|
318
|
+
smartSearch: ToolCategory.LIST,
|
|
319
|
+
findSimilarColumns: ToolCategory.LIST,
|
|
320
|
+
discoverDataPatterns: ToolCategory.READ,
|
|
321
|
+
generateDocumentation: ToolCategory.UTILITY,
|
|
322
|
+
generateDataDictionary: ToolCategory.UTILITY,
|
|
323
|
+
generateBusinessGlossary: ToolCategory.UTILITY,
|
|
313
324
|
};
|
|
314
325
|
/**
|
|
315
326
|
* Map of tool names to their documentation categories (New Enhanced System)
|
|
@@ -463,6 +474,15 @@ exports.toolDocCategoryMap = {
|
|
|
463
474
|
getSchemaERD: DocCategory.ANALYSIS,
|
|
464
475
|
getColumnStatistics: DocCategory.ANALYSIS,
|
|
465
476
|
getSchemaRagContext: DocCategory.ANALYSIS,
|
|
477
|
+
// Phase 1: AI Enhancement
|
|
478
|
+
buildQueryFromIntent: DocCategory.AI_ENHANCEMENT,
|
|
479
|
+
suggestQueryImprovements: DocCategory.AI_ENHANCEMENT,
|
|
480
|
+
smartSearch: DocCategory.AI_ENHANCEMENT,
|
|
481
|
+
findSimilarColumns: DocCategory.AI_ENHANCEMENT,
|
|
482
|
+
discoverDataPatterns: DocCategory.AI_ENHANCEMENT,
|
|
483
|
+
generateDocumentation: DocCategory.AI_ENHANCEMENT,
|
|
484
|
+
generateDataDictionary: DocCategory.AI_ENHANCEMENT,
|
|
485
|
+
generateBusinessGlossary: DocCategory.AI_ENHANCEMENT,
|
|
466
486
|
};
|
|
467
487
|
/**
|
|
468
488
|
* Mapping between legacy categories and documentation categories
|