mcp-dbutils 0.7.0__py3-none-any.whl → 0.8.0__py3-none-any.whl
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.
- mcp_dbutils/base.py +5 -5
- {mcp_dbutils-0.7.0.dist-info → mcp_dbutils-0.8.0.dist-info}/METADATA +1 -1
- {mcp_dbutils-0.7.0.dist-info → mcp_dbutils-0.8.0.dist-info}/RECORD +6 -6
- {mcp_dbutils-0.7.0.dist-info → mcp_dbutils-0.8.0.dist-info}/WHEEL +0 -0
- {mcp_dbutils-0.7.0.dist-info → mcp_dbutils-0.8.0.dist-info}/entry_points.txt +0 -0
- {mcp_dbutils-0.7.0.dist-info → mcp_dbutils-0.8.0.dist-info}/licenses/LICENSE +0 -0
mcp_dbutils/base.py
CHANGED
@@ -204,8 +204,8 @@ class DatabaseServer:
|
|
204
204
|
async def handle_list_tools() -> list[types.Tool]:
|
205
205
|
return [
|
206
206
|
types.Tool(
|
207
|
-
name="query",
|
208
|
-
description="Execute read-only SQL query",
|
207
|
+
name="dbutils-run-query",
|
208
|
+
description="Execute read-only SQL query on database",
|
209
209
|
inputSchema={
|
210
210
|
"type": "object",
|
211
211
|
"properties": {
|
@@ -222,7 +222,7 @@ class DatabaseServer:
|
|
222
222
|
}
|
223
223
|
),
|
224
224
|
types.Tool(
|
225
|
-
name="
|
225
|
+
name="dbutils-list-tables",
|
226
226
|
description="List all available tables in the specified database",
|
227
227
|
inputSchema={
|
228
228
|
"type": "object",
|
@@ -244,7 +244,7 @@ class DatabaseServer:
|
|
244
244
|
|
245
245
|
database = arguments["database"]
|
246
246
|
|
247
|
-
if name == "
|
247
|
+
if name == "dbutils-list-tables":
|
248
248
|
async with self.get_handler(database) as handler:
|
249
249
|
tables = await handler.get_tables()
|
250
250
|
if not tables:
|
@@ -260,7 +260,7 @@ class DatabaseServer:
|
|
260
260
|
])
|
261
261
|
# 添加数据库类型前缀
|
262
262
|
return [types.TextContent(type="text", text=f"[{handler.db_type}]\n{formatted_tables}")]
|
263
|
-
elif name == "query":
|
263
|
+
elif name == "dbutils-run-query":
|
264
264
|
sql = arguments.get("sql", "").strip()
|
265
265
|
if not sql:
|
266
266
|
raise ConfigurationError("SQL query cannot be empty")
|
@@ -1,5 +1,5 @@
|
|
1
1
|
mcp_dbutils/__init__.py,sha256=xcfE1spAaONAoxBYB1ZyDX8tw7nxV1PMqo_RwxLDp0A,1892
|
2
|
-
mcp_dbutils/base.py,sha256=
|
2
|
+
mcp_dbutils/base.py,sha256=a6wBdSGsbPQq7fKb_H-relSKbDZov-d75G_Q3S_aYP4,11284
|
3
3
|
mcp_dbutils/config.py,sha256=EwnPNuQVCBKd5WOXQfROyDTM-YpM_Odp0GhCPRg8YwE,1863
|
4
4
|
mcp_dbutils/log.py,sha256=fibVIwsb1HVU5zriGrDZTMEirKjgIuxuN_B_YTdAJ7I,996
|
5
5
|
mcp_dbutils/stats.py,sha256=2hiKi_M8V4xhVHlH5FS-Df5GuMEpuzif12C8ik06Khs,2538
|
@@ -11,8 +11,8 @@ mcp_dbutils/sqlite/__init__.py,sha256=QV4th2ywzUmCCa3GHCcBf8blJ_E8OYy0dJ2fSf1TfS
|
|
11
11
|
mcp_dbutils/sqlite/config.py,sha256=RTHT2Xx--g-osD73CpT8DrCk0VHpHfPil3D6YUzXD-g,4519
|
12
12
|
mcp_dbutils/sqlite/handler.py,sha256=bf_k93rCcJn09zc7tsqrlbiTGUg3FspimfWKxK_JQTs,4970
|
13
13
|
mcp_dbutils/sqlite/server.py,sha256=7Bbq9l7Ca_4dzkAbbdRcXxvHoO_NFLzZHwlhKB0HIJc,7724
|
14
|
-
mcp_dbutils-0.
|
15
|
-
mcp_dbutils-0.
|
16
|
-
mcp_dbutils-0.
|
17
|
-
mcp_dbutils-0.
|
18
|
-
mcp_dbutils-0.
|
14
|
+
mcp_dbutils-0.8.0.dist-info/METADATA,sha256=403i2poAoHqP0HCb_w0PL7Dj7e59aewKZaaS_KEiPYA,10840
|
15
|
+
mcp_dbutils-0.8.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
16
|
+
mcp_dbutils-0.8.0.dist-info/entry_points.txt,sha256=XTjt0QmYRgKOJQT6skR9bp1EMUfIrgpHeZJPZ3CJffs,49
|
17
|
+
mcp_dbutils-0.8.0.dist-info/licenses/LICENSE,sha256=1A_CwpWVlbjrKdVEYO77vYfnXlW7oxcilZ8FpA_BzCI,1065
|
18
|
+
mcp_dbutils-0.8.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|