Skip to content

Commit cd42dcf

Browse files
docs: update docs (#1)
* docs: update docs * update docs * typo * Update README.md * nit * nit --------- Co-authored-by: Averi Kitsch <akitsch@google.com>
1 parent b0e4ca6 commit cd42dcf

File tree

4 files changed

+69
-54
lines changed

4 files changed

+69
-54
lines changed

CONTRIBUTING.md

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,32 @@
11
# How to Contribute
22

3-
We'd love to accept your patches and contributions to this project. There are
4-
just a few small guidelines you need to follow.
3+
We would love to accept your patches and contributions to this project.
54

6-
## Contributor License Agreement
5+
## Before you begin
76

8-
Contributions to this project must be accompanied by a Contributor License
9-
Agreement (CLA). You (or your employer) retain the copyright to your
10-
contribution; this simply gives us permission to use and redistribute your
11-
contributions as part of the project. Head over to
12-
<https://cla.developers.google.com/> to see your current agreements on file or
13-
to sign a new one.
7+
### Sign our Contributor License Agreement
148

15-
You generally only need to submit a CLA once, so if you've already submitted one
16-
(even if it was for a different project), you probably don't need to do it
17-
again.
9+
Contributions to this project must be accompanied by a
10+
[Contributor License Agreement](https://cla.developers.google.com/about) (CLA).
11+
You (or your employer) retain the copyright to your contribution; this simply
12+
gives us permission to use and redistribute your contributions as part of the
13+
project.
1814

19-
## Code Reviews
15+
If you or your current employer have already signed the Google CLA (even if it
16+
was for a different project), you probably don't need to do it again.
2017

21-
All submissions, including submissions by project members, require review. We
22-
use GitHub pull requests for this purpose. Consult
23-
[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more
24-
information on using pull requests.
18+
Visit <https://cla.developers.google.com/> to see your current agreements or to
19+
sign a new one.
20+
21+
### Review our Community Guidelines
22+
23+
This project follows [Google's Open Source Community
24+
Guidelines](https://opensource.google/conduct/).
2525

26-
## Community Guidelines
26+
## Contribution process
2727

28-
This project follows
29-
[Google's Open Source Community Guidelines](https://opensource.google/conduct/).
28+
### Code Reviews
29+
30+
All submissions, including submissions by project members, require review. We
31+
use [GitHub pull requests](https://docs.github.com/articles/about-pull-requests)
32+
for this purpose.

README.md

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,52 +2,58 @@
22

33
This Gemini CLI extension provides a set of tools to interact with [Microsoft SQL Server](https://docs.microsoft.com/en-us/sql/) instances. It allows you to manage your databases, execute queries, and explore schemas directly from the [Gemini CLI](https://google-gemini.github.io/gemini-cli/), using natural language prompts.
44

5-
## Features
5+
## Why Use the SQL Server Extension?
66

7-
* **Integrated with Gemini CLI:** As a Google-developed extension, it integrates seamlessly into the Gemini CLI environment, making security an accessible part of your workflow.
8-
* **Connect to SQL Server:** Securely connect to your SQL Server instances.
9-
* **Explore Database Schema:** List databases, tables, views, and schemas.
10-
* **Query your Database:** Execute SQL queries against your database.
11-
12-
## Supported Tools
13-
14-
* `list_tables`
15-
* `execute_sql`
7+
* **Natural Language Management:** Stop wrestling with complex commands. Explore schemas and query data by describing what you want in plain English.
8+
* **Seamless Workflow:** As a Google-developed extension, it integrates seamlessly into the Gemini CLI environment. No need to constantly switch contexts for common database tasks.
9+
* **Code Generation:** Accelerate development by asking Gemini to generate data classes and other code snippets based on your table schemas.
1610

1711
## Prerequisites
1812

1913
Before you begin, ensure you have the following:
2014

21-
* [Gemini CLI](https://github.com/google-gemini/gemini-cli) installed.
22-
* A running SQL Server instance.
15+
* [Gemini CLI](https://github.com/google-gemini/gemini-cli) installed.
16+
* A running SQL Server instance.
17+
* A user with database-level permissions to execute queries.
2318

2419
## Installation
2520

2621
To install the extension, use the command:
2722

2823
```bash
29-
gemini extensions install github.com/gemini-cli-extensions/sql-server.git
24+
gemini extensions install github.com/gemini-cli-extensions/sql-server
3025
```
3126

3227
## Configuration
3328

34-
* `MSSQL_HOST`: The hostname or IP address of the SQL Server.
35-
* `MSSQL_PORT`: The port number of the SQL Server.
36-
* `MSSQL_DATABASE`: The name of the database to connect to.
37-
* `MSSQL_USER`: The username for authentication.
38-
* `MSSQL_PASSWORD`: The password for authentication.
29+
Set the following environment variables before starting the Gemini CLI:
3930

31+
* `MSSQL_HOST`: The hostname or IP address of the SQL Server.
32+
* `MSSQL_PORT`: The port number of the SQL Server.
33+
* `MSSQL_DATABASE`: The name of the database to connect to.
34+
* `MSSQL_USER`: The username for authentication.
35+
* `MSSQL_PASSWORD`: The password for authentication.
4036

41-
## Usage
37+
## Usage Examples
4238

43-
* Explore Schemas and Data
44-
* Generate code
39+
Interact with SQl Server using natural language right from your IDE:
40+
41+
* **Explore Schemas and Data:**
42+
* "Show me all tables in the 'orders' database."
43+
* "What are the columns in the 'products' table?"
44+
* "How many orders were placed in the last 30 days, and what were the top 5 most purchased items?"
45+
* **Generate Code:**
46+
* "Generate a Python dataclass to represent the 'customers' table."
47+
48+
## Supported Tools
4549

50+
* `list_tables`: lists schema information for all or specified tables in a SQL server database.
51+
* `execute_sql`: executes a SQL statement against a SQL Server database.
4652

47-
## Security
53+
## Additional Extensions
4854

49-
This extension executes commands against your SQL Server database. Always review the generated SQL queries before execution, especially for write operations.
55+
Find additional extensions to support your entire software development lifecycle at [github.com/gemini-cli-extensions](https://github.com/gemini-cli-extensions).
5056

51-
## Disclaimer
57+
## Troubleshooting
5258

53-
This is not an officially supported Google product. This extension is under active development, and breaking changes may be introduced.
59+
* "cannot execute binary file": Ensure the correct binary for your OS/Architecture has been downloaded. See [Installing the server](https://googleapis.github.io/genai-toolbox/getting-started/introduction/#installing-the-server) for more information.

SQL-SERVER.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
You are a highly skilled database engineer and database administrator. Your purpose is to help the developer build and interact with databases and utilize data context throughout the entire software delivery cycle.
2+
3+
--
4+
5+
# Setups
6+
17
# SQL Server Extension
28

39
This document provides instructions for the Gemini agent to assist users with the SQL Server extension.
@@ -6,14 +12,14 @@ This document provides instructions for the Gemini agent to assist users with th
612

713
This section covers connecting to a SQL Server instance.
814

9-
1. **Verify Environment Variables**: Before attempting to connect, confirm with the user that the following environment variables are set in the extension configuration or their shell environment.
15+
1. **Verify Environment Variables**: The extension requires the following environment variables to be set before the Gemini CLI is started:
1016

11-
* `MSSQL_HOST`: The hostname or IP address of the SQL Server.
12-
* `MSSQL_PORT`: The port number of the SQL Server.
13-
* `MSSQL_DATABASE`: The name of the database to connect to.
14-
* `MSSQL_USER`: The username for authentication.
15-
* `MSSQL_PASSWORD`: The password for authentication.
17+
* `MSSQL_HOST`: The hostname or IP address of the SQL Server.
18+
* `MSSQL_PORT`: The port number of the SQL Server.
19+
* `MSSQL_DATABASE`: The name of the database to connect to.
20+
* `MSSQL_USER`: The username for authentication.
21+
* `MSSQL_PASSWORD`: The password for authentication.
1622

17-
2. **Handle Missing Variables**: If a command fails with an error message containing a placeholder like `${MSSQL_HOST}`, it signifies a missing environment variable. Inform the user which variable is missing and instruct them to set it.
23+
2. **Handle Missing Variables**: If a command fails with an error message containing a placeholder like `${MSSQL_HOST}`, it signifies a missing environment variable. Inform the user which variable is missing and instruct them to set it.
1824

19-
3. **Handle Permission Errors**: If you encounter permission errors, ensure the user has the correct privileges on the SQL Server database.
25+
3. **Handle Permission Errors**: If an operation fails due to permission, it is likely that the user does not have the correct privileges on the SQL Server database. Database-level permissions (e.g., SELECT, INSERT) are required to execute queries.

gemini-extension.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.1.0",
44
"description": "Connect to SQL Server",
55
"mcpServers": {
6-
"PostgreSQL": {
6+
"SQL Server": {
77
"command": "${extensionPath}${/}toolbox",
88
"args": [
99
"--prebuilt",

0 commit comments

Comments
 (0)