[pull] main from googleapis:main#259
Merged
pull[bot] merged 1 commit intoJaleel-zhu:mainfrom Dec 1, 2025
Merged
Conversation
## Description This pull request resolves issue [#36](gemini-cli-extensions/sql-server#36) by introducing default connection parameters for the MSSQL prebuilt tool. If a user does not specify a host or port, the tool will now default to localhost:1433 **Changes Implemented** The modification is in internal/prebuiltconfigs/tools/mssql.yaml, where the host and port fields now include default values: host: ${MSSQL_HOST:localhost} port: ${MSSQL_PORT:1433} This configuration allows the tool to function using the defaults, but users can still set the MSSQL_HOST or MSSQL_PORT environment variables to override them. **Validation Process** Validated changes by running the toolbox against a Microsoft SQL Server instance hosted in a Docker container. - **Database Setup:** A testdb database containing a products table was initialized. - **CLI Configuration:** The ~/.gemini/settings.json file was updated to point to my local toolbox build. - **Tool Launch:** The UI was started using go run . --prebuilt mssql --ui - **Testing:** Confirmed the connection logic by testing two scenarios. One with the environment variables set and one without (to confirm the default logic). **1.** Default Value Connection: For this test, the MSSQL_HOST and MSSQL_PORT environment variables were not defined. The application correctly utilized the new default values (localhost:1433) to connect to the testdb. <img width="2175" height="1144" alt="Screenshot 2025-11-12 6 33 05 PM" src="https://github.com/user-attachments/assets/bacfc9bf-8b35-42e1-ad53-4af3aef27125" /> **2.** Explicit Variable Connection: For the second test, MSSQL_HOST and MSSQL_PORT were set to specific values. The application correctly prioritized these variables over the new defaults and connected successfully. <img width="2175" height="1144" alt="Screenshot 2025-11-12 6 37 02 PM" src="https://github.com/user-attachments/assets/61254849-211d-41f4-8c7d-ff92cf64a51c" /> Result: Both connection methods were verified by executing the list_tables prebuilt tool via the UI. In each scenario, the tool successfully retrieved the UserDetails table, confirming the changes. <img width="2250" height="1144" alt="Screenshot 2025-11-12 6 38 12 PM" src="https://github.com/user-attachments/assets/87085777-897e-4a74-9e3f-f36cc8a33305" /> ## PR Checklist > Thank you for opening a Pull Request! Before submitting your PR, there are a > few things you can do to make sure it goes smoothly: - [ ] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) - [ ] Make sure to add `!` if this involve a breaking change 🛠️ Fixes [#36](gemini-cli-extensions/sql-server#36)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )