Skip to content

fix(mcp): serialize multiple databases in list_connections and add list_databases tool#426

Open
erneztox wants to merge 1 commit into
TabularisDB:mainfrom
erneztox:fix-mcp-databases
Open

fix(mcp): serialize multiple databases in list_connections and add list_databases tool#426
erneztox wants to merge 1 commit into
TabularisDB:mainfrom
erneztox:fix-mcp-databases

Conversation

@erneztox

@erneztox erneztox commented Jul 3, 2026

Copy link
Copy Markdown

Hey! As discussed in the issue, here is the PR to improve the MCP server database discovery.

What changed?

  1. Fix list_connections array serialization: In src-tauri/src/mcp/mod.rs, changed the database property extraction from .to_string() (which called .primary() and dropped items) to .as_vec(). Now the MCP client correctly sees all databases configured in a single connection.
  2. Add list_databases tool: Added a native list_databases tool leveraging the existing driver.get_databases() trait. This allows the LLM to query and discover all available databases natively through the connection without needing to manually run SQL queries.

Testing

  • Tested locally by passing JSON-RPC requests via stdio to the tabularis --mcp binary.
  • Validated that list_connections outputs the full array.
  • Validated that list_databases connects to the engine and returns the schemas correctly.
  • Code compiles perfectly with cargo check.

Let me know if you need any adjustments!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant