Skip to content

feat(mcp): advertise discovery tool per connection in list_connections - #135

Merged
Blankll merged 3 commits into
masterfrom
feat/mcp-discover-connection
Aug 11, 2026
Merged

feat(mcp): advertise discovery tool per connection in list_connections#135
Blankll merged 3 commits into
masterfrom
feat/mcp-discover-connection

Conversation

@Blankll

@Blankll Blankll commented Aug 10, 2026

Copy link
Copy Markdown
Member

Summary

Improves sqlkit MCP capability completeness and discoverability.

Changes

Discoverability

  • list_connections now includes a discover field per connection, pointing at sqlkit__list_tables as the first step to explore a connection's objects before querying.

New tools (9)

Registers previously-implemented adapter methods as MCP tools, each covering all ActiveConnection variants (Postgres, MySQL, SQLite, SQLServer, ClickHouse, JDBC, HttpSQL, Rqlite, Turso):

Tool Function
sqlkit__list_indexes Table index list
sqlkit__list_foreign_keys Table foreign keys
sqlkit__list_views Database views
sqlkit__list_procedures Stored procedures
sqlkit__list_functions Functions
sqlkit__list_triggers Table triggers
sqlkit__get_object_ddl Object DDL source
sqlkit__get_table_info Table metadata
sqlkit__get_foreign_keys Schema-level foreign keys

MCP tool count grows from 11 → 20.

Testing

  • 14 new unit tests (missing config + required-arg validation per handler)
  • cargo test --lib passes: 347/347 (was 333)
  • cargo check passes
  • 18/18 mcp_bridge tests pass

Blankll and others added 3 commits August 10, 2026 15:43
Each sqlkit connection now carries a 'discover' field pointing at sqlkit__list_tables as the first step to explore its objects, so agents know how to start querying any connection.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Expose 9 previously-implemented adapter methods as MCP tools: list_indexes, list_foreign_keys, list_views, list_procedures, list_functions, list_triggers, get_object_ddl, get_table_info, get_foreign_keys. Each handler covers all ActiveConnection variants. Adds 14 unit tests (missing config + required-arg validation).

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
… test

list_indexes, list_foreign_keys, list_triggers, get_object_ddl: database marked required in schema but treated as optional in handler — now optional, consistent with list_tables. discover_tool_for: simplified no-op match to direct return. Added test for missing object_type validation in get_object_ddl.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
@Blankll
Blankll merged commit a976db2 into master Aug 11, 2026
3 checks passed
@Blankll
Blankll deleted the feat/mcp-discover-connection branch August 11, 2026 02:01
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