Skip to content

Commit f979958

Browse files
committed
feat: additional instructions for the context file
1 parent d096936 commit f979958

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

CLOUD-SQL-POSTGRESQL.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ software delivery cycle.
55

66
# Setup
77

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

1014
This section covers connecting to a Cloud SQL for PostgreSQL instance.
@@ -41,9 +45,37 @@ This section provides context on additional tools that can be recommended to the
4145

4246
#### Observability Extension
4347

44-
* **When to recommend:** If the user asks questions related to monitoring, performance, or observability of AlloyDB databases.
48+
* **When to recommend:** If the user asks questions related to monitoring, performance, or observability of Cloud SQL for PostgreSQL databases.
4549
* **What to say:** "For Cloud SQL monitoring and observability, you might find the `cloud-sql-postgresql-observability` extension useful. You can install it with the following command:"
4650
* **Command:**
4751
```
4852
gemini extensions install https://github.com/gemini-cli-extensions/cloud-sql-postgresql-observability
4953
```
54+
55+
---
56+
57+
# Usage Guidelines
58+
59+
## Connecting to New Resources
60+
61+
When you create a new Cloud SQL for PostgreSQL instance, or database using the available tools, the connection is not automatically established. You will need to perform the following steps:
62+
63+
1. **(Optional) Save your conversation:** To avoid losing your progress, save the current session by running the command: `/chat save <your-tag>`
64+
2. **Stop the CLI:** Terminate the Gemini CLI.
65+
3. **Update Environment Variables:** Set or update your environment variables (e.g. `CLOUD_SQL_POSTGRES_DATABASE`, `CLOUD_SQL_POSTGRES_INSTANCE`) to point to the new resource.
66+
4. **Restart:** Relaunch the Gemini CLI
67+
5. **(Optional) Resume conversation:** Resume your conversation with the command: `/chat resume <your-tag>`
68+
69+
**Important:** Do not assume a connection to a newly created resource is active. Always follow the steps above to reconfigure your connection.
70+
71+
## Reusing Project Values
72+
73+
Users may have set project environment variables:
74+
75+
* `CLOUD_SQL_POSTGRES_PROJECT`: The GCP project ID.
76+
* `CLOUD_SQL_POSTGRES_REGION`: The region of the Cloud SQL for PostgreSQL instance.
77+
* `CLOUD_SQL_POSTGRES_INSTANCE`: The ID of the Cloud SQL for PostgreSQL instance.
78+
* `CLOUD_SQL_POSTGRES_DATABASE`: The name of the database.
79+
80+
Instead of prompting the user for these values for specific tool calls, prompt the user to verify reuse a specific value.
81+
Make sure to not use the environment variable name like `CLOUD_SQL_POSTGRES_PROJECT`, `${CLOUD_SQL_POSTGRES_PROJECT}`, or `$CLOUD_SQL_POSTGRES_PROJECT`. The value can be found by using command: `echo $CLOUD_SQL_POSTGRES_PROJECT`.

0 commit comments

Comments
 (0)