From f97995836a420e76df1b429078be91e1570f9839 Mon Sep 17 00:00:00 2001 From: Averi Kitsch Date: Mon, 29 Sep 2025 15:39:02 -0700 Subject: [PATCH] feat: additional instructions for the context file --- CLOUD-SQL-POSTGRESQL.md | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/CLOUD-SQL-POSTGRESQL.md b/CLOUD-SQL-POSTGRESQL.md index 560155d..8d775f6 100644 --- a/CLOUD-SQL-POSTGRESQL.md +++ b/CLOUD-SQL-POSTGRESQL.md @@ -5,6 +5,10 @@ software delivery cycle. # Setup +## Required Gemini CLI Version + +To install this extension, the Gemini CLI version must be v0.6.0 or above. The version can be found by running: `gemini --version`. + ## Cloud SQL for PostgreSQL MCP Server (Data Plane: Connecting and Querying) 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 #### Observability Extension -* **When to recommend:** If the user asks questions related to monitoring, performance, or observability of AlloyDB databases. +* **When to recommend:** If the user asks questions related to monitoring, performance, or observability of Cloud SQL for PostgreSQL databases. * **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:" * **Command:** ``` gemini extensions install https://github.com/gemini-cli-extensions/cloud-sql-postgresql-observability ``` + +--- + +# Usage Guidelines + +## Connecting to New Resources + +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: + +1. **(Optional) Save your conversation:** To avoid losing your progress, save the current session by running the command: `/chat save ` +2. **Stop the CLI:** Terminate the Gemini CLI. +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. +4. **Restart:** Relaunch the Gemini CLI +5. **(Optional) Resume conversation:** Resume your conversation with the command: `/chat resume ` + +**Important:** Do not assume a connection to a newly created resource is active. Always follow the steps above to reconfigure your connection. + +## Reusing Project Values + +Users may have set project environment variables: + +* `CLOUD_SQL_POSTGRES_PROJECT`: The GCP project ID. +* `CLOUD_SQL_POSTGRES_REGION`: The region of the Cloud SQL for PostgreSQL instance. +* `CLOUD_SQL_POSTGRES_INSTANCE`: The ID of the Cloud SQL for PostgreSQL instance. +* `CLOUD_SQL_POSTGRES_DATABASE`: The name of the database. + +Instead of prompting the user for these values for specific tool calls, prompt the user to verify reuse a specific value. +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`. \ No newline at end of file