@berthojoris/mcp-mysql-server 1.33.6 → 1.36.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/manifest.json CHANGED
@@ -1,878 +1,733 @@
1
- {
2
- "name": "mysql-mcp",
3
- "description": "A Model Context Protocol for MySQL database interaction",
4
- "version": "1.26.1",
5
- "tools": [
6
- {
7
- "name": "list_databases",
8
- "description": "Lists all databases available on the MySQL server.",
9
- "input_schema": {},
10
- "output_schema": {
11
- "type": "array",
12
- "items": {
13
- "type": "string"
14
- }
15
- }
16
- },
17
- {
18
- "name": "list_tables",
19
- "description": "Lists all tables in the connected MySQL database.",
20
- "input_schema": {},
21
- "output_schema": {
22
- "type": "array",
23
- "items": {
24
- "type": "string"
25
- }
26
- }
27
- },
28
- {
29
- "name": "read_table_schema",
30
- "description": "Reads the schema of a specified table.",
31
- "input_schema": {
32
- "type": "object",
33
- "properties": {
34
- "table_name": {
35
- "type": "string"
36
- }
37
- },
38
- "required": [
39
- "table_name"
40
- ]
41
- },
42
- "output_schema": {
43
- "type": "object",
44
- "properties": {
45
- "columns": {
46
- "type": "array",
47
- "items": {
48
- "type": "object",
49
- "properties": {
50
- "name": {
51
- "type": "string"
52
- },
53
- "type": {
54
- "type": "string"
55
- },
56
- "nullable": {
57
- "type": "boolean"
58
- },
59
- "default": {
60
- "type": [
61
- "string",
62
- "null"
63
- ]
64
- },
65
- "primary_key": {
66
- "type": "boolean"
67
- }
68
- }
69
- }
70
- },
71
- "primary_key": {
72
- "type": [
73
- "string",
74
- "null"
75
- ]
76
- },
77
- "indexes": {
78
- "type": "array",
79
- "items": {
80
- "type": "string"
81
- }
82
- }
83
- }
84
- }
85
- },
86
- {
87
- "name": "create_record",
88
- "description": "Creates a new record in the specified table.",
89
- "input_schema": {
90
- "type": "object",
91
- "properties": {
92
- "table_name": {
93
- "type": "string"
94
- },
95
- "data": {
96
- "type": "object"
97
- }
98
- },
99
- "required": [
100
- "table_name",
101
- "data"
102
- ]
103
- },
104
- "output_schema": {
105
- "type": "object",
106
- "properties": {
107
- "success": {
108
- "type": "boolean"
109
- },
110
- "id": {
111
- "type": [
112
- "string",
113
- "number"
114
- ]
115
- },
116
- "affected_rows": {
117
- "type": "number"
118
- }
119
- }
120
- }
121
- },
122
- {
123
- "name": "read_records",
124
- "description": "Reads records from the specified table with optional filtering, pagination, and sorting.",
125
- "input_schema": {
126
- "type": "object",
127
- "properties": {
128
- "table_name": {
129
- "type": "string"
130
- },
131
- "filters": {
132
- "type": "object"
133
- },
134
- "limit": {
135
- "type": "number"
136
- },
137
- "offset": {
138
- "type": "number"
139
- },
140
- "sort_by": {
141
- "type": "string"
142
- },
143
- "sort_direction": {
144
- "type": "string",
145
- "enum": [
146
- "ASC",
147
- "DESC"
148
- ]
149
- }
150
- },
151
- "required": [
152
- "table_name"
153
- ]
154
- },
155
- "output_schema": {
156
- "type": "object",
157
- "properties": {
158
- "records": {
159
- "type": "array"
160
- },
161
- "total": {
162
- "type": "number"
163
- }
164
- }
165
- }
166
- },
167
- {
168
- "name": "update_record",
169
- "description": "Updates an existing record in the specified table.",
170
- "input_schema": {
171
- "type": "object",
172
- "properties": {
173
- "table_name": {
174
- "type": "string"
175
- },
176
- "id_field": {
177
- "type": "string"
178
- },
179
- "id": {
180
- "type": [
181
- "string",
182
- "number"
183
- ]
184
- },
185
- "data": {
186
- "type": "object"
187
- }
188
- },
189
- "required": [
190
- "table_name",
191
- "id",
192
- "data"
193
- ]
194
- },
195
- "output_schema": {
196
- "type": "object",
197
- "properties": {
198
- "success": {
199
- "type": "boolean"
200
- },
201
- "affected_rows": {
202
- "type": "number"
203
- }
204
- }
205
- }
206
- },
207
- {
208
- "name": "delete_record",
209
- "description": "Deletes a record from the specified table.",
210
- "input_schema": {
211
- "type": "object",
212
- "properties": {
213
- "table_name": {
214
- "type": "string"
215
- },
216
- "id_field": {
217
- "type": "string"
218
- },
219
- "id": {
220
- "type": [
221
- "string",
222
- "number"
223
- ]
224
- }
225
- },
226
- "required": [
227
- "table_name",
228
- "id"
229
- ]
230
- },
231
- "output_schema": {
232
- "type": "object",
233
- "properties": {
234
- "success": {
235
- "type": "boolean"
236
- },
237
- "affected_rows": {
238
- "type": "number"
239
- }
240
- }
241
- }
242
- },
243
- {
244
- "name": "run_query",
245
- "description": "Runs a read-only SQL query with optional parameters.",
246
- "input_schema": {
247
- "type": "object",
248
- "properties": {
249
- "query": {
250
- "type": "string"
251
- },
252
- "params": {
253
- "type": "array"
254
- }
255
- },
256
- "required": [
257
- "query"
258
- ]
259
- },
260
- "output_schema": {
261
- "type": "object",
262
- "properties": {
263
- "results": {
264
- "type": "array"
265
- },
266
- "fields": {
267
- "type": "array"
268
- }
269
- }
270
- }
271
- },
272
- {
273
- "name": "execute_sql",
274
- "description": "Executes a write SQL operation (INSERT, UPDATE, DELETE) with optional parameters.",
275
- "input_schema": {
276
- "type": "object",
277
- "properties": {
278
- "query": {
279
- "type": "string"
280
- },
281
- "params": {
282
- "type": "array"
283
- }
284
- },
285
- "required": [
286
- "query"
287
- ]
288
- },
289
- "output_schema": {
290
- "type": "object",
291
- "properties": {
292
- "success": {
293
- "type": "boolean"
294
- },
295
- "affected_rows": {
296
- "type": "number"
297
- },
298
- "insert_id": {
299
- "type": [
300
- "number",
301
- "null"
302
- ]
303
- }
304
- }
305
- }
306
- },
307
- {
308
- "name": "describe_connection",
309
- "description": "Returns information about the current database connection.",
310
- "input_schema": {},
311
- "output_schema": {
312
- "type": "object",
313
- "properties": {
314
- "host": {
315
- "type": "string"
316
- },
317
- "port": {
318
- "type": "number"
319
- },
320
- "database": {
321
- "type": "string"
322
- },
323
- "user": {
324
- "type": "string"
325
- },
326
- "connected": {
327
- "type": "boolean"
328
- }
329
- }
330
- }
331
- },
332
- {
333
- "name": "test_connection",
334
- "description": "Tests the database connection and returns latency information.",
335
- "input_schema": {},
336
- "output_schema": {
337
- "type": "object",
338
- "properties": {
339
- "success": {
340
- "type": "boolean"
341
- },
342
- "latency_ms": {
343
- "type": "number"
344
- },
345
- "message": {
346
- "type": "string"
347
- }
348
- }
349
- }
350
- },
351
- {
352
- "name": "list_all_tools",
353
- "description": "Lists all available MCP tools with their definitions and server metadata.",
354
- "input_schema": {},
355
- "output_schema": {
356
- "type": "object",
357
- "properties": {
358
- "status": {
359
- "type": "string"
360
- },
361
- "data": {
362
- "type": "object",
363
- "properties": {
364
- "total_tools": {
365
- "type": "number"
366
- },
367
- "server_name": {
368
- "type": "string"
369
- },
370
- "server_version": {
371
- "type": "string"
372
- },
373
- "server_description": {
374
- "type": "string"
375
- },
376
- "tools": {
377
- "type": "array",
378
- "items": {
379
- "type": "object",
380
- "properties": {
381
- "name": {
382
- "type": "string"
383
- },
384
- "description": {
385
- "type": "string"
386
- },
387
- "input_schema": {
388
- "type": "object"
389
- },
390
- "output_schema": {
391
- "type": "object"
392
- }
393
- }
394
- }
395
- }
396
- }
397
- },
398
- "error": {
399
- "type": "string"
400
- }
401
- }
402
- }
403
- },
404
- {
405
- "name": "get_table_relationships",
406
- "description": "Returns foreign key relationships for a specified table.",
407
- "input_schema": {
408
- "type": "object",
409
- "properties": {
410
- "table_name": {
411
- "type": "string"
412
- }
413
- },
414
- "required": [
415
- "table_name"
416
- ]
417
- },
418
- "output_schema": {
419
- "type": "object",
420
- "properties": {
421
- "as_parent": {
422
- "type": "array",
423
- "items": {
424
- "type": "object",
425
- "properties": {
426
- "table": {
427
- "type": "string"
428
- },
429
- "column": {
430
- "type": "string"
431
- },
432
- "referenced_column": {
433
- "type": "string"
434
- }
435
- }
436
- }
437
- },
438
- "as_child": {
439
- "type": "array",
440
- "items": {
441
- "type": "object",
442
- "properties": {
443
- "table": {
444
- "type": "string"
445
- },
446
- "column": {
447
- "type": "string"
448
- },
449
- "referenced_column": {
450
- "type": "string"
451
- }
452
- }
453
- }
454
- }
455
- }
456
- }
457
- },
458
- {
459
- "name": "get_all_tables_relationships",
460
- "description": "Gets all table foreign key relationships in one call with memory-efficient relationship mapping.",
461
- "input_schema": {
462
- "type": "object",
463
- "properties": {
464
- "database": {
465
- "type": "string",
466
- "description": "Optional: specific database name"
467
- }
468
- }
469
- },
470
- "output_schema": {
471
- "type": "object",
472
- "properties": {
473
- "total_tables": {
474
- "type": "number"
475
- },
476
- "total_relationships": {
477
- "type": "number"
478
- },
479
- "relationships": {
480
- "type": "object",
481
- "patternProperties": {
482
- ".*": {
483
- "type": "object",
484
- "properties": {
485
- "as_parent": {
486
- "type": "array",
487
- "items": {
488
- "type": "object",
489
- "properties": {
490
- "child_table": { "type": "string" },
491
- "child_column": { "type": "string" },
492
- "parent_table": { "type": "string" },
493
- "parent_column": { "type": "string" },
494
- "constraint_name": { "type": "string" }
495
- }
496
- }
497
- },
498
- "as_child": {
499
- "type": "array",
500
- "items": {
501
- "type": "object",
502
- "properties": {
503
- "child_table": { "type": "string" },
504
- "child_column": { "type": "string" },
505
- "parent_table": { "type": "string" },
506
- "parent_column": { "type": "string" },
507
- "constraint_name": { "type": "string" }
508
- }
509
- }
510
- }
511
- }
512
- }
513
- }
514
- }
515
- }
516
- }
517
- },
518
- {
519
- "name": "get_schema_rag_context",
520
- "description": "Returns a condensed schema-aware context pack with tables, PK/FK details, and row estimates for RAG prompts.",
521
- "input_schema": {
522
- "type": "object",
523
- "properties": {
524
- "database": {
525
- "type": "string",
526
- "description": "Optional specific database name"
527
- },
528
- "max_tables": {
529
- "type": "number",
530
- "description": "Max tables to include (default 50, max 200)"
531
- },
532
- "max_columns": {
533
- "type": "number",
534
- "description": "Max columns per table (default 12, max 200)"
535
- },
536
- "include_relationships": {
537
- "type": "boolean",
538
- "description": "Whether to include FK relationships (default true)"
539
- }
540
- }
541
- },
542
- "output_schema": {
543
- "type": "object",
544
- "properties": {
545
- "database": {
546
- "type": "string"
547
- },
548
- "total_tables": {
549
- "type": "number"
550
- },
551
- "context_text": {
552
- "type": "string"
553
- }
554
- }
555
- }
556
- },
557
- {
558
- "name": "get_table_size",
559
- "description": "Gets size information for one or all tables including data and index sizes.",
560
- "input_schema": {
561
- "type": "object",
562
- "properties": {
563
- "table_name": {
564
- "type": "string",
565
- "description": "Optional: specific table name (omit for all tables)"
566
- },
567
- "database": {
568
- "type": "string",
569
- "description": "Optional: specific database name"
570
- }
571
- }
572
- },
573
- "output_schema": {
574
- "type": "object",
575
- "properties": {
576
- "tables": {
577
- "type": "array",
578
- "items": {
579
- "type": "object",
580
- "properties": {
581
- "table_name": {
582
- "type": "string"
583
- },
584
- "row_count": {
585
- "type": "number"
586
- },
587
- "data_size_bytes": {
588
- "type": "number"
589
- },
590
- "index_size_bytes": {
591
- "type": "number"
592
- },
593
- "total_size_mb": {
594
- "type": "string"
595
- }
596
- }
597
- }
598
- },
599
- "summary": {
600
- "type": "object",
601
- "properties": {
602
- "total_tables": {
603
- "type": "number"
604
- },
605
- "total_size_mb": {
606
- "type": "string"
607
- }
608
- }
609
- }
610
- }
611
- }
612
- },
613
- {
614
- "name": "repair_query",
615
- "description": "Analyzes a SQL query (and optional error) to suggest repairs or optimizations using EXPLAIN and heuristics.",
616
- "input_schema": {
617
- "type": "object",
618
- "properties": {
619
- "query": {
620
- "type": "string",
621
- "description": "The SQL query to analyze or repair"
622
- },
623
- "error_message": {
624
- "type": "string",
625
- "description": "Optional error message received when executing the query"
626
- }
627
- },
628
- "required": [
629
- "query"
630
- ]
631
- },
632
- "output_schema": {
633
- "type": "object",
634
- "properties": {
635
- "status": {
636
- "type": "string"
637
- },
638
- "analysis": {
639
- "type": "object"
640
- },
641
- "fixed_query": {
642
- "type": "string"
643
- },
644
- "suggestions": {
645
- "type": "array",
646
- "items": {
647
- "type": "string"
648
- }
649
- }
650
- }
651
- }
652
- }
653
- ,
654
- {
655
- "name": "design_schema_from_requirements",
656
- "description": "Designs a database schema from natural language requirements and outputs proposed DDL (does not execute).",
657
- "input_schema": {
658
- "type": "object",
659
- "properties": {
660
- "requirements_text": { "type": "string" },
661
- "entities": {
662
- "type": "array",
663
- "items": {
664
- "type": "object",
665
- "properties": {
666
- "name": { "type": "string" },
667
- "fields": { "type": "array", "items": { "type": "string" } }
668
- },
669
- "required": ["name"]
670
- }
671
- },
672
- "naming_convention": { "type": "string", "enum": ["snake_case", "camelCase"] },
673
- "include_audit_columns": { "type": "boolean" },
674
- "id_type": { "type": "string", "enum": ["BIGINT", "UUID"] },
675
- "engine": { "type": "string" },
676
- "charset": { "type": "string" },
677
- "collation": { "type": "string" }
678
- },
679
- "required": ["requirements_text"]
680
- },
681
- "output_schema": {
682
- "type": "object",
683
- "properties": {
684
- "status": { "type": "string" },
685
- "data": { "type": "object" },
686
- "error": { "type": ["string", "null"] }
687
- }
688
- }
689
- },
690
- {
691
- "name": "audit_database_security",
692
- "description": "Audits MySQL security configuration and (optionally) accounts/privileges using read-only inspection queries.",
693
- "input_schema": {
694
- "type": "object",
695
- "properties": {
696
- "database": { "type": "string" },
697
- "include_user_account_checks": { "type": "boolean" },
698
- "include_privilege_checks": { "type": "boolean" }
699
- }
700
- },
701
- "output_schema": {
702
- "type": "object",
703
- "properties": {
704
- "status": { "type": "string" },
705
- "data": { "type": "object" },
706
- "error": { "type": ["string", "null"] }
707
- }
708
- }
709
- },
710
- {
711
- "name": "recommend_indexes",
712
- "description": "Analyzes performance_schema query digests and suggests concrete CREATE INDEX statements.",
713
- "input_schema": {
714
- "type": "object",
715
- "properties": {
716
- "database": { "type": "string" },
717
- "max_query_patterns": { "type": "number" },
718
- "max_recommendations": { "type": "number" },
719
- "min_execution_count": { "type": "number" },
720
- "min_avg_time_ms": { "type": "number" },
721
- "include_unused_index_warnings": { "type": "boolean" }
722
- }
723
- },
724
- "output_schema": {
725
- "type": "object",
726
- "properties": {
727
- "status": { "type": "string" },
728
- "data": { "type": "object" },
729
- "error": { "type": ["string", "null"] }
730
- }
731
- }
732
- },
733
- {
734
- "name": "generate_test_data",
735
- "description": "Generates synthetic test data as SQL INSERT statements for a given table (does not execute). Attempts FK-aware value selection for referential integrity.",
736
- "input_schema": {
737
- "type": "object",
738
- "properties": {
739
- "table_name": { "type": "string" },
740
- "row_count": { "type": "number" },
741
- "batch_size": { "type": "number" },
742
- "include_nulls": { "type": "boolean" },
743
- "database": { "type": "string" }
744
- },
745
- "required": ["table_name", "row_count"]
746
- },
747
- "output_schema": {
748
- "type": "object",
749
- "properties": {
750
- "status": { "type": "string" },
751
- "data": { "type": "object" },
752
- "error": { "type": ["string", "null"] }
753
- }
754
- }
755
- },
756
- {
757
- "name": "analyze_schema_patterns",
758
- "description": "Analyzes the schema for common patterns and anti-patterns (missing PKs, wide tables, unindexed FKs, EAV-like tables, etc.) and returns recommendations.",
759
- "input_schema": {
760
- "type": "object",
761
- "properties": {
762
- "scope": { "type": "string", "enum": ["database", "table"] },
763
- "table_name": { "type": "string" },
764
- "database": { "type": "string" }
765
- }
766
- },
767
- "output_schema": {
768
- "type": "object",
769
- "properties": {
770
- "status": { "type": "string" },
771
- "data": { "type": "object" },
772
- "error": { "type": ["string", "null"] }
773
- }
774
- }
775
- },
776
- {
777
- "name": "visualize_query",
778
- "description": "Creates a visual representation of a read-only SQL query as a Mermaid flowchart, based on EXPLAIN FORMAT=JSON and lightweight SQL parsing.",
779
- "input_schema": {
780
- "type": "object",
781
- "properties": {
782
- "query": { "type": "string" },
783
- "include_explain_json": { "type": "boolean" },
784
- "format": { "type": "string", "enum": ["mermaid", "json", "both"] }
785
- },
786
- "required": ["query"]
787
- },
788
- "output_schema": {
789
- "type": "object",
790
- "properties": {
791
- "status": { "type": "string" },
792
- "data": { "type": "object" },
793
- "error": { "type": ["string", "null"] }
794
- }
795
- }
796
- },
797
- {
798
- "name": "predict_query_performance",
799
- "description": "Predicts how EXPLAIN-estimated scan volume/cost could change under table growth assumptions (heuristic).",
800
- "input_schema": {
801
- "type": "object",
802
- "properties": {
803
- "query": { "type": "string" },
804
- "row_growth_multiplier": { "type": "number" },
805
- "per_table_row_growth": { "type": "object" },
806
- "include_explain_json": { "type": "boolean" }
807
- },
808
- "required": ["query"]
809
- },
810
- "output_schema": {
811
- "type": "object",
812
- "properties": {
813
- "status": { "type": "string" },
814
- "data": { "type": "object" },
815
- "error": { "type": ["string", "null"] }
816
- }
817
- }
818
- },
819
- {
820
- "name": "forecast_database_growth",
821
- "description": "Forecasts database/table growth based on current INFORMATION_SCHEMA sizes and user-supplied growth rate assumptions.",
822
- "input_schema": {
823
- "type": "object",
824
- "properties": {
825
- "horizon_days": { "type": "number" },
826
- "growth_rate_percent_per_day": { "type": "number" },
827
- "growth_rate_percent_per_month": { "type": "number" },
828
- "per_table_growth_rate_percent_per_day": { "type": "object" },
829
- "database": { "type": "string" }
830
- }
831
- },
832
- "output_schema": {
833
- "type": "object",
834
- "properties": {
835
- "status": { "type": "string" },
836
- "data": { "type": "object" },
837
- "error": { "type": ["string", "null"] }
838
- }
839
- }
840
- },
841
- {
842
- "name": "list_all_tools",
843
- "description": "Lists all available tools in this MySQL MCP server with their descriptions and schemas.",
844
- "input_schema": {
845
- "type": "object",
846
- "properties": {}
847
- },
848
- "output_schema": {
849
- "type": "object",
850
- "properties": {
851
- "status": { "type": "string" },
852
- "data": {
853
- "type": "object",
854
- "properties": {
855
- "total_tools": { "type": "number" },
856
- "server_name": { "type": "string" },
857
- "server_version": { "type": "string" },
858
- "server_description": { "type": "string" },
859
- "tools": {
860
- "type": "array",
861
- "items": {
862
- "type": "object",
863
- "properties": {
864
- "name": { "type": "string" },
865
- "description": { "type": "string" },
866
- "input_schema": { "type": "object" },
867
- "output_schema": { "type": "object" }
868
- }
869
- }
870
- }
871
- }
872
- },
873
- "error": { "type": ["string", "null"] }
874
- }
875
- }
876
- }
877
- ]
1
+ {
2
+ "name": "mysql-mcp",
3
+ "description": "A Model Context Protocol for MySQL database interaction",
4
+ "version": "1.26.1",
5
+ "tools": [
6
+ {
7
+ "name": "list_databases",
8
+ "description": "Lists all databases available on the MySQL server.",
9
+ "input_schema": {},
10
+ "output_schema": {
11
+ "type": "array",
12
+ "items": {
13
+ "type": "string"
14
+ }
15
+ }
16
+ },
17
+ {
18
+ "name": "list_tables",
19
+ "description": "Lists all tables in the connected MySQL database.",
20
+ "input_schema": {},
21
+ "output_schema": {
22
+ "type": "array",
23
+ "items": {
24
+ "type": "string"
25
+ }
26
+ }
27
+ },
28
+ {
29
+ "name": "read_table_schema",
30
+ "description": "Reads the schema of a specified table.",
31
+ "input_schema": {
32
+ "type": "object",
33
+ "properties": {
34
+ "table_name": {
35
+ "type": "string"
36
+ }
37
+ },
38
+ "required": [
39
+ "table_name"
40
+ ]
41
+ },
42
+ "output_schema": {
43
+ "type": "object",
44
+ "properties": {
45
+ "columns": {
46
+ "type": "array",
47
+ "items": {
48
+ "type": "object",
49
+ "properties": {
50
+ "name": {
51
+ "type": "string"
52
+ },
53
+ "type": {
54
+ "type": "string"
55
+ },
56
+ "nullable": {
57
+ "type": "boolean"
58
+ },
59
+ "default": {
60
+ "type": [
61
+ "string",
62
+ "null"
63
+ ]
64
+ },
65
+ "primary_key": {
66
+ "type": "boolean"
67
+ }
68
+ }
69
+ }
70
+ },
71
+ "primary_key": {
72
+ "type": [
73
+ "string",
74
+ "null"
75
+ ]
76
+ },
77
+ "indexes": {
78
+ "type": "array",
79
+ "items": {
80
+ "type": "string"
81
+ }
82
+ }
83
+ }
84
+ }
85
+ },
86
+ {
87
+ "name": "create_record",
88
+ "description": "Creates a new record in the specified table.",
89
+ "input_schema": {
90
+ "type": "object",
91
+ "properties": {
92
+ "table_name": {
93
+ "type": "string"
94
+ },
95
+ "data": {
96
+ "type": "object"
97
+ }
98
+ },
99
+ "required": [
100
+ "table_name",
101
+ "data"
102
+ ]
103
+ },
104
+ "output_schema": {
105
+ "type": "object",
106
+ "properties": {
107
+ "success": {
108
+ "type": "boolean"
109
+ },
110
+ "id": {
111
+ "type": [
112
+ "string",
113
+ "number"
114
+ ]
115
+ },
116
+ "affected_rows": {
117
+ "type": "number"
118
+ }
119
+ }
120
+ }
121
+ },
122
+ {
123
+ "name": "read_records",
124
+ "description": "Reads records from the specified table with optional filtering, pagination, and sorting.",
125
+ "input_schema": {
126
+ "type": "object",
127
+ "properties": {
128
+ "table_name": {
129
+ "type": "string"
130
+ },
131
+ "filters": {
132
+ "type": "object"
133
+ },
134
+ "limit": {
135
+ "type": "number"
136
+ },
137
+ "offset": {
138
+ "type": "number"
139
+ },
140
+ "sort_by": {
141
+ "type": "string"
142
+ },
143
+ "sort_direction": {
144
+ "type": "string",
145
+ "enum": [
146
+ "ASC",
147
+ "DESC"
148
+ ]
149
+ }
150
+ },
151
+ "required": [
152
+ "table_name"
153
+ ]
154
+ },
155
+ "output_schema": {
156
+ "type": "object",
157
+ "properties": {
158
+ "records": {
159
+ "type": "array"
160
+ },
161
+ "total": {
162
+ "type": "number"
163
+ }
164
+ }
165
+ }
166
+ },
167
+ {
168
+ "name": "update_record",
169
+ "description": "Updates an existing record in the specified table.",
170
+ "input_schema": {
171
+ "type": "object",
172
+ "properties": {
173
+ "table_name": {
174
+ "type": "string"
175
+ },
176
+ "id_field": {
177
+ "type": "string"
178
+ },
179
+ "id": {
180
+ "type": [
181
+ "string",
182
+ "number"
183
+ ]
184
+ },
185
+ "data": {
186
+ "type": "object"
187
+ }
188
+ },
189
+ "required": [
190
+ "table_name",
191
+ "id",
192
+ "data"
193
+ ]
194
+ },
195
+ "output_schema": {
196
+ "type": "object",
197
+ "properties": {
198
+ "success": {
199
+ "type": "boolean"
200
+ },
201
+ "affected_rows": {
202
+ "type": "number"
203
+ }
204
+ }
205
+ }
206
+ },
207
+ {
208
+ "name": "delete_record",
209
+ "description": "Deletes a record from the specified table.",
210
+ "input_schema": {
211
+ "type": "object",
212
+ "properties": {
213
+ "table_name": {
214
+ "type": "string"
215
+ },
216
+ "id_field": {
217
+ "type": "string"
218
+ },
219
+ "id": {
220
+ "type": [
221
+ "string",
222
+ "number"
223
+ ]
224
+ }
225
+ },
226
+ "required": [
227
+ "table_name",
228
+ "id"
229
+ ]
230
+ },
231
+ "output_schema": {
232
+ "type": "object",
233
+ "properties": {
234
+ "success": {
235
+ "type": "boolean"
236
+ },
237
+ "affected_rows": {
238
+ "type": "number"
239
+ }
240
+ }
241
+ }
242
+ },
243
+ {
244
+ "name": "run_query",
245
+ "description": "Runs a read-only SQL query with optional parameters.",
246
+ "input_schema": {
247
+ "type": "object",
248
+ "properties": {
249
+ "query": {
250
+ "type": "string"
251
+ },
252
+ "params": {
253
+ "type": "array"
254
+ }
255
+ },
256
+ "required": [
257
+ "query"
258
+ ]
259
+ },
260
+ "output_schema": {
261
+ "type": "object",
262
+ "properties": {
263
+ "results": {
264
+ "type": "array"
265
+ },
266
+ "fields": {
267
+ "type": "array"
268
+ }
269
+ }
270
+ }
271
+ },
272
+ {
273
+ "name": "execute_sql",
274
+ "description": "Executes a write SQL operation (INSERT, UPDATE, DELETE) with optional parameters.",
275
+ "input_schema": {
276
+ "type": "object",
277
+ "properties": {
278
+ "query": {
279
+ "type": "string"
280
+ },
281
+ "params": {
282
+ "type": "array"
283
+ }
284
+ },
285
+ "required": [
286
+ "query"
287
+ ]
288
+ },
289
+ "output_schema": {
290
+ "type": "object",
291
+ "properties": {
292
+ "success": {
293
+ "type": "boolean"
294
+ },
295
+ "affected_rows": {
296
+ "type": "number"
297
+ },
298
+ "insert_id": {
299
+ "type": [
300
+ "number",
301
+ "null"
302
+ ]
303
+ }
304
+ }
305
+ }
306
+ },
307
+ {
308
+ "name": "describe_connection",
309
+ "description": "Returns information about the current database connection.",
310
+ "input_schema": {},
311
+ "output_schema": {
312
+ "type": "object",
313
+ "properties": {
314
+ "host": {
315
+ "type": "string"
316
+ },
317
+ "port": {
318
+ "type": "number"
319
+ },
320
+ "database": {
321
+ "type": "string"
322
+ },
323
+ "user": {
324
+ "type": "string"
325
+ },
326
+ "connected": {
327
+ "type": "boolean"
328
+ }
329
+ }
330
+ }
331
+ },
332
+ {
333
+ "name": "test_connection",
334
+ "description": "Tests the database connection and returns latency information.",
335
+ "input_schema": {},
336
+ "output_schema": {
337
+ "type": "object",
338
+ "properties": {
339
+ "success": {
340
+ "type": "boolean"
341
+ },
342
+ "latency_ms": {
343
+ "type": "number"
344
+ },
345
+ "message": {
346
+ "type": "string"
347
+ }
348
+ }
349
+ }
350
+ },
351
+ {
352
+ "name": "list_all_tools",
353
+ "description": "Lists all available MCP tools with their definitions and server metadata.",
354
+ "input_schema": {},
355
+ "output_schema": {
356
+ "type": "object",
357
+ "properties": {
358
+ "status": {
359
+ "type": "string"
360
+ },
361
+ "data": {
362
+ "type": "object",
363
+ "properties": {
364
+ "total_tools": {
365
+ "type": "number"
366
+ },
367
+ "server_name": {
368
+ "type": "string"
369
+ },
370
+ "server_version": {
371
+ "type": "string"
372
+ },
373
+ "server_description": {
374
+ "type": "string"
375
+ },
376
+ "tools": {
377
+ "type": "array",
378
+ "items": {
379
+ "type": "object",
380
+ "properties": {
381
+ "name": {
382
+ "type": "string"
383
+ },
384
+ "description": {
385
+ "type": "string"
386
+ },
387
+ "input_schema": {
388
+ "type": "object"
389
+ },
390
+ "output_schema": {
391
+ "type": "object"
392
+ }
393
+ }
394
+ }
395
+ }
396
+ }
397
+ },
398
+ "error": {
399
+ "type": "string"
400
+ }
401
+ }
402
+ }
403
+ },
404
+ {
405
+ "name": "get_table_relationships",
406
+ "description": "Returns foreign key relationships for a specified table.",
407
+ "input_schema": {
408
+ "type": "object",
409
+ "properties": {
410
+ "table_name": {
411
+ "type": "string"
412
+ }
413
+ },
414
+ "required": [
415
+ "table_name"
416
+ ]
417
+ },
418
+ "output_schema": {
419
+ "type": "object",
420
+ "properties": {
421
+ "as_parent": {
422
+ "type": "array",
423
+ "items": {
424
+ "type": "object",
425
+ "properties": {
426
+ "table": {
427
+ "type": "string"
428
+ },
429
+ "column": {
430
+ "type": "string"
431
+ },
432
+ "referenced_column": {
433
+ "type": "string"
434
+ }
435
+ }
436
+ }
437
+ },
438
+ "as_child": {
439
+ "type": "array",
440
+ "items": {
441
+ "type": "object",
442
+ "properties": {
443
+ "table": {
444
+ "type": "string"
445
+ },
446
+ "column": {
447
+ "type": "string"
448
+ },
449
+ "referenced_column": {
450
+ "type": "string"
451
+ }
452
+ }
453
+ }
454
+ }
455
+ }
456
+ }
457
+ },
458
+ {
459
+ "name": "get_all_tables_relationships",
460
+ "description": "Gets all table foreign key relationships in one call with memory-efficient relationship mapping.",
461
+ "input_schema": {
462
+ "type": "object",
463
+ "properties": {
464
+ "database": {
465
+ "type": "string",
466
+ "description": "Optional: specific database name"
467
+ }
468
+ }
469
+ },
470
+ "output_schema": {
471
+ "type": "object",
472
+ "properties": {
473
+ "total_tables": {
474
+ "type": "number"
475
+ },
476
+ "total_relationships": {
477
+ "type": "number"
478
+ },
479
+ "relationships": {
480
+ "type": "object",
481
+ "patternProperties": {
482
+ ".*": {
483
+ "type": "object",
484
+ "properties": {
485
+ "as_parent": {
486
+ "type": "array",
487
+ "items": {
488
+ "type": "object",
489
+ "properties": {
490
+ "child_table": {
491
+ "type": "string"
492
+ },
493
+ "child_column": {
494
+ "type": "string"
495
+ },
496
+ "parent_table": {
497
+ "type": "string"
498
+ },
499
+ "parent_column": {
500
+ "type": "string"
501
+ },
502
+ "constraint_name": {
503
+ "type": "string"
504
+ }
505
+ }
506
+ }
507
+ },
508
+ "as_child": {
509
+ "type": "array",
510
+ "items": {
511
+ "type": "object",
512
+ "properties": {
513
+ "child_table": {
514
+ "type": "string"
515
+ },
516
+ "child_column": {
517
+ "type": "string"
518
+ },
519
+ "parent_table": {
520
+ "type": "string"
521
+ },
522
+ "parent_column": {
523
+ "type": "string"
524
+ },
525
+ "constraint_name": {
526
+ "type": "string"
527
+ }
528
+ }
529
+ }
530
+ }
531
+ }
532
+ }
533
+ }
534
+ }
535
+ }
536
+ }
537
+ },
538
+ {
539
+ "name": "get_schema_rag_context",
540
+ "description": "Returns a condensed schema-aware context pack with tables, PK/FK details, and row estimates for RAG prompts.",
541
+ "input_schema": {
542
+ "type": "object",
543
+ "properties": {
544
+ "database": {
545
+ "type": "string",
546
+ "description": "Optional specific database name"
547
+ },
548
+ "max_tables": {
549
+ "type": "number",
550
+ "description": "Max tables to include (default 50, max 200)"
551
+ },
552
+ "max_columns": {
553
+ "type": "number",
554
+ "description": "Max columns per table (default 12, max 200)"
555
+ },
556
+ "include_relationships": {
557
+ "type": "boolean",
558
+ "description": "Whether to include FK relationships (default true)"
559
+ }
560
+ }
561
+ },
562
+ "output_schema": {
563
+ "type": "object",
564
+ "properties": {
565
+ "database": {
566
+ "type": "string"
567
+ },
568
+ "total_tables": {
569
+ "type": "number"
570
+ },
571
+ "context_text": {
572
+ "type": "string"
573
+ }
574
+ }
575
+ }
576
+ },
577
+ {
578
+ "name": "get_table_size",
579
+ "description": "Gets size information for one or all tables including data and index sizes.",
580
+ "input_schema": {
581
+ "type": "object",
582
+ "properties": {
583
+ "table_name": {
584
+ "type": "string",
585
+ "description": "Optional: specific table name (omit for all tables)"
586
+ },
587
+ "database": {
588
+ "type": "string",
589
+ "description": "Optional: specific database name"
590
+ }
591
+ }
592
+ },
593
+ "output_schema": {
594
+ "type": "object",
595
+ "properties": {
596
+ "tables": {
597
+ "type": "array",
598
+ "items": {
599
+ "type": "object",
600
+ "properties": {
601
+ "table_name": {
602
+ "type": "string"
603
+ },
604
+ "row_count": {
605
+ "type": "number"
606
+ },
607
+ "data_size_bytes": {
608
+ "type": "number"
609
+ },
610
+ "index_size_bytes": {
611
+ "type": "number"
612
+ },
613
+ "total_size_mb": {
614
+ "type": "string"
615
+ }
616
+ }
617
+ }
618
+ },
619
+ "summary": {
620
+ "type": "object",
621
+ "properties": {
622
+ "total_tables": {
623
+ "type": "number"
624
+ },
625
+ "total_size_mb": {
626
+ "type": "string"
627
+ }
628
+ }
629
+ }
630
+ }
631
+ }
632
+ },
633
+ {
634
+ "name": "repair_query",
635
+ "description": "Analyzes a SQL query (and optional error) to suggest repairs or optimizations using EXPLAIN and heuristics.",
636
+ "input_schema": {
637
+ "type": "object",
638
+ "properties": {
639
+ "query": {
640
+ "type": "string",
641
+ "description": "The SQL query to analyze or repair"
642
+ },
643
+ "error_message": {
644
+ "type": "string",
645
+ "description": "Optional error message received when executing the query"
646
+ }
647
+ },
648
+ "required": [
649
+ "query"
650
+ ]
651
+ },
652
+ "output_schema": {
653
+ "type": "object",
654
+ "properties": {
655
+ "status": {
656
+ "type": "string"
657
+ },
658
+ "analysis": {
659
+ "type": "object"
660
+ },
661
+ "fixed_query": {
662
+ "type": "string"
663
+ },
664
+ "suggestions": {
665
+ "type": "array",
666
+ "items": {
667
+ "type": "string"
668
+ }
669
+ }
670
+ }
671
+ }
672
+ },
673
+ {
674
+ "name": "list_all_tools",
675
+ "description": "Lists all available tools in this MySQL MCP server with their descriptions and schemas.",
676
+ "input_schema": {
677
+ "type": "object",
678
+ "properties": {}
679
+ },
680
+ "output_schema": {
681
+ "type": "object",
682
+ "properties": {
683
+ "status": {
684
+ "type": "string"
685
+ },
686
+ "data": {
687
+ "type": "object",
688
+ "properties": {
689
+ "total_tools": {
690
+ "type": "number"
691
+ },
692
+ "server_name": {
693
+ "type": "string"
694
+ },
695
+ "server_version": {
696
+ "type": "string"
697
+ },
698
+ "server_description": {
699
+ "type": "string"
700
+ },
701
+ "tools": {
702
+ "type": "array",
703
+ "items": {
704
+ "type": "object",
705
+ "properties": {
706
+ "name": {
707
+ "type": "string"
708
+ },
709
+ "description": {
710
+ "type": "string"
711
+ },
712
+ "input_schema": {
713
+ "type": "object"
714
+ },
715
+ "output_schema": {
716
+ "type": "object"
717
+ }
718
+ }
719
+ }
720
+ }
721
+ }
722
+ },
723
+ "error": {
724
+ "type": [
725
+ "string",
726
+ "null"
727
+ ]
728
+ }
729
+ }
730
+ }
731
+ }
732
+ ]
878
733
  }