-
-
Notifications
You must be signed in to change notification settings - Fork 20
Add the missing params for tool get_table_schema #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe update modifies the registration of the "get_table_schema" tool in the MCP server by introducing two new optional string parameters, "catalog" and "schema," in addition to the existing "table" parameter. No other logic or control flow is changed. Changes
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (1.64.8)Error: you are using a configuration file for golangci-lint v2 with golangci-lint v1: please use golangci-lint v2 ✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
cmd/main.go (1)
172-173
: Verify handler implementation supports the new parameters.The addition of optional
catalog
andschema
parameters makes logical sense and aligns with Trino's hierarchical table identification (catalog.schema.table). This change also brings consistency with other tools likelist_tables
that already accept these parameters.However, ensure that the
h.GetTableSchema
handler implementation has been updated to process these new optional parameters.#!/bin/bash # Description: Verify that the GetTableSchema handler method supports catalog and schema parameters # Expected: The handler should accept and process catalog/schema parameters from the tool arguments # Search for the GetTableSchema handler implementation ast-grep --pattern 'func ($$$) GetTableSchema($$$) $$$' # Also search for any parameter processing within the handler rg -A 10 -B 5 "GetTableSchema"Consider enhancing the parameter descriptions for better clarity:
- mcp.WithString("catalog", mcp.Description("Catalog")), - mcp.WithString("schema", mcp.Description("Schema")), + mcp.WithString("catalog", mcp.Description("Trino catalog name (optional)")), + mcp.WithString("schema", mcp.Description("Schema name within the catalog (optional)")),
@frdeng could you sign DCO? See https://github.com/tuannvm/mcp-trino/pull/54/checks?check_run_id=44515115938 Thanks! |
Summary by CodeRabbit