Skip to content

Commit c868086

Browse files
committed
MCP: A few updates about JDBC and CrateDB nightly re. current_database
1 parent d2cc8b1 commit c868086

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

framework/mcp/backlog.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
## Iteration +1
44
- Builtin: Submit a CrateDB adapter, getting rid of the
55
`Could not roll back transaction: error`
6-
- JDBC: Tool `list_tables` currently blocks.
7-
- JDBC: Tool `describe_table` does not work.
8-
Problem with `SELECT current_database()`.
9-
https://github.com/crate/crate/issues/17393
106
- DBHub: Reading resource `tables` does not work,
117
because `WHERE table_schema = 'public'`
128
- PG-MCP: Improve installation after packaging has been improved.

framework/mcp/example_jdbc.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ async def run():
3838

3939
# Call a few tools.
4040
await client.call_tool("database_info")
41-
# FIXME: This operation currently blocks.
42-
# await client.call_tool("list_tables", arguments={})
41+
await client.call_tool("list_tables")
4342
await client.call_tool("describe_table", arguments={"schema": "sys", "table": "summits"})
4443
await client.call_tool("read_query", arguments={"query": "SELECT * FROM sys.summits ORDER BY height DESC LIMIT 3"})
4544
await client.call_tool("create_table", arguments={"query": "CREATE TABLE IF NOT EXISTS testdrive.mcp_jdbc (id INT, data TEXT)"})

framework/mcp/test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ def test_jdbc():
6969
assert b"Calling tool: database_info" in p.stdout
7070
assert b"database_product_name: PostgreSQL" in p.stdout
7171
assert b"driver_name: PostgreSQL JDBC Driver" in p.stdout
72+
assert b"Calling tool: list_tables" in p.stdout
73+
assert b'TABLE_NAME: jobs_log' in p.stdout
7274
assert b"Calling tool: describe_table" in p.stdout
73-
# FIXME: Problem with `SELECT current_database()`.
74-
# https://github.com/crate/crate/issues/17393
75-
assert b"Failed to describe table: The column name current_database was not found in this ResultSet." in p.stdout
75+
assert b'coordinates' in p.stdout
7676
assert b"Calling tool: read_query" in p.stdout
7777
assert b'mountain: Mont Blanc' in p.stdout
7878

0 commit comments

Comments
 (0)