mcp-dbutils 0.20.1__tar.gz → 0.21.0__tar.gz

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.
Files changed (194) hide show
  1. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/CHANGELOG.md +7 -0
  2. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/PKG-INFO +12 -9
  3. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/README.md +11 -8
  4. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/README_EN.md +13 -8
  5. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/en/usage.md +77 -11
  6. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/zh/usage.md +77 -8
  7. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/pyproject.toml +1 -1
  8. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/src/mcp_dbutils/base.py +11 -11
  9. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/tests/unit/test_base_server.py +2 -2
  10. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/.coveragerc +0 -0
  11. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/.github/ISSUE_TEMPLATE/bug_report_ar.md +0 -0
  12. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/.github/ISSUE_TEMPLATE/bug_report_en.md +0 -0
  13. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/.github/ISSUE_TEMPLATE/bug_report_es.md +0 -0
  14. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/.github/ISSUE_TEMPLATE/bug_report_fr.md +0 -0
  15. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/.github/ISSUE_TEMPLATE/bug_report_ru.md +0 -0
  16. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/.github/ISSUE_TEMPLATE/bug_report_zh.md +0 -0
  17. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  18. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/.github/ISSUE_TEMPLATE/documentation_improvement_ar.md +0 -0
  19. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/.github/ISSUE_TEMPLATE/documentation_improvement_en.md +0 -0
  20. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/.github/ISSUE_TEMPLATE/documentation_improvement_es.md +0 -0
  21. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/.github/ISSUE_TEMPLATE/documentation_improvement_fr.md +0 -0
  22. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/.github/ISSUE_TEMPLATE/documentation_improvement_ru.md +0 -0
  23. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/.github/ISSUE_TEMPLATE/documentation_improvement_zh.md +0 -0
  24. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/.github/ISSUE_TEMPLATE/feature_request_ar.md +0 -0
  25. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/.github/ISSUE_TEMPLATE/feature_request_en.md +0 -0
  26. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/.github/ISSUE_TEMPLATE/feature_request_es.md +0 -0
  27. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/.github/ISSUE_TEMPLATE/feature_request_fr.md +0 -0
  28. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/.github/ISSUE_TEMPLATE/feature_request_ru.md +0 -0
  29. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/.github/ISSUE_TEMPLATE/feature_request_zh.md +0 -0
  30. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/.github/ISSUE_TEMPLATE/performance_issue_ar.md +0 -0
  31. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/.github/ISSUE_TEMPLATE/performance_issue_en.md +0 -0
  32. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/.github/ISSUE_TEMPLATE/performance_issue_es.md +0 -0
  33. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/.github/ISSUE_TEMPLATE/performance_issue_fr.md +0 -0
  34. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/.github/ISSUE_TEMPLATE/performance_issue_ru.md +0 -0
  35. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/.github/ISSUE_TEMPLATE/performance_issue_zh.md +0 -0
  36. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/.github/ISSUE_TEMPLATE/security_vulnerability_ar.md +0 -0
  37. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/.github/ISSUE_TEMPLATE/security_vulnerability_en.md +0 -0
  38. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/.github/ISSUE_TEMPLATE/security_vulnerability_es.md +0 -0
  39. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/.github/ISSUE_TEMPLATE/security_vulnerability_fr.md +0 -0
  40. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/.github/ISSUE_TEMPLATE/security_vulnerability_ru.md +0 -0
  41. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/.github/ISSUE_TEMPLATE/security_vulnerability_zh.md +0 -0
  42. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/.github/workflows/code-style.yml +0 -0
  43. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/.github/workflows/issue-translator.yml +0 -0
  44. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/.github/workflows/quality-assurance.yml +0 -0
  45. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/.github/workflows/release.yml +0 -0
  46. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/.gitignore +0 -0
  47. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/.pre-commit-config.yaml +0 -0
  48. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/.releaserc.json +0 -0
  49. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/Dockerfile +0 -0
  50. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/LICENSE +0 -0
  51. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/README_AR.md +0 -0
  52. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/README_ES.md +0 -0
  53. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/README_FR.md +0 -0
  54. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/README_RU.md +0 -0
  55. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/config.yaml.example +0 -0
  56. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/ar/configuration.md +0 -0
  57. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/ar/examples/README.md +0 -0
  58. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/ar/examples/advanced-llm-interactions.md +0 -0
  59. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/ar/examples/mysql-examples.md +0 -0
  60. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/ar/examples/postgresql-examples.md +0 -0
  61. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/ar/examples/sqlite-examples.md +0 -0
  62. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/ar/installation-platform-specific.md +0 -0
  63. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/ar/installation.md +0 -0
  64. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/ar/technical/architecture.md +0 -0
  65. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/ar/technical/development.md +0 -0
  66. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/ar/technical/security.md +0 -0
  67. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/ar/technical/sonarcloud-integration.md +0 -0
  68. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/ar/technical/testing.md +0 -0
  69. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/ar/usage.md +0 -0
  70. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/document-consistency-check.md +0 -0
  71. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/document-version-history.md +0 -0
  72. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/en/configuration.md +0 -0
  73. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/en/examples/advanced-llm-interactions.md +0 -0
  74. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/en/examples/mysql-examples.md +0 -0
  75. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/en/examples/postgresql-examples.md +0 -0
  76. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/en/examples/sqlite-examples.md +0 -0
  77. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/en/installation-platform-specific.md +0 -0
  78. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/en/installation.md +0 -0
  79. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/en/technical/architecture.md +0 -0
  80. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/en/technical/development.md +0 -0
  81. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/en/technical/security.md +0 -0
  82. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/en/technical/sonarcloud-integration.md +0 -0
  83. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/en/technical/testing.md +0 -0
  84. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/es/configuration.md +0 -0
  85. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/es/examples/README.md +0 -0
  86. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/es/examples/advanced-llm-interactions.md +0 -0
  87. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/es/examples/mysql-examples.md +0 -0
  88. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/es/examples/postgresql-examples.md +0 -0
  89. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/es/examples/sqlite-examples.md +0 -0
  90. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/es/installation-platform-specific.md +0 -0
  91. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/es/installation.md +0 -0
  92. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/es/technical/architecture.md +0 -0
  93. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/es/technical/development.md +0 -0
  94. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/es/technical/security.md +0 -0
  95. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/es/technical/sonarcloud-integration.md +0 -0
  96. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/es/technical/testing.md +0 -0
  97. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/es/usage.md +0 -0
  98. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/fr/configuration.md +0 -0
  99. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/fr/examples/README.md +0 -0
  100. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/fr/examples/advanced-llm-interactions.md +0 -0
  101. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/fr/examples/mysql-examples.md +0 -0
  102. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/fr/examples/postgresql-examples.md +0 -0
  103. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/fr/examples/sqlite-examples.md +0 -0
  104. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/fr/installation-platform-specific.md +0 -0
  105. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/fr/installation.md +0 -0
  106. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/fr/technical/architecture.md +0 -0
  107. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/fr/technical/development.md +0 -0
  108. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/fr/technical/security.md +0 -0
  109. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/fr/technical/sonarcloud-integration.md +0 -0
  110. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/fr/technical/testing.md +0 -0
  111. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/fr/usage.md +0 -0
  112. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/index.md +0 -0
  113. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/ru/configuration.md +0 -0
  114. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/ru/examples/README.md +0 -0
  115. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/ru/examples/advanced-llm-interactions.md +0 -0
  116. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/ru/examples/mysql-examples.md +0 -0
  117. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/ru/examples/postgresql-examples.md +0 -0
  118. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/ru/examples/sqlite-examples.md +0 -0
  119. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/ru/installation-platform-specific.md +0 -0
  120. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/ru/installation.md +0 -0
  121. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/ru/technical/architecture.md +0 -0
  122. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/ru/technical/development.md +0 -0
  123. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/ru/technical/security.md +0 -0
  124. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/ru/technical/sonarcloud-integration.md +0 -0
  125. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/ru/technical/testing.md +0 -0
  126. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/ru/usage.md +0 -0
  127. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/zh/configuration.md +0 -0
  128. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/zh/examples/advanced-llm-interactions.md +0 -0
  129. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/zh/examples/mysql-examples.md +0 -0
  130. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/zh/examples/postgresql-examples.md +0 -0
  131. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/zh/examples/sqlite-examples.md +0 -0
  132. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/zh/installation-platform-specific.md +0 -0
  133. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/zh/installation.md +0 -0
  134. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/zh/technical/architecture.md +0 -0
  135. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/zh/technical/development.md +0 -0
  136. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/zh/technical/security.md +0 -0
  137. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/zh/technical/sonarcloud-integration.md +0 -0
  138. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/docs/zh/technical/testing.md +0 -0
  139. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/scripts/check_docs_consistency.py +0 -0
  140. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/scripts/check_zh_docs.py +0 -0
  141. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/scripts/fix_en_nav_links.py +0 -0
  142. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/scripts/fix_imports.sh +0 -0
  143. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/scripts/fix_remaining_issues.sh +0 -0
  144. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/scripts/fix_zh_nav_links.py +0 -0
  145. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/scripts/run_sonar_analysis.sh +0 -0
  146. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/scripts/sonar-ai-fix.fish +0 -0
  147. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/smithery.yaml +0 -0
  148. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/sonar-project.properties +0 -0
  149. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/src/mcp_dbutils/__init__.py +0 -0
  150. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/src/mcp_dbutils/config.py +0 -0
  151. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/src/mcp_dbutils/log.py +0 -0
  152. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/src/mcp_dbutils/mysql/__init__.py +0 -0
  153. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/src/mcp_dbutils/mysql/config.py +0 -0
  154. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/src/mcp_dbutils/mysql/handler.py +0 -0
  155. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/src/mcp_dbutils/mysql/server.py +0 -0
  156. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/src/mcp_dbutils/postgres/__init__.py +0 -0
  157. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/src/mcp_dbutils/postgres/config.py +0 -0
  158. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/src/mcp_dbutils/postgres/handler.py +0 -0
  159. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/src/mcp_dbutils/postgres/server.py +0 -0
  160. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/src/mcp_dbutils/sqlite/__init__.py +0 -0
  161. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/src/mcp_dbutils/sqlite/config.py +0 -0
  162. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/src/mcp_dbutils/sqlite/handler.py +0 -0
  163. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/src/mcp_dbutils/sqlite/server.py +0 -0
  164. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/src/mcp_dbutils/stats.py +0 -0
  165. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/tests/conftest.py +0 -0
  166. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/tests/integration/__init__.py +0 -0
  167. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/tests/integration/conftest.py +0 -0
  168. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/tests/integration/fixtures.py +0 -0
  169. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/tests/integration/test_list_connections.py +0 -0
  170. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/tests/integration/test_logging.py +0 -0
  171. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/tests/integration/test_monitoring.py +0 -0
  172. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/tests/integration/test_monitoring_enhanced.py +0 -0
  173. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/tests/integration/test_mysql.py +0 -0
  174. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/tests/integration/test_mysql_config.py +0 -0
  175. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/tests/integration/test_mysql_config_helpers.py +0 -0
  176. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/tests/integration/test_mysql_handler_extended.py +0 -0
  177. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/tests/integration/test_postgres.py +0 -0
  178. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/tests/integration/test_postgres_config.py +0 -0
  179. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/tests/integration/test_prompts.py +0 -0
  180. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/tests/integration/test_sqlite.py +0 -0
  181. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/tests/integration/test_sqlite_config.py +0 -0
  182. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/tests/integration/test_sqlite_handler_extended.py +0 -0
  183. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/tests/integration/test_tools.py +0 -0
  184. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/tests/integration/test_tools_advanced.py +0 -0
  185. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/tests/unit/test_base.py +0 -0
  186. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/tests/unit/test_base_handlers.py +0 -0
  187. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/tests/unit/test_base_helpers.py +0 -0
  188. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/tests/unit/test_log.py +0 -0
  189. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/tests/unit/test_mysql_handler.py +0 -0
  190. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/tests/unit/test_mysql_server.py +0 -0
  191. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/tests/unit/test_postgres_handler.py +0 -0
  192. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/tests/unit/test_postgres_server.py +0 -0
  193. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/tests/unit/test_sqlite_server.py +0 -0
  194. {mcp_dbutils-0.20.1 → mcp_dbutils-0.21.0}/tests/unit/test_stats.py +0 -0
@@ -1,3 +1,10 @@
1
+ # [0.21.0](https://github.com/donghao1393/mcp-dbutils/compare/v0.20.1...v0.21.0) (2025-05-01)
2
+
3
+
4
+ ### Features
5
+
6
+ * 优化数据库工具描述以提高LLM理解能力 ([#81](https://github.com/donghao1393/mcp-dbutils/issues/81)) ([232cd3e](https://github.com/donghao1393/mcp-dbutils/commit/232cd3ed247ed95248932001c99ed529819cddf8))
7
+
1
8
  ## [0.20.1](https://github.com/donghao1393/mcp-dbutils/compare/v0.20.0...v0.20.1) (2025-04-30)
2
9
 
3
10
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcp-dbutils
3
- Version: 0.20.1
3
+ Version: 0.21.0
4
4
  Summary: MCP Database Utilities Service
5
5
  Author: Dong Hao
6
6
  License-Expression: MIT
@@ -125,14 +125,17 @@ MCP Database Utilities 是一个多功能的 MCP 服务,它使您的 AI 能够
125
125
 
126
126
  MCP 数据库工具提供了多种工具,使 AI 能够与您的数据库交互:
127
127
 
128
- - **dbutils-list-connections**:列出配置中的所有可用数据库连接
129
- - **dbutils-list-tables**:列出数据库中的所有表
130
- - **dbutils-run-query**:执行 SQL 查询(仅 SELECT)
131
- - **dbutils-get-stats**:获取表统计信息
132
- - **dbutils-list-constraints**:列出表约束
133
- - **dbutils-explain-query**:获取查询执行计划
134
- - **dbutils-get-performance**:获取数据库性能指标
135
- - **dbutils-analyze-query**:分析查询以进行优化
128
+ - **dbutils-list-connections**:列出配置中的所有可用数据库连接,包括数据库类型、主机、端口和数据库名称等详细信息,同时隐藏密码等敏感信息。
129
+ - **dbutils-list-tables**:列出指定数据库连接中的所有表,包括表名、URI和可用的表描述,按数据库类型分组以便于识别。
130
+ - **dbutils-run-query**:执行只读SQL查询(仅SELECT),支持包括JOIN、GROUP BY和聚合函数在内的复杂查询,返回包含列名和数据行的结构化结果。
131
+ - **dbutils-describe-table**:提供表结构的详细信息,包括列名、数据类型、是否可为空、默认值和注释,以易于阅读的格式呈现。
132
+ - **dbutils-get-ddl**:获取创建指定表的完整DDL(数据定义语言)语句,包括所有列定义、约束和索引。
133
+ - **dbutils-list-indexes**:列出指定表上的所有索引,包括索引名称、类型(唯一/非唯一)、索引方法和包含的列,按索引名称分组。
134
+ - **dbutils-get-stats**:获取表的统计信息,包括估计行数、平均行长度、数据大小和索引大小。
135
+ - **dbutils-list-constraints**:列出表上的所有约束,包括主键、外键、唯一约束和检查约束,对于外键约束还显示引用的表和列。
136
+ - **dbutils-explain-query**:获取SQL查询的执行计划,显示数据库引擎将如何处理查询,包括访问方法、连接类型和估计成本。
137
+ - **dbutils-get-performance**:获取数据库连接的性能指标,包括查询计数、平均执行时间、内存使用情况和错误统计。
138
+ - **dbutils-analyze-query**:分析SQL查询的性能特性,提供执行计划、实际执行时间和具体的优化建议。
136
139
 
137
140
  有关这些工具的详细说明和使用示例,请参阅[使用指南](docs/zh/usage.md)。
138
141
 
@@ -100,14 +100,17 @@ MCP Database Utilities 是一个多功能的 MCP 服务,它使您的 AI 能够
100
100
 
101
101
  MCP 数据库工具提供了多种工具,使 AI 能够与您的数据库交互:
102
102
 
103
- - **dbutils-list-connections**:列出配置中的所有可用数据库连接
104
- - **dbutils-list-tables**:列出数据库中的所有表
105
- - **dbutils-run-query**:执行 SQL 查询(仅 SELECT)
106
- - **dbutils-get-stats**:获取表统计信息
107
- - **dbutils-list-constraints**:列出表约束
108
- - **dbutils-explain-query**:获取查询执行计划
109
- - **dbutils-get-performance**:获取数据库性能指标
110
- - **dbutils-analyze-query**:分析查询以进行优化
103
+ - **dbutils-list-connections**:列出配置中的所有可用数据库连接,包括数据库类型、主机、端口和数据库名称等详细信息,同时隐藏密码等敏感信息。
104
+ - **dbutils-list-tables**:列出指定数据库连接中的所有表,包括表名、URI和可用的表描述,按数据库类型分组以便于识别。
105
+ - **dbutils-run-query**:执行只读SQL查询(仅SELECT),支持包括JOIN、GROUP BY和聚合函数在内的复杂查询,返回包含列名和数据行的结构化结果。
106
+ - **dbutils-describe-table**:提供表结构的详细信息,包括列名、数据类型、是否可为空、默认值和注释,以易于阅读的格式呈现。
107
+ - **dbutils-get-ddl**:获取创建指定表的完整DDL(数据定义语言)语句,包括所有列定义、约束和索引。
108
+ - **dbutils-list-indexes**:列出指定表上的所有索引,包括索引名称、类型(唯一/非唯一)、索引方法和包含的列,按索引名称分组。
109
+ - **dbutils-get-stats**:获取表的统计信息,包括估计行数、平均行长度、数据大小和索引大小。
110
+ - **dbutils-list-constraints**:列出表上的所有约束,包括主键、外键、唯一约束和检查约束,对于外键约束还显示引用的表和列。
111
+ - **dbutils-explain-query**:获取SQL查询的执行计划,显示数据库引擎将如何处理查询,包括访问方法、连接类型和估计成本。
112
+ - **dbutils-get-performance**:获取数据库连接的性能指标,包括查询计数、平均执行时间、内存使用情况和错误统计。
113
+ - **dbutils-analyze-query**:分析SQL查询的性能特性,提供执行计划、实际执行时间和具体的优化建议。
111
114
 
112
115
  有关这些工具的详细说明和使用示例,请参阅[使用指南](docs/zh/usage.md)。
113
116
 
@@ -73,14 +73,19 @@ We offer multiple installation methods, including uvx, Docker, and Smithery. For
73
73
 
74
74
  MCP Database Utilities provides several tools that your AI can use:
75
75
 
76
- - **dbutils-list-connections**: Lists all available database connections in your configuration
77
- - **dbutils-list-tables**: Lists all tables in a database
78
- - **dbutils-run-query**: Executes a SQL query (SELECT only)
79
- - **dbutils-get-stats**: Gets statistics about a table
80
- - **dbutils-list-constraints**: Lists table constraints
81
- - **dbutils-explain-query**: Gets query execution plan
82
- - **dbutils-get-performance**: Gets database performance metrics
83
- - **dbutils-analyze-query**: Analyzes queries for optimization
76
+ - **dbutils-list-connections**: Lists all available database connections with detailed information including database type, host, port, and database name, while hiding sensitive information like passwords.
77
+ - **dbutils-list-tables**: Lists all tables in the specified database connection with table names, URIs, and available descriptions, grouped by database type for easy identification.
78
+ - **dbutils-run-query**: Executes read-only SQL queries (SELECT only) with support for complex queries including JOINs, GROUP BY, and aggregate functions, returning structured results with column names and data rows.
79
+ - **dbutils-describe-table**: Provides detailed information about a table's structure, including column names, data types, nullability, default values, and comments in an easy-to-read format.
80
+ - **dbutils-get-ddl**: Retrieves the complete DDL (Data Definition Language) statement for creating the specified table, including all column definitions, constraints, and indexes.
81
+ - **dbutils-list-indexes**: Lists all indexes on the specified table, including index names, types (unique/non-unique), index methods, and included columns, grouped by index name.
82
+ - **dbutils-get-stats**: Retrieves statistical information about the table, including estimated row count, average row length, data size, and index size.
83
+ - **dbutils-list-constraints**: Lists all constraints on the table, including primary keys, foreign keys, unique constraints, and check constraints, with referenced tables and columns for foreign keys.
84
+ - **dbutils-explain-query**: Provides the execution plan for a SQL query, showing how the database engine will process the query, including access methods, join types, and estimated costs.
85
+ - **dbutils-get-performance**: Retrieves performance metrics for the database connection, including query count, average execution time, memory usage, and error statistics.
86
+ - **dbutils-analyze-query**: Analyzes the performance characteristics of a SQL query, providing execution plan, actual execution time, and specific optimization recommendations.
87
+
88
+ For detailed descriptions and usage examples of these tools, see the [Usage Guide](docs/en/usage.md).
84
89
 
85
90
 
86
91
 
@@ -1,8 +1,5 @@
1
1
  # Usage Guide
2
2
 
3
- *English | [中文](../zh/usage.md) | [Français](../fr/usage.md) | [Español](../es/usage.md) | [العربية](../ar/usage.md) | [Русский](../ru/usage.md)*
4
-
5
-
6
3
  *English | [中文](../zh/usage.md) | [Français](../fr/usage.md) | [Español](../es/usage.md) | [العربية](../ar/usage.md) | [Русский](../ru/usage.md)*
7
4
 
8
5
  This document provides detailed instructions for using the MCP Database Utilities, helping you fully leverage its capabilities for data analysis with AI.
@@ -22,7 +19,7 @@ MCP Database Utilities provides several tools that your AI can use:
22
19
 
23
20
  ### dbutils-list-connections
24
21
 
25
- Lists all available database connections defined in your configuration.
22
+ Lists all available database connections defined in the configuration with detailed information including database type, host, port, and database name, while hiding sensitive information like passwords. The optional check_status parameter allows verifying if each connection is available, though this may increase response time. Use this tool when you need to understand available database resources or diagnose connection issues.
26
23
 
27
24
  **Example Interaction**:
28
25
 
@@ -48,7 +45,7 @@ Lists all available database connections defined in your configuration.
48
45
 
49
46
  ### dbutils-list-tables
50
47
 
51
- Lists all tables in the specified database.
48
+ Lists all tables in the specified database connection with table names, URIs, and available descriptions. Results are grouped by database type and clearly labeled for easy identification. Use this tool when you need to understand database structure or locate specific tables. Only works within the allowed connection scope.
52
49
 
53
50
  **Example Interaction**:
54
51
 
@@ -63,7 +60,7 @@ Lists all tables in the specified database.
63
60
 
64
61
  ### dbutils-run-query
65
62
 
66
- Executes SQL queries on the specified database (SELECT operations only).
63
+ Executes read-only SQL queries on the specified database connection. For security, only SELECT statements are supported. Returns structured results with column names and data rows. Supports complex queries including JOINs, GROUP BY, ORDER BY, and aggregate functions. Use this tool when you need to analyze data, validate hypotheses, or extract specific information. Query execution is protected by resource limits and timeouts to prevent system resource overuse.
67
64
 
68
65
  **Example Interaction**:
69
66
 
@@ -71,9 +68,49 @@ Executes SQL queries on the specified database (SELECT operations only).
71
68
 
72
69
  **AI**: "Let me check that for you. According to the data, there have been 42 new customer registrations in the last 30 days."
73
70
 
71
+ ### dbutils-describe-table
72
+
73
+ Provides detailed information about a table's structure, including column names, data types, nullability, default values, and comments. Results are formatted as an easy-to-read hierarchy that clearly displays all column attributes. Use this tool when you need to understand table structure in depth, analyze data models, or prepare queries. Supports all major database types with consistent output format.
74
+
75
+ **Example Interaction**:
76
+
77
+ **You**: "Describe the structure of the customers table."
78
+
79
+ **AI**: "The customers table has the following structure:
80
+ - id: integer, primary key, not null, auto-increment
81
+ - name: varchar(100), not null
82
+ - email: varchar(100), unique, not null
83
+ - registration_date: date, not null, default: current_date
84
+ - status: enum('active','inactive','suspended'), default: 'active'
85
+ - last_login: timestamp, nullable"
86
+
87
+ ### dbutils-get-ddl
88
+
89
+ Retrieves the complete DDL (Data Definition Language) statement for creating the specified table. Returns the original CREATE TABLE statement including all column definitions, constraints, indexes, and table options. This tool is valuable when you need to understand the complete table structure, replicate table structure, or perform database migrations. Note that DDL statement format varies by database type.
90
+
91
+ **Example Interaction**:
92
+
93
+ **You**: "Get the DDL for the products table."
94
+
95
+ **AI**: "Here's the DDL statement for the products table:
96
+ ```sql
97
+ CREATE TABLE products (
98
+ id INT NOT NULL AUTO_INCREMENT,
99
+ name VARCHAR(200) NOT NULL,
100
+ description TEXT,
101
+ price DECIMAL(10,2) NOT NULL,
102
+ category_id INT,
103
+ created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
104
+ updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
105
+ PRIMARY KEY (id),
106
+ INDEX idx_category (category_id),
107
+ CONSTRAINT fk_category FOREIGN KEY (category_id) REFERENCES categories(id)
108
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
109
+ ```"
110
+
74
111
  ### dbutils-get-stats
75
112
 
76
- Gets statistics about a table, such as row count, size, and column statistics.
113
+ Retrieves statistical information about the table, including estimated row count, average row length, data size, index size, and column information. These statistics are valuable for understanding table size, growth trends, and storage characteristics. Use this tool when you need to perform capacity planning, performance optimization, or database maintenance. Note that the precision and availability of statistics may vary by database type.
77
114
 
78
115
  **Example Interaction**:
79
116
 
@@ -87,9 +124,38 @@ Gets statistics about a table, such as row count, size, and column statistics.
87
124
  * category: 8 distinct categories
88
125
  * price: average $45.99, min $5.99, max $299.99"
89
126
 
127
+ ### dbutils-list-indexes
128
+
129
+ Lists all indexes on the specified table, including index names, types (unique/non-unique), index methods (e.g., B-tree), and included columns. Results are grouped by index name, clearly showing the structure of multi-column indexes. Use this tool when you need to optimize query performance, understand table access patterns, or diagnose performance issues.
130
+
131
+ **Example Interaction**:
132
+
133
+ **You**: "List all indexes on the orders table."
134
+
135
+ **AI**: "The orders table has the following indexes:
136
+ 1. **PRIMARY** (Primary Key Index)
137
+ - Column: order_id
138
+ - Type: Unique
139
+ - Method: B-tree
140
+
141
+ 2. **idx_customer** (Regular Index)
142
+ - Column: customer_id
143
+ - Type: Non-unique
144
+ - Method: B-tree
145
+
146
+ 3. **idx_order_date** (Regular Index)
147
+ - Column: order_date
148
+ - Type: Non-unique
149
+ - Method: B-tree
150
+
151
+ 4. **idx_status_created** (Composite Index)
152
+ - Columns: status, created_at
153
+ - Type: Non-unique
154
+ - Method: B-tree"
155
+
90
156
  ### dbutils-list-constraints
91
157
 
92
- Lists constraints for a table, such as primary keys, foreign keys, etc.
158
+ Lists all constraints on the table, including primary keys, foreign keys, unique constraints, and check constraints. Results are grouped by constraint type, clearly showing constraint names and involved columns. For foreign key constraints, referenced tables and columns are also displayed. Use this tool when you need to understand data integrity rules, table relationships, or data validation logic.
93
159
 
94
160
  **Example Interaction**:
95
161
 
@@ -103,7 +169,7 @@ Lists constraints for a table, such as primary keys, foreign keys, etc.
103
169
 
104
170
  ### dbutils-explain-query
105
171
 
106
- Gets the query execution plan and cost estimates.
172
+ Provides the execution plan for a SQL query, showing how the database engine will process the query. Returns detailed execution plan including access methods, join types, sort operations, and estimated costs. Also provides actual execution statistics where available. Use this tool when you need to optimize query performance, understand complex query behavior, or diagnose slow queries. Note that execution plan format varies by database type.
107
173
 
108
174
  **Example Interaction**:
109
175
 
@@ -117,7 +183,7 @@ Gets the query execution plan and cost estimates.
117
183
 
118
184
  ### dbutils-get-performance
119
185
 
120
- Gets database performance metrics.
186
+ Retrieves performance metrics for the database connection, including query count, average execution time, memory usage, and error statistics. These metrics reflect the resource usage of the current session and help monitor and optimize database operations. Use this tool when you need to evaluate query efficiency, identify performance bottlenecks, or monitor resource usage.
121
187
 
122
188
  **Example Interaction**:
123
189
 
@@ -131,7 +197,7 @@ Gets database performance metrics.
131
197
 
132
198
  ### dbutils-analyze-query
133
199
 
134
- Analyzes SQL query performance and provides optimization suggestions.
200
+ Analyzes the performance characteristics of a SQL query, providing execution plan, actual execution time, and optimization suggestions. The tool executes the query (SELECT statements only) and measures performance, then provides specific optimization recommendations based on the results, such as adding indexes, restructuring join conditions, or adjusting query structure. Use this tool when you need to improve query performance, understand performance bottlenecks, or learn query optimization techniques.
135
201
 
136
202
  **Example Interaction**:
137
203
 
@@ -19,7 +19,7 @@ MCP 数据库工具提供了几个您的 AI 可以使用的工具:
19
19
 
20
20
  ### dbutils-list-connections
21
21
 
22
- 列出配置中定义的所有可用数据库连接。
22
+ 列出配置中的所有可用数据库连接,包括数据库类型、主机、端口和数据库名称等详细信息,同时隐藏密码等敏感信息。可选参数check_status允许验证每个连接是否可用,但这可能会增加响应时间。当您需要了解可用的数据库资源或诊断连接问题时使用此工具。
23
23
 
24
24
  **示例交互**:
25
25
 
@@ -45,7 +45,7 @@ MCP 数据库工具提供了几个您的 AI 可以使用的工具:
45
45
 
46
46
  ### dbutils-list-tables
47
47
 
48
- 列出指定数据库中的所有表。
48
+ 列出指定数据库连接中的所有表,包括表名、URI和可用的表描述。结果按数据库类型分组并清晰标记,便于快速识别。当您需要了解数据库结构或查找特定表时使用此工具。只在允许的连接范围内工作。
49
49
 
50
50
  **示例交互**:
51
51
 
@@ -60,7 +60,7 @@ MCP 数据库工具提供了几个您的 AI 可以使用的工具:
60
60
 
61
61
  ### dbutils-run-query
62
62
 
63
- 在指定数据库上执行 SQL 查询(仅限 SELECT 操作)。
63
+ 在指定数据库连接上执行只读SQL查询。为确保安全,仅支持SELECT语句。查询结果以结构化格式返回,包含列名和数据行。支持复杂查询,包括JOIN、GROUP BY、ORDER BY和聚合函数。当您需要分析数据、验证假设或提取特定信息时使用此工具。查询执行受到资源限制和超时保护,以防止过度消耗系统资源。
64
64
 
65
65
  **示例交互**:
66
66
 
@@ -68,9 +68,49 @@ MCP 数据库工具提供了几个您的 AI 可以使用的工具:
68
68
 
69
69
  **AI**:"让我为您查询。根据数据,过去 30 天内有 42 位新客户注册。"
70
70
 
71
+ ### dbutils-describe-table
72
+
73
+ 获取表结构的详细信息,包括列名、数据类型、是否可为空、默认值和注释。结果格式化为易读的层次结构,清晰显示每列的所有属性。当您需要深入了解表结构、分析数据模型或准备查询时使用此工具。支持所有主要数据库类型,并保持一致的输出格式。
74
+
75
+ **示例交互**:
76
+
77
+ **您**:"描述 customers 表的结构。"
78
+
79
+ **AI**:"customers 表的结构如下:
80
+ - id: 整数, 主键, 非空, 自增
81
+ - name: 字符串(100), 非空
82
+ - email: 字符串(100), 唯一, 非空
83
+ - registration_date: 日期, 非空, 默认值: 当前日期
84
+ - status: 枚举('active','inactive','suspended'), 默认值: 'active'
85
+ - last_login: 时间戳, 可为空"
86
+
87
+ ### dbutils-get-ddl
88
+
89
+ 获取创建指定表的完整DDL(数据定义语言)语句。返回原始的CREATE TABLE语句,包括所有列定义、约束、索引和表选项。当您需要理解表的完整结构、复制表结构或进行数据库迁移时,此工具非常有用。DDL语句格式会根据数据库类型而有所不同。
90
+
91
+ **示例交互**:
92
+
93
+ **您**:"获取 products 表的 DDL。"
94
+
95
+ **AI**:"products 表的 DDL 语句如下:
96
+ ```sql
97
+ CREATE TABLE products (
98
+ id INT NOT NULL AUTO_INCREMENT,
99
+ name VARCHAR(200) NOT NULL,
100
+ description TEXT,
101
+ price DECIMAL(10,2) NOT NULL,
102
+ category_id INT,
103
+ created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
104
+ updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
105
+ PRIMARY KEY (id),
106
+ INDEX idx_category (category_id),
107
+ CONSTRAINT fk_category FOREIGN KEY (category_id) REFERENCES categories(id)
108
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
109
+ ```"
110
+
71
111
  ### dbutils-get-stats
72
112
 
73
- 获取表的统计信息,如行数、大小和列统计数据。
113
+ 获取表的统计信息,包括估计行数、平均行长度、数据大小、索引大小和列信息。这些统计数据对于了解表的大小、增长趋势和存储特性非常有价值。当您需要进行容量规划、性能优化或数据库维护时使用此工具。统计信息的精确度和可用性可能因数据库类型而异。
74
114
 
75
115
  **示例交互**:
76
116
 
@@ -84,9 +124,38 @@ MCP 数据库工具提供了几个您的 AI 可以使用的工具:
84
124
  * category:共 8 个不同类别
85
125
  * price:平均价格 $45.99,最低 $5.99,最高 $299.99"
86
126
 
127
+ ### dbutils-list-indexes
128
+
129
+ 列出指定表上的所有索引,包括索引名称、类型(唯一/非唯一)、索引方法(如B树)和包含的列。结果按索引名称分组,清晰显示多列索引的结构。当您需要优化查询性能、理解表的访问模式或诊断性能问题时使用此工具。
130
+
131
+ **示例交互**:
132
+
133
+ **您**:"列出 orders 表的所有索引。"
134
+
135
+ **AI**:"orders 表有以下索引:
136
+ 1. **PRIMARY** (主键索引)
137
+ - 列: order_id
138
+ - 类型: 唯一索引
139
+ - 方法: B树
140
+
141
+ 2. **idx_customer** (普通索引)
142
+ - 列: customer_id
143
+ - 类型: 非唯一索引
144
+ - 方法: B树
145
+
146
+ 3. **idx_order_date** (普通索引)
147
+ - 列: order_date
148
+ - 类型: 非唯一索引
149
+ - 方法: B树
150
+
151
+ 4. **idx_status_created** (复合索引)
152
+ - 列: status, created_at
153
+ - 类型: 非唯一索引
154
+ - 方法: B树"
155
+
87
156
  ### dbutils-list-constraints
88
157
 
89
- 列出表的约束条件,如主键、外键等。
158
+ 列出表上的所有约束,包括主键、外键、唯一约束和检查约束。结果按约束类型分组,清晰显示约束名称和涉及的列。对于外键约束,还会显示引用的表和列。当您需要理解数据完整性规则、表间关系或数据验证逻辑时使用此工具。
90
159
 
91
160
  **示例交互**:
92
161
 
@@ -100,7 +169,7 @@ MCP 数据库工具提供了几个您的 AI 可以使用的工具:
100
169
 
101
170
  ### dbutils-explain-query
102
171
 
103
- 获取查询执行计划和成本估算。
172
+ 获取SQL查询的执行计划,显示数据库引擎将如何处理查询。返回详细的执行计划,包括访问方法、连接类型、排序操作和估计成本。同时提供实际执行统计(如可用)。当您需要优化查询性能、理解复杂查询的行为或诊断慢查询时使用此工具。执行计划格式会根据数据库类型而有所不同。
104
173
 
105
174
  **示例交互**:
106
175
 
@@ -114,7 +183,7 @@ MCP 数据库工具提供了几个您的 AI 可以使用的工具:
114
183
 
115
184
  ### dbutils-get-performance
116
185
 
117
- 获取数据库性能指标。
186
+ 获取数据库连接的性能指标,包括查询计数、平均执行时间、内存使用情况和错误统计。这些指标反映了当前会话的资源使用情况,有助于监控和优化数据库操作。当您需要评估查询效率、识别性能瓶颈或监控资源使用时使用此工具。
118
187
 
119
188
  **示例交互**:
120
189
 
@@ -128,7 +197,7 @@ MCP 数据库工具提供了几个您的 AI 可以使用的工具:
128
197
 
129
198
  ### dbutils-analyze-query
130
199
 
131
- 分析 SQL 查询的性能并提供优化建议。
200
+ 分析SQL查询的性能特性,提供执行计划、实际执行时间和优化建议。工具会执行查询(仅限SELECT语句)并测量性能,然后基于结果提供具体的优化建议,如添加索引、重构连接条件或调整查询结构。当您需要提高查询性能、理解性能瓶颈或学习查询优化技术时使用此工具。
132
201
 
133
202
  **示例交互**:
134
203
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "mcp-dbutils"
3
- version = "0.20.1"
3
+ version = "0.21.0"
4
4
  description = "MCP Database Utilities Service"
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -444,7 +444,7 @@ class ConnectionServer:
444
444
  return [
445
445
  types.Tool(
446
446
  name="dbutils-list-connections",
447
- description="List all available database connections defined in the configuration",
447
+ description="Lists all available database connections defined in the configuration with detailed information including database type, host, port, and database name, while hiding sensitive information like passwords. The optional check_status parameter allows verifying if each connection is available, though this may increase response time. Use this tool when you need to understand available database resources or diagnose connection issues.",
448
448
  inputSchema={
449
449
  "type": "object",
450
450
  "properties": {
@@ -459,7 +459,7 @@ class ConnectionServer:
459
459
  ),
460
460
  types.Tool(
461
461
  name="dbutils-run-query",
462
- description="Execute read-only SQL query on database connection",
462
+ description="Executes read-only SQL queries on the specified database connection. For security, only SELECT statements are supported. Returns structured results with column names and data rows. Supports complex queries including JOINs, GROUP BY, ORDER BY, and aggregate functions. Use this tool when you need to analyze data, validate hypotheses, or extract specific information. Query execution is protected by resource limits and timeouts to prevent system resource overuse.",
463
463
  inputSchema={
464
464
  "type": "object",
465
465
  "properties": {
@@ -477,7 +477,7 @@ class ConnectionServer:
477
477
  ),
478
478
  types.Tool(
479
479
  name="dbutils-list-tables",
480
- description="List all available tables in the specified database connection",
480
+ description="Lists all tables in the specified database connection. Results include table names, URIs, and available table descriptions. Results are grouped by database type and clearly labeled for easy identification. Use this tool when you need to understand database structure or locate specific tables. Only works within the allowed connection scope.",
481
481
  inputSchema={
482
482
  "type": "object",
483
483
  "properties": {
@@ -491,7 +491,7 @@ class ConnectionServer:
491
491
  ),
492
492
  types.Tool(
493
493
  name="dbutils-describe-table",
494
- description="Get detailed information about a table's structure",
494
+ description="Provides detailed information about a table's structure, including column names, data types, nullability, default values, and comments. Results are formatted as an easy-to-read hierarchy that clearly displays all column attributes. Use this tool when you need to understand table structure in depth, analyze data models, or prepare queries. Supports all major database types with consistent output format.",
495
495
  inputSchema={
496
496
  "type": "object",
497
497
  "properties": {
@@ -509,7 +509,7 @@ class ConnectionServer:
509
509
  ),
510
510
  types.Tool(
511
511
  name="dbutils-get-ddl",
512
- description="Get DDL statement for creating the table",
512
+ description="Retrieves the complete DDL (Data Definition Language) statement for creating the specified table. Returns the original CREATE TABLE statement including all column definitions, constraints, indexes, and table options. This tool is valuable when you need to understand the complete table structure, replicate table structure, or perform database migrations. Note that DDL statement format varies by database type.",
513
513
  inputSchema={
514
514
  "type": "object",
515
515
  "properties": {
@@ -527,7 +527,7 @@ class ConnectionServer:
527
527
  ),
528
528
  types.Tool(
529
529
  name="dbutils-list-indexes",
530
- description="List all indexes on the specified table",
530
+ description="Lists all indexes on the specified table, including index names, types (unique/non-unique), index methods (e.g., B-tree), and included columns. Results are grouped by index name, clearly showing the structure of multi-column indexes. Use this tool when you need to optimize query performance, understand table access patterns, or diagnose performance issues.",
531
531
  inputSchema={
532
532
  "type": "object",
533
533
  "properties": {
@@ -545,7 +545,7 @@ class ConnectionServer:
545
545
  ),
546
546
  types.Tool(
547
547
  name="dbutils-get-stats",
548
- description="Get table statistics like row count and size",
548
+ description="Retrieves statistical information about the table, including estimated row count, average row length, data size, index size, and column information. These statistics are valuable for understanding table size, growth trends, and storage characteristics. Use this tool when you need to perform capacity planning, performance optimization, or database maintenance. Note that the precision and availability of statistics may vary by database type.",
549
549
  inputSchema={
550
550
  "type": "object",
551
551
  "properties": {
@@ -563,7 +563,7 @@ class ConnectionServer:
563
563
  ),
564
564
  types.Tool(
565
565
  name="dbutils-list-constraints",
566
- description="List all constraints (primary key, foreign keys, etc) on the table",
566
+ description="Lists all constraints on the table, including primary keys, foreign keys, unique constraints, and check constraints. Results are grouped by constraint type, clearly showing constraint names and involved columns. For foreign key constraints, referenced tables and columns are also displayed. Use this tool when you need to understand data integrity rules, table relationships, or data validation logic.",
567
567
  inputSchema={
568
568
  "type": "object",
569
569
  "properties": {
@@ -581,7 +581,7 @@ class ConnectionServer:
581
581
  ),
582
582
  types.Tool(
583
583
  name="dbutils-explain-query",
584
- description="Get execution plan for a SQL query",
584
+ description="Provides the execution plan for a SQL query, showing how the database engine will process the query. Returns detailed execution plan including access methods, join types, sort operations, and estimated costs. Also provides actual execution statistics where available. Use this tool when you need to optimize query performance, understand complex query behavior, or diagnose slow queries. Note that execution plan format varies by database type.",
585
585
  inputSchema={
586
586
  "type": "object",
587
587
  "properties": {
@@ -599,7 +599,7 @@ class ConnectionServer:
599
599
  ),
600
600
  types.Tool(
601
601
  name="dbutils-get-performance",
602
- description="Get database performance statistics",
602
+ description="Retrieves performance metrics for the database connection, including query count, average execution time, memory usage, and error statistics. These metrics reflect the resource usage of the current session and help monitor and optimize database operations. Use this tool when you need to evaluate query efficiency, identify performance bottlenecks, or monitor resource usage.",
603
603
  inputSchema={
604
604
  "type": "object",
605
605
  "properties": {
@@ -613,7 +613,7 @@ class ConnectionServer:
613
613
  ),
614
614
  types.Tool(
615
615
  name="dbutils-analyze-query",
616
- description="Analyze a SQL query for performance",
616
+ description="Analyzes the performance characteristics of a SQL query, providing execution plan, actual execution time, and optimization suggestions. The tool executes the query (SELECT statements only) and measures performance, then provides specific optimization recommendations based on the results, such as adding indexes, restructuring join conditions, or adjusting query structure. Use this tool when you need to improve query performance, understand performance bottlenecks, or learn query optimization techniques.",
617
617
  inputSchema={
618
618
  "type": "object",
619
619
  "properties": {
@@ -159,12 +159,12 @@ class TestConnectionServerTools:
159
159
 
160
160
  # Verify the first tool is dbutils-list-connections
161
161
  assert tools[0].name == "dbutils-list-connections"
162
- assert "List all available database connections" in tools[0].description
162
+ assert "Lists all available database connections" in tools[0].description
163
163
 
164
164
  # Verify dbutils-run-query is also in the tools
165
165
  run_query_tools = [tool for tool in tools if tool.name == "dbutils-run-query"]
166
166
  assert len(run_query_tools) == 1
167
- assert "Execute read-only SQL query" in run_query_tools[0].description
167
+ assert "Executes read-only SQL queries" in run_query_tools[0].description
168
168
 
169
169
  # Check that all tools have the required properties
170
170
  for tool in tools:
File without changes
File without changes