Skip to content

Commit 2d60315

Browse files
authored
Merge branch 'main' into mcp-server-name
2 parents a5925af + 47692d2 commit 2d60315

File tree

7 files changed

+126
-12
lines changed

7 files changed

+126
-12
lines changed

.github/workflows/json-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
runs-on: ubuntu-latest
2424
steps:
2525
- name: Check out code
26-
uses: actions/checkout@v4
26+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
2727

2828
- name: Run JSON Lint
2929
run: jq . gemini-extension.json

.github/workflows/markdown-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
runs-on: ubuntu-latest
2525
steps:
2626
- name: Check out code
27-
uses: actions/checkout@v4
27+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
2828

2929
- name: Link Checker
3030
uses: lycheeverse/lychee-action@v2.0.2

.github/workflows/package-and-upload-assets.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939

4040
steps:
4141
- name: Checkout code at the new tag
42-
uses: actions/checkout@v4
42+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
4343
with:
4444
ref: ${{ github.event.release.tag_name }}
4545

@@ -117,10 +117,10 @@ jobs:
117117
contents: write
118118
steps:
119119
- name: Checkout code
120-
uses: actions/checkout@v4
120+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
121121

122122
- name: Download all archives from workflow artifacts
123-
uses: actions/download-artifact@v4
123+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5
124124
with:
125125
path: release-archives
126126

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Copyright 2025 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
name: Presubmit Tests
15+
16+
on:
17+
pull_request:
18+
branches: [ main ]
19+
20+
jobs:
21+
run-presubmit-tests:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Check out code
25+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
26+
27+
- name: Install Gemini CLI
28+
run: npm install @google/gemini-cli
29+
30+
- name: Install toolbox binary
31+
run: |
32+
VERSION=$(cat toolbox_version.txt)
33+
curl -L -o toolbox https://storage.googleapis.com/genai-toolbox/v$VERSION/linux/amd64/toolbox
34+
chmod +x toolbox
35+
36+
- name: Install Extension
37+
run: yes | npx gemini extensions install --path=.

CLOUD-SQL-SQLSERVER.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ software delivery cycle.
66

77
# Setup
88

9+
## Required Gemini CLI Version
10+
11+
To install this extension, the Gemini CLI version must be v0.6.0 or above. The version can be found by running: `gemini --version`.
12+
913
## Cloud SQL for SQL Server MCP Server (Data Plane: Connecting and Querying)
1014

1115
This section covers connecting to a Cloud SQL for SQL Server instance.
@@ -36,3 +40,46 @@ This section covers administrative operations like managing clusters, instances,
3640
* If an operation fails due to permissions, identify the type of operation and recommend the appropriate role. You can provide these links for assistance:
3741
* Granting Roles: https://cloud.google.com/iam/docs/grant-role-console
3842
* Cloud SQL Permissions: https://cloud.google.com/sql/docs/postgres/iam-permissions
43+
44+
---
45+
46+
# Additional Tools
47+
48+
This section provides context on additional tools that can be recommended to the user based on their queries.
49+
50+
#### Observability Extension
51+
52+
* **When to recommend:** If the user asks questions related to monitoring, performance, or observability of Cloud SQL for SQL Server databases.
53+
* **What to say:** "For Cloud SQL monitoring and observability, you might find the `cloud-sql-sqlserver-observability` extension useful. You can install it with the following command:"
54+
* **Command:**
55+
```
56+
gemini extensions install https://github.com/gemini-cli-extensions/cloud-sql-sqlserver-observability
57+
```
58+
59+
---
60+
61+
# Usage Guidelines
62+
63+
## Connecting to New Resources
64+
65+
When you create a new Cloud SQL for SQL Server instance, or database using the available tools, the connection is not automatically established. You will need to perform the following steps:
66+
67+
1. **(Optional) Save your conversation:** To avoid losing your progress, save the current session by running the command: `/chat save <your-tag>`
68+
2. **Stop the CLI:** Terminate the Gemini CLI.
69+
3. **Update Environment Variables:** Set or update your environment variables (e.g. `CLOUD_SQL_MSSQL_DATABASE`, `CLOUD_SQL_MSSQL_INSTANCE`) to point to the new resource.
70+
4. **Restart:** Relaunch the Gemini CLI
71+
5. **(Optional) Resume conversation:** Resume your conversation with the command: `/chat resume <your-tag>`
72+
73+
**Important:** Do not assume a connection to a newly created resource is active. Always follow the steps above to reconfigure your connection.
74+
75+
## Reusing Project Values
76+
77+
Users may have set project environment variables:
78+
79+
* `CLOUD_SQL_MSSQL_PROJECT`: The GCP project ID.
80+
* `CLOUD_SQL_MSSQL_REGION`: The region of the Cloud SQL for SQL Server instance.
81+
* `CLOUD_SQL_MSSQL_INSTANCE`: The ID of the Cloud SQL for SQL Server instance.
82+
* `CLOUD_SQL_MSSQL_DATABASE`: The name of the database.
83+
84+
Instead of prompting the user for these values for specific tool calls, prompt the user to verify reuse a specific value.
85+
Make sure to not use the environment variable name like `CLOUD_SQL_MSSQL_PROJECT`, `${CLOUD_SQL_MSSQL_PROJECT}`, or `$CLOUD_SQL_MSSQL_PROJECT`. The value can be found by using command: `echo $CLOUD_SQL_MSSQL_PROJECT`.

README.md

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Learn more about [Gemini CLI Extensions](https://github.com/google-gemini/gemini
1212
* **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.
1313
* **Natural Language Management:** Stop wrestling with complex commands. Explore schemas and query data by describing what you want in plain English.
1414
* **Code Generation:** Accelerate development by asking Gemini to generate data classes and other code snippets based on your table schemas.
15+
1516
## Prerequisites
1617

1718
Before you begin, ensure you have the following:
@@ -27,7 +28,7 @@ Before you begin, ensure you have the following:
2728

2829
### Installation
2930

30-
To install the extension, use the command:
31+
To install the extension, use the following command before starting the Gemini CLI:
3132

3233
```bash
3334
gemini extensions install https://github.com/gemini-cli-extensions/cloud-sql-sqlserver
@@ -50,7 +51,33 @@ This configuration is not required if utilizing the [Admin toolset](#supported-t
5051
Ensure [Application Default Credentials](https://cloud.google.com/docs/authentication/gcloud) are available in your environment.
5152

5253
> [!NOTE]
53-
> When using private IPs with Cloud SQL for SQL Server, you must use a Virtual Private Cloud (VPC) network.
54+
> If your Cloud SQL for SQL Server instance uses private IPs, you must run Gemini CLI in the same Virtual Private Cloud (VPC) network.
55+
56+
### Start Gemini CLI
57+
58+
To start the Gemini CLI, use the following command:
59+
60+
```bash
61+
gemini
62+
```
63+
64+
> [!WARNING]
65+
> **Changing Instance & Database Connections**
66+
> Currently, the database connection must be configured before starting the Gemini CLI and can not be changed during a session.
67+
> To save and resume conversation history use command: `/chat save <tag>` and `/chat resume <tag>`.
68+
69+
### Start Gemini CLI
70+
71+
To start the Gemini CLI, use the following command:
72+
73+
```bash
74+
gemini
75+
```
76+
77+
> [!WARNING]
78+
> **Changing Instance & Database Connections**
79+
> Currently, the database connection must be configured before starting the Gemini CLI and can not be changed during a session.
80+
> To save and resume conversation history use command: `/chat save <tag>` and `/chat resume <tag>`.
5481
5582
### Start Gemini CLI
5683

@@ -82,9 +109,9 @@ Interact with Cloud SQL for SQL Server using natural language:
82109
## Supported Tools
83110

84111
* **Admin:**
85-
* `create_instance`: Use this tool to create an Postgres instance.
86-
* `create_user`: Use this tool to create Postgres-BUILT-IN or IAM-based users.
87-
* `get_instance`: Use this tool to get details about an Postgres instance.
112+
* `create_instance`: Use this tool to create an SQL Server instance.
113+
* `create_user`: Use this tool to create SQL Server-BUILT-IN or IAM-based users.
114+
* `get_instance`: Use this tool to get details about an SQL Server instance.
88115
* `get_user`: Use this tool to get details about a user.
89116
* `list_instances`: Use this tool to list instances in a given project and location.
90117
* `list_users`: Use this tool to list users in a given project and location.
@@ -96,7 +123,10 @@ Interact with Cloud SQL for SQL Server using natural language:
96123

97124
## Additional Extensions
98125

99-
Find additional extensions to support your entire software development lifecycle at [github.com/gemini-cli-extensions](https://github.com/gemini-cli-extensions).
126+
Find additional extensions to support your entire software development lifecycle at [github.com/gemini-cli-extensions](https://github.com/gemini-cli-extensions), including:
127+
* [Generic SQL Server extension](https://github.com/gemini-cli-extensions/sql-server)
128+
* [Cloud SQL for SQL Server Observability extension](https://github.com/gemini-cli-extensions/cloud-sql-sqlserver-observability)
129+
* and more!
100130

101131
## Troubleshooting
102132

toolbox_version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.15.0
1+
0.16.0

0 commit comments

Comments
 (0)