mcp-dbutils 0.7.0__tar.gz → 0.8.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.
- {mcp_dbutils-0.7.0 → mcp_dbutils-0.8.0}/CHANGELOG.md +14 -0
- {mcp_dbutils-0.7.0 → mcp_dbutils-0.8.0}/PKG-INFO +1 -1
- {mcp_dbutils-0.7.0 → mcp_dbutils-0.8.0}/pyproject.toml +1 -1
- {mcp_dbutils-0.7.0 → mcp_dbutils-0.8.0}/src/mcp_dbutils/base.py +5 -5
- {mcp_dbutils-0.7.0 → mcp_dbutils-0.8.0}/tests/integration/test_tools.py +4 -4
- {mcp_dbutils-0.7.0 → mcp_dbutils-0.8.0}/.coveragerc +0 -0
- {mcp_dbutils-0.7.0 → mcp_dbutils-0.8.0}/.github/workflows/release.yml +0 -0
- {mcp_dbutils-0.7.0 → mcp_dbutils-0.8.0}/.github/workflows/test.yml +0 -0
- {mcp_dbutils-0.7.0 → mcp_dbutils-0.8.0}/.gitignore +0 -0
- {mcp_dbutils-0.7.0 → mcp_dbutils-0.8.0}/Dockerfile +0 -0
- {mcp_dbutils-0.7.0 → mcp_dbutils-0.8.0}/LICENSE +0 -0
- {mcp_dbutils-0.7.0 → mcp_dbutils-0.8.0}/README.md +0 -0
- {mcp_dbutils-0.7.0 → mcp_dbutils-0.8.0}/README_CN.md +0 -0
- {mcp_dbutils-0.7.0 → mcp_dbutils-0.8.0}/config.yaml.example +0 -0
- {mcp_dbutils-0.7.0 → mcp_dbutils-0.8.0}/smithery.yaml +0 -0
- {mcp_dbutils-0.7.0 → mcp_dbutils-0.8.0}/src/mcp_dbutils/__init__.py +0 -0
- {mcp_dbutils-0.7.0 → mcp_dbutils-0.8.0}/src/mcp_dbutils/config.py +0 -0
- {mcp_dbutils-0.7.0 → mcp_dbutils-0.8.0}/src/mcp_dbutils/log.py +0 -0
- {mcp_dbutils-0.7.0 → mcp_dbutils-0.8.0}/src/mcp_dbutils/postgres/__init__.py +0 -0
- {mcp_dbutils-0.7.0 → mcp_dbutils-0.8.0}/src/mcp_dbutils/postgres/config.py +0 -0
- {mcp_dbutils-0.7.0 → mcp_dbutils-0.8.0}/src/mcp_dbutils/postgres/handler.py +0 -0
- {mcp_dbutils-0.7.0 → mcp_dbutils-0.8.0}/src/mcp_dbutils/postgres/server.py +0 -0
- {mcp_dbutils-0.7.0 → mcp_dbutils-0.8.0}/src/mcp_dbutils/sqlite/__init__.py +0 -0
- {mcp_dbutils-0.7.0 → mcp_dbutils-0.8.0}/src/mcp_dbutils/sqlite/config.py +0 -0
- {mcp_dbutils-0.7.0 → mcp_dbutils-0.8.0}/src/mcp_dbutils/sqlite/handler.py +0 -0
- {mcp_dbutils-0.7.0 → mcp_dbutils-0.8.0}/src/mcp_dbutils/sqlite/server.py +0 -0
- {mcp_dbutils-0.7.0 → mcp_dbutils-0.8.0}/src/mcp_dbutils/stats.py +0 -0
- {mcp_dbutils-0.7.0 → mcp_dbutils-0.8.0}/tests/conftest.py +0 -0
- {mcp_dbutils-0.7.0 → mcp_dbutils-0.8.0}/tests/integration/test_monitoring.py +0 -0
- {mcp_dbutils-0.7.0 → mcp_dbutils-0.8.0}/tests/integration/test_postgres.py +0 -0
- {mcp_dbutils-0.7.0 → mcp_dbutils-0.8.0}/tests/integration/test_postgres_config.py +0 -0
- {mcp_dbutils-0.7.0 → mcp_dbutils-0.8.0}/tests/integration/test_prompts.py +0 -0
- {mcp_dbutils-0.7.0 → mcp_dbutils-0.8.0}/tests/integration/test_sqlite.py +0 -0
- {mcp_dbutils-0.7.0 → mcp_dbutils-0.8.0}/tests/integration/test_sqlite_config.py +0 -0
- {mcp_dbutils-0.7.0 → mcp_dbutils-0.8.0}/tests/unit/test_stats.py +0 -0
@@ -1,6 +1,20 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
3
|
|
4
|
+
## v0.8.0 (2025-03-09)
|
5
|
+
|
6
|
+
### Features
|
7
|
+
|
8
|
+
- Unify tool names with dbutils prefix ([#11](https://github.com/donghao1393/mcp-dbutils/pull/11),
|
9
|
+
[`30ebbc2`](https://github.com/donghao1393/mcp-dbutils/commit/30ebbc251be55f7d18fc9873021151b82c3f0fde))
|
10
|
+
|
11
|
+
给工具名称添加dbutils前缀,使所有工具名称规范统一: - query -> dbutils-run-query - list_tables -> dbutils-list-tables
|
12
|
+
|
13
|
+
让工具名称更清晰地表明是属于dbutils的工具,避免与其他MCP服务的工具冲突。
|
14
|
+
|
15
|
+
Fixes #11
|
16
|
+
|
17
|
+
|
4
18
|
## v0.7.0 (2025-03-09)
|
5
19
|
|
6
20
|
### Documentation
|
@@ -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")
|
@@ -43,11 +43,11 @@ async def test_list_tables_tool(postgres_db, sqlite_db, mcp_config):
|
|
43
43
|
# List available tools
|
44
44
|
response = await client.list_tools()
|
45
45
|
tool_names = [tool.name for tool in response.tools]
|
46
|
-
assert "
|
47
|
-
assert "query" in tool_names
|
46
|
+
assert "dbutils-list-tables" in tool_names
|
47
|
+
assert "dbutils-run-query" in tool_names
|
48
48
|
|
49
49
|
# Test list_tables tool with PostgreSQL
|
50
|
-
result = await client.call_tool("
|
50
|
+
result = await client.call_tool("dbutils-list-tables", {"database": "test_pg"})
|
51
51
|
assert len(result.content) == 1
|
52
52
|
assert result.content[0].type == "text"
|
53
53
|
# 检查数据库类型前缀
|
@@ -55,7 +55,7 @@ async def test_list_tables_tool(postgres_db, sqlite_db, mcp_config):
|
|
55
55
|
assert "users" in result.content[0].text
|
56
56
|
|
57
57
|
# Test list_tables tool with SQLite
|
58
|
-
result = await client.call_tool("
|
58
|
+
result = await client.call_tool("dbutils-list-tables", {"database": "test_sqlite"})
|
59
59
|
assert len(result.content) == 1
|
60
60
|
assert result.content[0].type == "text"
|
61
61
|
# 检查数据库类型前缀
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|