feat(tools/cloudsqlpg): Add vector assist tools for Cloud SQL Postgres#2909
Conversation
|
/gemini summary |
There was a problem hiding this comment.
Code Review
This pull request introduces the Vector Assist toolset for Cloud SQL for PostgreSQL, enabling automated vector search setup and optimized query generation. The changes include four new tools: define_spec, modify_spec, apply_spec, and generate_query, along with their respective documentation, unit tests, and integration tests. Several issues were identified in the review, including a parameter mismatch in the integration tests (query_text vs search_text), incorrect parameter descriptions in the apply_spec tool, and multiple violations of the documentation style guide regarding page titles. Additionally, a few typos were found in the parameter descriptions of the define_spec tool.
Summary of ChangesThis pull request introduces a suite of vector assist tools for Cloud SQL Postgres, enabling users to define, modify, and apply vector specifications, as well as generate optimized queries for vector search. These changes streamline the setup and management of vector search workloads, accompanied by necessary configuration updates, documentation, and integration tests to ensure reliability. Highlights
Activity
|
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…pg)--tools-for-vectorassist' into feat(tools/cloudsqlpg)--tools-for-vectorassist
|
Added a few comments. LGTM in general. |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a suite of "Vector Assist" tools for Cloud SQL for PostgreSQL, including define_spec, modify_spec, apply_spec, and generate_query. These tools automate the setup and querying of vector search workloads by generating and executing SQL recommendations. The changes encompass tool implementations, registration, comprehensive documentation, and integration tests. Feedback indicates that documentation titles should be updated to a human-readable format ending in "Tool" per the style guide, input validation should be added to the generate_query tool to handle parameter constraints, and a stray tab character needs to be removed to satisfy linting requirements.
|
/gcbrun |
|
🚀 Cloudflare Preview Ready! 🔎 View Preview: https://pr-2909.toolbox-docs-6xc.pages.dev (Note: Subsequent pushes to this PR will automatically update the preview at this same URL) |
|
/gcbrun |
1 similar comment
|
/gcbrun |
… Postgres (googleapis#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> 7a6d849
🤖 I have created a release *beep* *boop* --- ## [1.1.0](v1.0.0...v1.1.0) (2026-04-13) ### Features * **tools/cloudsqlpg:** Add vector assist tools for Cloud SQL Postgres ([#2909](#2909)) ([7a6d849](7a6d849)) ### Bug Fixes * **looker:** Convert configuration yaml to flat format ([#3022](#3022)) ([45c05e3](45c05e3)) ### Docs Update * **knowledge-catalog:** Rename dataplex to knowledge-catalog across docs ([#3039](#3039)) ([45c05e3](24ce6ce)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- ## [1.1.0](v1.0.0...v1.1.0) (2026-04-13) ### Features * **tools/cloudsqlpg:** Add vector assist tools for Cloud SQL Postgres ([#2909](#2909)) ([7a6d849](7a6d849)) ### Bug Fixes * **looker:** Convert configuration yaml to flat format ([#3022](#3022)) ([45c05e3](45c05e3)) ### Docs Update * **knowledge-catalog:** Rename dataplex to knowledge-catalog across docs ([#3039](#3039)) ([45c05e3](24ce6ce)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> da6f5f8
🤖 I have created a release *beep* *boop* --- ## [1.1.0](googleapis/mcp-toolbox@v1.0.0...v1.1.0) (2026-04-13) ### Features * **tools/cloudsqlpg:** Add vector assist tools for Cloud SQL Postgres ([googleapis#2909](googleapis#2909)) ([7a6d849](googleapis@7a6d849)) ### Bug Fixes * **looker:** Convert configuration yaml to flat format ([googleapis#3022](googleapis#3022)) ([45c05e3](googleapis@45c05e3)) ### Docs Update * **knowledge-catalog:** Rename dataplex to knowledge-catalog across docs ([googleapis#3039](googleapis#3039)) ([45c05e3](googleapis@24ce6ce)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> da6f5f8
🤖 I have created a release *beep* *boop* --- ## [1.1.0](googleapis/mcp-toolbox@v1.0.0...v1.1.0) (2026-04-13) ### Features * **tools/cloudsqlpg:** Add vector assist tools for Cloud SQL Postgres ([googleapis#2909](googleapis#2909)) ([7a6d849](googleapis@7a6d849)) ### Bug Fixes * **looker:** Convert configuration yaml to flat format ([googleapis#3022](googleapis#3022)) ([45c05e3](googleapis@45c05e3)) ### Docs Update * **knowledge-catalog:** Rename dataplex to knowledge-catalog across docs ([googleapis#3039](googleapis#3039)) ([45c05e3](googleapis@24ce6ce)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> da6f5f8
🤖 I have created a release *beep* *boop* --- ## [1.1.0](googleapis/mcp-toolbox@v1.0.0...v1.1.0) (2026-04-13) ### Features * **tools/cloudsqlpg:** Add vector assist tools for Cloud SQL Postgres ([googleapis#2909](googleapis#2909)) ([7a6d849](googleapis@7a6d849)) ### Bug Fixes * **looker:** Convert configuration yaml to flat format ([googleapis#3022](googleapis#3022)) ([45c05e3](googleapis@45c05e3)) ### Docs Update * **knowledge-catalog:** Rename dataplex to knowledge-catalog across docs ([googleapis#3039](googleapis#3039)) ([45c05e3](googleapis@24ce6ce)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> da6f5f8
#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>
🤖 I have created a release *beep* *boop* --- ## [1.1.0](v1.0.0...v1.1.0) (2026-04-13) ### Features * **tools/cloudsqlpg:** Add vector assist tools for Cloud SQL Postgres ([#2909](#2909)) ([7a6d849](7a6d849)) ### Bug Fixes * **looker:** Convert configuration yaml to flat format ([#3022](#3022)) ([45c05e3](45c05e3)) ### Docs Update * **knowledge-catalog:** Rename dataplex to knowledge-catalog across docs ([#3039](#3039)) ([45c05e3](24ce6ce)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- ## [1.1.0](googleapis/mcp-toolbox@v1.0.0...v1.1.0) (2026-04-13) ### Features * **tools/cloudsqlpg:** Add vector assist tools for Cloud SQL Postgres ([googleapis#2909](googleapis#2909)) ([7a6d849](googleapis@7a6d849)) ### Bug Fixes * **looker:** Convert configuration yaml to flat format ([googleapis#3022](googleapis#3022)) ([45c05e3](googleapis@45c05e3)) ### Docs Update * **knowledge-catalog:** Rename dataplex to knowledge-catalog across docs ([googleapis#3039](googleapis#3039)) ([45c05e3](googleapis@24ce6ce)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> da6f5f8
googleapis#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>
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.
vectorassistdefine_specmodify_specapply_specgenerate_queryManual 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
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
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
PR Checklist
CONTRIBUTING.md
bug/issue
before writing your code! That way we can discuss the change, evaluate
designs, and agree on the general idea
!if this involve a breaking change🛠️ Fixes #<issue_number_goes_here>