Files
Pavan Krishna Rampalli 7a6d8492fa feat(tools/cloudsqlpg): Add vector assist tools for Cloud SQL Postgres (#2909)
## Description

Adds 4 new mcp tools for Cloud SQL Postgres source related to the vector
assist postgres extension. These tools enable the customers to set up
and optimize production-ready vector workloads by simply expressing your
intent and performance requirements.



| Tool Set | Description |

|:---------------------------------|:------------------------------------------------------------------------
|
| `vectorassist` | Use these skills to set up and optimize
production-ready vector workloads |
| | by simply expressing your intent and performance requirements |


| Tool Name | Description |

|:---------------------------------|:---------------------------------------------------------------|
| `define_spec` | Defines a new vector specification for search
workloads. |
| `modify_spec` | Modifies an existing vector specification. |
| `apply_spec` | Executes SQL recommendations for a vector
specification. |
| `generate_query` | Generates optimized SQL queries for vector
searches. |


## Manual testing

Workflows covered by these tools 

### 1.  Setup vector search in the database

Prompt : Set up the table 'cymbal_products' for vector workloads where I
want to perform a similarity search on the embeddings generated for the
column 'product_description'.

Expected tools to be used in the CUJ : define-spec -> apply-spec

<img width="1282" height="639" alt="Screenshot 2026-04-09 at 2 50 02 PM"
src="https://github.com/user-attachments/assets/0c05fb23-88df-4c26-9dd3-59678ed6cc90"
/>

<img width="1289" height="717" alt="Screenshot 2026-04-09 at 2 52 34 PM"
src="https://github.com/user-attachments/assets/e1a2e4ea-cadc-4692-b0f5-dc4c914710a6"
/>

<img width="1270" height="683" alt="Screenshot 2026-04-09 at 3 04 17 PM"
src="https://github.com/user-attachments/assets/a2ac1349-5815-45c1-abc6-fd8210a5570f"
/>
<img width="1281" height="462" alt="Screenshot 2026-04-09 at 3 06 12 PM"
src="https://github.com/user-attachments/assets/bce60906-2723-4a64-aaa0-9095fc83466b"
/>


### 2. Modify & apply spec

Prompt : Modify the vector specification 'cymbal_products' table to
generate embeddings on the column 'product_description' using the
embedding model 'text-embedding-004'

Expected tools to be used in the CUJ : define-spec -> modify-spec ->
apply-spec

<img width="1180" height="798" alt="Screenshot 2026-04-09 at 9 45 03 PM"
src="https://github.com/user-attachments/assets/d8566527-a04d-4209-b78f-693ffb8e9298"
/>

<img width="1171" height="373" alt="Screenshot 2026-04-09 at 9 35 27 PM"
src="https://github.com/user-attachments/assets/b6c894c3-1c6f-4d4b-85d1-59832d097b4f"
/>

<img width="1175" height="598" alt="Screenshot 2026-04-09 at 9 37 11 PM"
src="https://github.com/user-attachments/assets/45c79bb5-5509-4196-84c9-0e091fd1168f"
/>

<img width="1176" height="622" alt="Screenshot 2026-04-09 at 9 39 12 PM"
src="https://github.com/user-attachments/assets/5eaffd4c-5315-482f-8616-a3c4503a65ef"
/>

### 3.  Find top-k similarity items

Prompt : find the top 10 products from cymbal_products table which have
description similar to this query "What kind of fruit trees grow well
here?"
 
Expected tools to be used in the CUJ : generate-query -> execute-sql

<img width="1273" height="259" alt="Screenshot 2026-04-09 at 3 25 48 PM"
src="https://github.com/user-attachments/assets/79d71a31-a9ce-4948-aa75-d35dc33f4420"
/>

<img width="1275" height="483" alt="Screenshot 2026-04-09 at 3 26 12 PM"
src="https://github.com/user-attachments/assets/2d54327d-c048-457e-9e44-4c710e1523d3"
/>

<img width="1246" height="619" alt="Screenshot 2026-04-09 at 3 27 12 PM"
src="https://github.com/user-attachments/assets/d2a1a021-f179-4d86-9050-50a2dbefac64"
/>




## PR Checklist

> Thank you for opening a Pull Request! Before submitting your PR, there
are a
> few things you can do to make sure it goes smoothly:

- [x] Make sure you reviewed

[CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md)
- [x] Make sure to open an issue as a

[bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose)
  before writing your code! That way we can discuss the change, evaluate
  designs, and agree on the general idea
- [x] Ensure the tests and linter pass
- [x] Code coverage does not decrease (if any source code was changed)
- [x] Appropriate docs were updated (if necessary)
- [x] Make sure to add `!` if this involve a breaking change

🛠️ Fixes #<issue_number_goes_here>

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Wenxin Du <117315983+duwenxin99@users.noreply.github.com>
2026-04-10 12:54:55 -04:00
..