Skip to content

Commit 9d7fefd

Browse files
authored
Merge branch 'main' into release-please--branches--main--components--cloud-sql-sqlserver
2 parents df1cffb + 5a11db7 commit 9d7fefd

3 files changed

Lines changed: 227 additions & 131 deletions

File tree

CLOUD-SQL-SQLSERVER.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ This section covers connecting to a Cloud SQL for SQL Server instance.
2323
* `CLOUD_SQL_MSSQL_USER`: The database username.
2424
* `CLOUD_SQL_MSSQL_PASSWORD`: The password for the database user.
2525

26+
If you need to update any of these values later, use the `gemini extensions config cloud-sql-sqlserver` command.
27+
2628
2. **Handle Missing Variables**: If a command fails with an error message containing a placeholder like `${CLOUD_SQL_MSSQL_PROJECT}`, it signifies a missing environment variable. Inform the user which variable is missing and instruct them to set it.
2729

2830
3. **Handle Permission Errors**: If you encounter permission errors, ensure the user has the **Cloud SQL Client** (`roles/cloudsql.client`) role and the correct database-level permissions. You can provide these links for assistance:
@@ -42,9 +44,9 @@ This section covers administrative operations like managing clusters, instances,
4244

4345
---
4446

45-
# Additional Tools
47+
# Additional Extensions
4648

47-
This section provides context on additional tools that can be recommended to the user based on their queries.
49+
This section provides context on additional extensions that can be recommended to the user based on their queries.
4850

4951
#### Observability Extension
5052

@@ -61,12 +63,12 @@ This section provides context on additional tools that can be recommended to the
6163
6264
## Connecting to New Resources
6365
64-
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+
When you create a new Cloud SQL for SQL Server instance, or database using the available skills, the connection is not automatically established. You will need to perform the following steps:
6567
6668
1. **(Optional) Save your conversation:** To avoid losing your progress, save the current session by running the command: `/chat save <your-tag>`
67-
2. **Stop the CLI:** Terminate the Gemini CLI.
68-
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.
69-
4. **Restart:** Relaunch the Gemini CLI
69+
2. **Stop the CLI**: Terminate the Gemini CLI.
70+
3. **Update Extension Configuration**: Use the command `gemini extensions config cloud-sql-sqlserver` to update your settings (e.g. `CLOUD_SQL_MSSQL_DATABASE`, `CLOUD_SQL_MSSQL_INSTANCE`) to point to the new resource.
71+
4. **Restart**: Relaunch the Gemini CLI
7072
5. **(Optional) Resume conversation:** Resume your conversation with the command: `/chat resume <your-tag>`
7173
7274
**Important:** Do not assume a connection to a newly created resource is active. Always follow the steps above to reconfigure your connection.
@@ -80,11 +82,12 @@ Users may have set project environment variables:
8082
* `CLOUD_SQL_MSSQL_INSTANCE`: The ID of the Cloud SQL for SQL Server instance.
8183
* `CLOUD_SQL_MSSQL_DATABASE`: The name of the database.
8284
83-
Instead of prompting the user for these values for specific tool calls, prompt the user to verify reuse a specific value.
84-
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`.
85+
Instead of prompting the user for these values for specific skill calls, prompt the user to verify the reuse of a specific setting value.
86+
Make sure to not use the environment variable name like `CLOUD_SQL_MSSQL_PROJECT`, `${CLOUD_SQL_MSSQL_PROJECT}`, or `$CLOUD_SQL_MSSQL_PROJECT`.
87+
The value can be verified by the user using the `gemini extensions config cloud-sql-sqlserver` command or by checking their local settings.
8588
8689
## Use Full Table Name Format "DATABASE_NAME.SCHEMA_NAME.TABLE_NAME"
8790
88-
**ALWAYS** use the full table name format, `DATABASE_NAME.SCHEMA_NAME.TABLE_NAME` in the generated SQL when using the `execute_sql` or `cloud_sql_sqlserver__execute_sql` tool.
91+
**ALWAYS** use the full table name format, `DATABASE_NAME.SCHEMA_NAME.TABLE_NAME` in the generated SQL when using the `execute_sql` skill.
8992
* Default to using "dbo" for the schema name.
9093
* Use command `echo $CLOUD_SQL_MSSQL_DATABASE` to get the current database value.

DEVELOPER.md

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# DEVELOPER.md
22

33
This document provides instructions for setting up your development environment
4-
and contributing to the Cloud SQL for SQL Server Gemini CLI Extension project.
4+
and contributing to the Cloud SQL for SQL Server Agent skills project.
55

66
## Prerequisites
77

@@ -10,44 +10,30 @@ Before you begin, ensure you have the following:
1010
1. **Gemini CLI:** Install the Gemini CLI version v0.6.0 or above. Installation
1111
instructions can be found on the official Gemini CLI documentation. You can
1212
verify your version by running `gemini --version`.
13-
2. **Cloud SQL for SQL Server Instance:** For testing data plane tools, you will need access to an active Cloud SQL for SQL Server instance.
13+
2. **Cloud SQL for SQL Server Instance:** For testing data plane tools, you will need access to an active Cloud SQL for SQL Server
14+
instance.
1415

1516
## Developing the Extension
1617

1718
### Running from Local Source
1819

19-
The core logic for this extension is handled by a pre-built `toolbox` binary. The development process involves installing the extension locally into the Gemini CLI to test changes.
20-
2120
1. **Clone the Repository:**
2221

2322
```bash
2423
git clone https://github.com/gemini-cli-extensions/cloud-sql-sqlserver.git
2524
cd cloud-sql-sqlserver
2625
```
2726

28-
2. **Download the Toolbox Binary:** The required version of the `toolbox` binary
29-
is specified in `toolbox_version.txt`. Download it for your platform.
30-
31-
```bash
32-
# Read the required version
33-
VERSION=$(cat toolbox_version.txt)
34-
35-
# Example for macOS/amd64
36-
curl -L -o toolbox https://storage.googleapis.com/mcp-toolbox-for-databases/geminicli/v$VERSION/darwin/amd64/toolbox
37-
chmod +x toolbox
38-
```
39-
Adjust the URL for your operating system (`linux/amd64`, `darwin/arm64`, `windows/amd64`).
40-
41-
3. **Link the Extension Locally:** Use the Gemini CLI to install the
27+
2. **Install the Extension Locally:** Use the Gemini CLI to install the
4228
extension from your local directory.
4329

4430
```bash
45-
gemini extensions link .
31+
gemini extensions install .
4632
```
47-
The CLI will prompt you to confirm the linking. Accept it to proceed.
33+
The CLI will prompt you to confirm the installation. Accept it to proceed.
4834

49-
4. **Testing Changes:** After linking, start the Gemini CLI (`gemini`).
50-
You can now interact with the `cloud-sql-sqlserver` tools to manually test your changes
35+
3. **Testing Changes:** After installation, start the Gemini CLI (`gemini`).
36+
You can now interact with the `cloud-sql-sqlserver` skills to manually test your changes
5137
against your connected database.
5238

5339
## Testing
@@ -58,9 +44,9 @@ A GitHub Actions workflow (`.github/workflows/presubmit-tests.yml`) is triggered
5844
for every pull request. This workflow primarily verifies that the extension can
5945
be successfully installed by the Gemini CLI.
6046

61-
Currently, there are no automated unit or integration test suites
62-
within this repository. All functional testing must be performed manually. All tools
63-
are currently tested in the [MCP Toolbox GitHub](https://github.com/googleapis/mcp-toolbox).
47+
All tools are currently tested in the [MCP Toolbox GitHub](https://github.com/googleapis/mcp-toolbox).
48+
49+
The skills themselves are validated using the `skills-validate.yml` workflow.
6450

6551
### Other GitHub Checks
6652

@@ -73,7 +59,6 @@ are currently tested in the [MCP Toolbox GitHub](https://github.com/googleapis/m
7359
* **Dependency Updates:** [Renovate](https://github.com/apps/forking-renovate)
7460
is configured to automatically create pull requests for dependency updates.
7561

76-
7762
## Maintainer Information
7863

7964
### Team
@@ -128,4 +113,3 @@ The process is handled by the [`mirror-changelog.yml`](.github/workflows/mirror-
128113
2. **Merge Release PR:** A maintainer approves and merges the Release PR. This
129114
action triggers `release-please` to create a new GitHub tag and a
130115
corresponding GitHub Release.
131-

0 commit comments

Comments
 (0)