Skip to content

Commit bd680cb

Browse files
authored
feat: additional instructions for the context file (#32)
1 parent 4d663a5 commit bd680cb

File tree

1 file changed

+34
-2
lines changed

1 file changed

+34
-2
lines changed

CLOUD-SQL-MYSQL.md

Lines changed: 34 additions & 2 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 MySQL MCP Server (Data Plane: Connecting and Querying)
1014

1115
This section covers connecting to a Cloud SQL for MySQL instance.
@@ -27,7 +31,7 @@ This section covers connecting to a Cloud SQL for MySQL instance.
2731

2832
## Cloud SQL Admin MCP Server (Control Plane: Creating and Managing Infrastructure)
2933

30-
This section covers administrative operations like managing clusters, instances, and users.
34+
This section covers administrative operations like managing instances and users.
3135

3236
1. **Handle Permission Errors**:
3337
* For operations that create, get, list, delete, or update resources, the user needs the **Cloud SQL Admin** (`roles/cloudsql.admin`) role.
@@ -44,9 +48,37 @@ This section provides context on additional tools that can be recommended to the
4448

4549
#### Observability Extension
4650

47-
* **When to recommend:** If the user asks questions related to monitoring, performance, or observability of AlloyDB databases.
51+
* **When to recommend:** If the user asks questions related to monitoring, performance, or observability of Cloud SQL for MySQL databases.
4852
* **What to say:** "For Cloud SQL monitoring and observability, you might find the `cloud-sql-mysql-observability` extension useful. You can install it with the following command:"
4953
* **Command:**
5054
```
5155
gemini extensions install https://github.com/gemini-cli-extensions/cloud-sql-mysql-observability
5256
```
57+
58+
---
59+
60+
# Usage Guidelines
61+
62+
## Connecting to New Resources
63+
64+
When you create a new Cloud SQL for MySQL instance, or database using the available tools, the connection is not automatically established. You will need to perform the following steps:
65+
66+
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_MYSQL_DATABASE`, `CLOUD_SQL_MYSQL_INSTANCE`) to point to the new resource.
69+
4. **Restart:** Relaunch the Gemini CLI
70+
5. **(Optional) Resume conversation:** Resume your conversation with the command: `/chat resume <your-tag>`
71+
72+
**Important:** Do not assume a connection to a newly created resource is active. Always follow the steps above to reconfigure your connection.
73+
74+
## Reusing Project Values
75+
76+
Users may have set project environment variables:
77+
78+
* `CLOUD_SQL_MYSQL_PROJECT`: The GCP project ID.
79+
* `CLOUD_SQL_MYSQL_REGION`: The region of the Cloud SQL for MySQL instance.
80+
* `CLOUD_SQL_MYSQL_INSTANCE`: The ID of the Cloud SQL for MySQL instance.
81+
* `CLOUD_SQL_MYSQL_DATABASE`: The name of the database.
82+
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_MYSQL_PROJECT`, `${CLOUD_SQL_MYSQL_PROJECT}`, or `$CLOUD_SQL_MYSQL_PROJECT`. The value can be found by using command: `echo $CLOUD_SQL_MYSQL_PROJECT`.

0 commit comments

Comments
 (0)