Compare commits

...

25 Commits

Author SHA1 Message Date
Ben Knutson
6d1e38281a Refactor Github Action per b/485167538 2026-02-18 10:46:26 +00:00
Yuan Teoh
89c85729d1 resolve comments 2025-11-24 09:59:01 -08:00
Yuan Teoh
93f638650d docs: update configure instructions 2025-11-24 09:59:01 -08:00
aniketkumarj
8752e05ab6 feat(tools/cloudsqlpg): Add CloudSQL PostgreSQL pre-check tool (#1722)
## Description

Implements the 'postgres-upgrade-precheck' tool to allow users to
validate instance readiness for major version upgrades for CloudSQL
PostgreSQL.

This includes the tool implementation, unit tests for YAML parsing,
integration tests for tool invocation, and documentation. The tool is
also added to the CloudSQL PostgreSQL prebuilt set.

TEST output: 
<img width="3406" height="1646" alt="image"
src="https://github.com/user-attachments/assets/6abaa535-285d-4645-9dd3-7ebcd447d448"
/>
<img width="3532" height="1490" alt="image"
src="https://github.com/user-attachments/assets/4d512af1-51fd-4187-b80f-be13198aba68"
/>



## 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 #1721

---------

Co-authored-by: Averi Kitsch <akitsch@google.com>
2025-11-24 17:41:50 +00:00
Anubhav Dhawan
185c72939d docs: Update guides to require Python 3.10+ following Python 3.9 drop (#2020)
## Description

This PR updates the installation guides and documentation to reflect
that Python 3.9 is no longer supported. Users are now instructed to
install Python 3.10+.

## Context
This is a follow-up to
https://github.com/googleapis/mcp-toolbox-sdk-python/pull/422, which
officially removed support for Python 3.9 from the Python SDKs codebase.
This change ensures the documentation aligns with the current package
requirements.
2025-11-24 14:58:03 +05:30
Anubhav Dhawan
87ef9c5908 chore(deps): Fix typo in package dependency name (#2018)
Partially reverts googleapis/genai-toolbox#2011 to fix the typo in the
package name.

The original PR breaks builds due to incorrect package name.

<img width="2254" height="522" alt="image"
src="https://github.com/user-attachments/assets/d51aba16-a84e-46cb-b17c-4eab1576dd59"
/>
2025-11-24 07:44:51 +00:00
Mend Renovate
1deda6cb4c chore(deps): update dependency langchain-google-vertexai to v3.0.3 (#2011)
This PR contains the following updates:

| Package | Change | Age | Confidence |
|---|---|---|---|
|
[langchain-google-vertexai](https://redirect.github.com/langchain-ai/langchain-google)
([source](https://redirect.github.com/langchain-ai/langchain-google/tree/HEAD/libs/vertexai),
[changelog](https://redirect.github.com/langchain-ai/langchain-google/releases?q=%22vertexai%22))
| `==3.0.2` -> `==3.0.3` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/langchain-google-vertexai/3.0.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/langchain-google-vertexai/3.0.2/3.0.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/googleapis/genai-toolbox).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi4xNi4xIiwidXBkYXRlZEluVmVyIjoiNDIuMTYuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: Harsh Jha <83023263+rapid-killer-9@users.noreply.github.com>
2025-11-24 06:18:44 +00:00
Mend Renovate
768bf01966 chore(deps): update dependency langchain to v1.0.8 (#2010)
This PR contains the following updates:

| Package | Change | Age | Confidence |
|---|---|---|---|
| [langchain](https://redirect.github.com/langchain-ai/langchain)
([source](https://redirect.github.com/langchain-ai/langchain/tree/HEAD/libs/langchain),
[changelog](https://redirect.github.com/langchain-ai/langchain/releases?q=tag%3A%22langchain%3D%3D1%22))
| `==1.0.3` -> `==1.0.8` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/langchain/1.0.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/langchain/1.0.3/1.0.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/googleapis/genai-toolbox).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi4xNi4xIiwidXBkYXRlZEluVmVyIjoiNDIuMTYuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: Harsh Jha <83023263+rapid-killer-9@users.noreply.github.com>
2025-11-24 06:01:02 +00:00
Mend Renovate
b0fe6775d5 chore(deps): update dependency toolbox-core to v0.5.3 (#2008)
This PR contains the following updates:

| Package | Change | Age | Confidence |
|---|---|---|---|
|
[toolbox-core](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python)
([changelog](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/blob/main/packages/toolbox-core/CHANGELOG.md))
| `==0.5.2` -> `==0.5.3` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/toolbox-core/0.5.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/toolbox-core/0.5.2/0.5.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>googleapis/mcp-toolbox-sdk-python (toolbox-core)</summary>

###
[`v0.5.3`](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/releases/tag/toolbox-core-v0.5.3):
toolbox-core: v0.5.3

[Compare
Source](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/compare/toolbox-core-v0.5.2...toolbox-core-v0.5.3)

##### Miscellaneous Chores

- **ci:** Updated the toolbox server version for CI and integration
tests
([#&#8203;388](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/388)),
([#&#8203;414](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/414)),
([#&#8203;421](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/421),
[#&#8203;395](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/395)).
- **deps:** Updated dependencies: `aiohttp` to v3.13.0
([#&#8203;389](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/389)),
`google-auth` to v2.41.1
([#&#8203;383](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/383)),
`isort` to v7
([#&#8203;393](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/393)),
`pytest` to v9
([#&#8203;416](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/416)),
and other non-major Python dependencies
([#&#8203;386](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/386)),
([#&#8203;387](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/387)),
([#&#8203;427](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/427)).

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/googleapis/genai-toolbox).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi4xNi4xIiwidXBkYXRlZEluVmVyIjoiNDIuMTYuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: Harsh Jha <83023263+rapid-killer-9@users.noreply.github.com>
2025-11-24 05:45:01 +00:00
Wenxin Du
a539c71ffe ci: Add CGO cross compilation support to release pipeline (#1903)
- Support CGO cross compilation for multiple architectures using Zig.
- Download and link MacOSX SDK as needed by the MacOSX cross
compilation. There is no official release for MacOSC SDK so I had to
download from a third party repo.
- Update dockerfile from using `gcr.io/distroless/static:nonroot` to
`gcr.io/distroless/cc-debian12:nonroot` for C libraries that is needed
for dynamic linking.
2025-11-23 23:34:23 -05:00
Yuan Teoh
975d02e243 docs: update docs for antigravity (#2015)
Update docs formatting and bullet point indentation. 
Update option to move binary into executables folder.
2025-11-21 15:57:07 -08:00
Anubhav Dhawan
624d06e7ba docs: Fix binary install commands for windows users (#2012)
This PR updates the documentation to fix installation commands
compatible with the standard Windows Command Prompt (`cmd.exe`). Earlier
it was targeted towards Powershell, which might not be used by many
users using a Windows machine.
2025-11-21 10:01:57 -08:00
Mend Renovate
9f27134918 chore(deps): update dependency langgraph to v1.0.3 (#1817)
This PR contains the following updates:

| Package | Change | Age | Confidence |
|---|---|---|---|
| [langgraph](https://redirect.github.com/langchain-ai/langgraph)
([source](https://redirect.github.com/langchain-ai/langgraph/tree/HEAD/libs/langgraph),
[changelog](https://redirect.github.com/langchain-ai/langgraph/releases))
| `==1.0.1` -> `==1.0.3` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/langgraph/1.0.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/langgraph/1.0.1/1.0.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>langchain-ai/langgraph (langgraph)</summary>

###
[`v1.0.3`](https://redirect.github.com/langchain-ai/langgraph/releases/tag/1.0.3)

[Compare
Source](https://redirect.github.com/langchain-ai/langgraph/compare/1.0.2...1.0.3)

Changes since 1.0.2

- chore: langgraph patch release
([#&#8203;6429](https://redirect.github.com/langchain-ai/langgraph/issues/6429))
- feat(docs): warn that `StateGraph` is a builder class
([#&#8203;6417](https://redirect.github.com/langchain-ai/langgraph/issues/6417))
- fix(docs): `PartialState` rendering in MkDocs
([#&#8203;6416](https://redirect.github.com/langchain-ai/langgraph/issues/6416))
- fix(docs): synchronize `invoke` and `ainvoke` docstrings
([#&#8203;6415](https://redirect.github.com/langchain-ai/langgraph/issues/6415))
- fix(docs): synchronize `stream` and `astream` docstrings
([#&#8203;6414](https://redirect.github.com/langchain-ai/langgraph/issues/6414))
- docs(langgraph): Fix docstring code examples of task function
([#&#8203;6410](https://redirect.github.com/langchain-ai/langgraph/issues/6410))
- fix(langgraph): Unexpected behavior for stream\_mode sequences that
are not lists
([#&#8203;6354](https://redirect.github.com/langchain-ai/langgraph/issues/6354))
- fix: fix previoius edge cases such as 0
([#&#8203;6379](https://redirect.github.com/langchain-ai/langgraph/issues/6379))
- fix(langgraph): export REMOVE\_ALL\_MESSAGES in **all** to fix linting
([#&#8203;6375](https://redirect.github.com/langchain-ai/langgraph/issues/6375))
- style: update docstrings to reference `StateGraph`
([#&#8203;6308](https://redirect.github.com/langchain-ai/langgraph/issues/6308))
- docs(langgraph): update streaming guide links
([#&#8203;6314](https://redirect.github.com/langchain-ai/langgraph/issues/6314))
- chore: add `pyproject.toml` links
([#&#8203;6364](https://redirect.github.com/langchain-ai/langgraph/issues/6364))
- docs(langgraph): Fix typo in docstring of PregelLoop.tick
([#&#8203;6407](https://redirect.github.com/langchain-ai/langgraph/issues/6407))
- chore(checkpoint-postgres): bump to 3.0.1
([#&#8203;6402](https://redirect.github.com/langchain-ai/langgraph/issues/6402))
- fix(langgraph): do not apply pending writes when updating state
([#&#8203;6389](https://redirect.github.com/langchain-ai/langgraph/issues/6389))
- chore: update ormsgpack minbound and add OPT\_REPLACE\_SURROGATES
([#&#8203;6395](https://redirect.github.com/langchain-ai/langgraph/issues/6395))
- release(cli): 0.4.7 expand api bounds
([#&#8203;6390](https://redirect.github.com/langchain-ai/langgraph/issues/6390))
- chore: style fixes for refs
([#&#8203;6365](https://redirect.github.com/langchain-ai/langgraph/issues/6365))

###
[`v1.0.2`](https://redirect.github.com/langchain-ai/langgraph/releases/tag/1.0.2)

[Compare
Source](https://redirect.github.com/langchain-ai/langgraph/compare/1.0.1...1.0.2)

Changes since 0.6.11

- chore: bump prebuilt dep for lg
([#&#8203;6361](https://redirect.github.com/langchain-ai/langgraph/issues/6361))
- chore: port tool node improvements back to langgraph
([#&#8203;6321](https://redirect.github.com/langchain-ai/langgraph/issues/6321))
- chore: bump core dep for prebuilt
([#&#8203;6323](https://redirect.github.com/langchain-ai/langgraph/issues/6323))
- fix(langgraph): dont persist UntrackedValue
([#&#8203;6316](https://redirect.github.com/langchain-ai/langgraph/issues/6316))
- feat(langgraph): add Overwrite to bypass reducer
([#&#8203;6286](https://redirect.github.com/langchain-ai/langgraph/issues/6286))
- fix: replace `python.langchain` links with new `docs.langchain`
([#&#8203;6352](https://redirect.github.com/langchain-ai/langgraph/issues/6352))
- release: Checkpointers 3.0
([#&#8203;6313](https://redirect.github.com/langchain-ai/langgraph/issues/6313))
- chore: Restrict "json" type deserialization
([#&#8203;6269](https://redirect.github.com/langchain-ai/langgraph/issues/6269))
- release: langgraph + langgraph-prebuilt v1.0.0
([#&#8203;6300](https://redirect.github.com/langchain-ai/langgraph/issues/6300))
- feat: adding cursory Python 3.14 support
([#&#8203;6298](https://redirect.github.com/langchain-ai/langgraph/issues/6298))
- style: fixes for ref docs
([#&#8203;6297](https://redirect.github.com/langchain-ai/langgraph/issues/6297))
- chore: release rcs for prebuilt + langgraph
([#&#8203;6296](https://redirect.github.com/langchain-ai/langgraph/issues/6296))
- chore: drop Python 3.9 (and syntax)
([#&#8203;6289](https://redirect.github.com/langchain-ai/langgraph/issues/6289))
- docs: style linting
([#&#8203;6260](https://redirect.github.com/langchain-ai/langgraph/issues/6260))
- release(langgraph): v1 working branch
([#&#8203;6093](https://redirect.github.com/langchain-ai/langgraph/issues/6093))
- fix: rename away from LangGraph Platform
([#&#8203;6281](https://redirect.github.com/langchain-ai/langgraph/issues/6281))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/googleapis/genai-toolbox).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNTkuNCIsInVwZGF0ZWRJblZlciI6IjQxLjE3My4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

---------

Co-authored-by: Harsh Jha <83023263+rapid-killer-9@users.noreply.github.com>
2025-11-21 09:56:49 +00:00
Mend Renovate
baf1bd1a97 chore(deps): update dependency llama-index to v0.14.8 (#1831)
This PR contains the following updates:

| Package | Change | Age | Confidence |
|---|---|---|---|
| [llama-index](https://redirect.github.com/run-llama/llama_index) |
`==0.14.6` -> `==0.14.8` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/llama-index/0.14.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/llama-index/0.14.6/0.14.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>run-llama/llama_index (llama-index)</summary>

###
[`v0.14.8`](https://redirect.github.com/run-llama/llama_index/blob/HEAD/CHANGELOG.md#2025-11-10)

[Compare
Source](https://redirect.github.com/run-llama/llama_index/compare/v0.14.7...v0.14.8)

##### llama-index-core \[0.14.8]

- Fix ReActOutputParser getting stuck when "Answer:" contains "Action:"
([#&#8203;20098](https://redirect.github.com/run-llama/llama_index/pull/20098))
- Add buffer to image, audio, video and document blocks
([#&#8203;20153](https://redirect.github.com/run-llama/llama_index/pull/20153))
- fix(agent): Handle multi-block ChatMessage in ReActAgent
([#&#8203;20196](https://redirect.github.com/run-llama/llama_index/pull/20196))
- Fix/20209
([#&#8203;20214](https://redirect.github.com/run-llama/llama_index/pull/20214))
- Preserve Exception in ToolOutput
([#&#8203;20231](https://redirect.github.com/run-llama/llama_index/pull/20231))
- fix weird pydantic warning
([#&#8203;20235](https://redirect.github.com/run-llama/llama_index/pull/20235))

##### llama-index-embeddings-nvidia \[0.4.2]

- docs: Edit pass and update example model
([#&#8203;20198](https://redirect.github.com/run-llama/llama_index/pull/20198))

##### llama-index-embeddings-ollama \[0.8.4]

- Added a test case (no code) to check the embedding through an actual
connection to a Ollama server (after checking that the ollama server
exists)
([#&#8203;20230](https://redirect.github.com/run-llama/llama_index/pull/20230))

##### llama-index-llms-anthropic \[0.10.2]

- feat(llms/anthropic): Add support for RawMessageDeltaEvent in
streaming
([#&#8203;20206](https://redirect.github.com/run-llama/llama_index/pull/20206))
- chore: remove unsupported models
([#&#8203;20211](https://redirect.github.com/run-llama/llama_index/pull/20211))

##### llama-index-llms-bedrock-converse \[0.11.1]

- feat: integrate bedrock converse with tool call block
([#&#8203;20099](https://redirect.github.com/run-llama/llama_index/pull/20099))
- feat: Update model name extraction to include 'jp' region prefix and …
([#&#8203;20233](https://redirect.github.com/run-llama/llama_index/pull/20233))

##### llama-index-llms-google-genai \[0.7.3]

- feat: google genai integration with tool block
([#&#8203;20096](https://redirect.github.com/run-llama/llama_index/pull/20096))
- fix: non-streaming gemini tool calling
([#&#8203;20207](https://redirect.github.com/run-llama/llama_index/pull/20207))
- Add token usage information in GoogleGenAI chat additional\_kwargs
([#&#8203;20219](https://redirect.github.com/run-llama/llama_index/pull/20219))
- bug fix google genai stream\_complete
([#&#8203;20220](https://redirect.github.com/run-llama/llama_index/pull/20220))

##### llama-index-llms-nvidia \[0.4.4]

- docs: Edit pass and code example updates
([#&#8203;20200](https://redirect.github.com/run-llama/llama_index/pull/20200))

##### llama-index-llms-openai \[0.6.8]

- FixV2: Correct DocumentBlock type for OpenAI from 'input\_file' to
'file'
([#&#8203;20203](https://redirect.github.com/run-llama/llama_index/pull/20203))
- OpenAI v2 sdk support
([#&#8203;20234](https://redirect.github.com/run-llama/llama_index/pull/20234))

##### llama-index-llms-upstage \[0.6.5]

- OpenAI v2 sdk support
([#&#8203;20234](https://redirect.github.com/run-llama/llama_index/pull/20234))

##### llama-index-packs-streamlit-chatbot \[0.5.2]

- OpenAI v2 sdk support
([#&#8203;20234](https://redirect.github.com/run-llama/llama_index/pull/20234))

##### llama-index-packs-voyage-query-engine \[0.5.2]

- OpenAI v2 sdk support
([#&#8203;20234](https://redirect.github.com/run-llama/llama_index/pull/20234))

##### llama-index-postprocessor-nvidia-rerank \[0.5.1]

- docs: Edit pass
([#&#8203;20199](https://redirect.github.com/run-llama/llama_index/pull/20199))

##### llama-index-readers-web \[0.5.6]

- feat: Add ScrapyWebReader Integration
([#&#8203;20212](https://redirect.github.com/run-llama/llama_index/pull/20212))
- Update Scrapy dependency to 2.13.3
([#&#8203;20228](https://redirect.github.com/run-llama/llama_index/pull/20228))

##### llama-index-readers-whisper \[0.3.0]

- OpenAI v2 sdk support
([#&#8203;20234](https://redirect.github.com/run-llama/llama_index/pull/20234))

##### llama-index-storage-kvstore-postgres \[0.4.3]

- fix: Ensure schema creation only occurs if it doesn't already exist
([#&#8203;20225](https://redirect.github.com/run-llama/llama_index/pull/20225))

##### llama-index-tools-brightdata \[0.2.1]

- docs: add api key claim instructions
([#&#8203;20204](https://redirect.github.com/run-llama/llama_index/pull/20204))

##### llama-index-tools-mcp \[0.4.3]

- Added test case for issue 19211. No code change
([#&#8203;20201](https://redirect.github.com/run-llama/llama_index/pull/20201))

##### llama-index-utils-oracleai \[0.3.1]

- Update llama-index-core dependency to 0.12.45
([#&#8203;20227](https://redirect.github.com/run-llama/llama_index/pull/20227))

##### llama-index-vector-stores-lancedb \[0.4.2]

- fix: FTS index recreation bug on every LanceDB query
([#&#8203;20213](https://redirect.github.com/run-llama/llama_index/pull/20213))

###
[`v0.14.7`](https://redirect.github.com/run-llama/llama_index/blob/HEAD/CHANGELOG.md#2025-10-30)

[Compare
Source](https://redirect.github.com/run-llama/llama_index/compare/v0.14.6...v0.14.7)

##### llama-index-core \[0.14.7]

- Feat/serpex tool integration
([#&#8203;20141](https://redirect.github.com/run-llama/llama_index/pull/20141))
- Fix outdated error message about setting LLM
([#&#8203;20157](https://redirect.github.com/run-llama/llama_index/pull/20157))
- Fixing some recently failing tests
([#&#8203;20165](https://redirect.github.com/run-llama/llama_index/pull/20165))
- Fix: update lock to latest workflow and fix issues
([#&#8203;20173](https://redirect.github.com/run-llama/llama_index/pull/20173))
- fix: ensure full docstring is used in FunctionTool
([#&#8203;20175](https://redirect.github.com/run-llama/llama_index/pull/20175))
- fix api docs build
([#&#8203;20180](https://redirect.github.com/run-llama/llama_index/pull/20180))

##### llama-index-embeddings-voyageai \[0.5.0]

- Updating the VoyageAI integration
([#&#8203;20073](https://redirect.github.com/run-llama/llama_index/pull/20073))

##### llama-index-llms-anthropic \[0.10.0]

- feat: integrate anthropic with tool call block
([#&#8203;20100](https://redirect.github.com/run-llama/llama_index/pull/20100))

##### llama-index-llms-bedrock-converse \[0.10.7]

- feat: Add support for Bedrock Guardrails streamProcessingMode
([#&#8203;20150](https://redirect.github.com/run-llama/llama_index/pull/20150))
- bedrock structured output optional force
([#&#8203;20158](https://redirect.github.com/run-llama/llama_index/pull/20158))

##### llama-index-llms-fireworks \[0.4.5]

- Update FireworksAI models
([#&#8203;20169](https://redirect.github.com/run-llama/llama_index/pull/20169))

##### llama-index-llms-mistralai \[0.9.0]

- feat: mistralai integration with tool call block
([#&#8203;20103](https://redirect.github.com/run-llama/llama_index/pull/20103))

##### llama-index-llms-ollama \[0.9.0]

- feat: integrate ollama with tool call block
([#&#8203;20097](https://redirect.github.com/run-llama/llama_index/pull/20097))

##### llama-index-llms-openai \[0.6.6]

- Allow setting temp of gpt-5-chat
([#&#8203;20156](https://redirect.github.com/run-llama/llama_index/pull/20156))

##### llama-index-readers-confluence \[0.5.0]

- feat(confluence): make SVG processing optional to fix pycairo install…
([#&#8203;20115](https://redirect.github.com/run-llama/llama_index/pull/20115))

##### llama-index-readers-github \[0.9.0]

- Add GitHub App authentication support
([#&#8203;20106](https://redirect.github.com/run-llama/llama_index/pull/20106))

##### llama-index-retrievers-bedrock \[0.5.1]

- Fixing some recently failing tests
([#&#8203;20165](https://redirect.github.com/run-llama/llama_index/pull/20165))

##### llama-index-tools-serpex \[0.1.0]

- Feat/serpex tool integration
([#&#8203;20141](https://redirect.github.com/run-llama/llama_index/pull/20141))
- add missing toml info
([#&#8203;20186](https://redirect.github.com/run-llama/llama_index/pull/20186))

##### llama-index-vector-stores-couchbase \[0.6.0]

- Add Hyperscale and Composite Vector Indexes support for Couchbase
vector-store
([#&#8203;20170](https://redirect.github.com/run-llama/llama_index/pull/20170))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/googleapis/genai-toolbox).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNTkuNCIsInVwZGF0ZWRJblZlciI6IjQxLjE3My4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: Harsh Jha <83023263+rapid-killer-9@users.noreply.github.com>
Co-authored-by: Twisha Bansal <58483338+twishabansal@users.noreply.github.com>
2025-11-21 09:32:39 +00:00
Mend Renovate
9b67f7354c chore(deps): update dependency google-genai to v1.52.0 (#1840)
This PR contains the following updates:

| Package | Change | Age | Confidence |
|---|---|---|---|
| [google-genai](https://redirect.github.com/googleapis/python-genai) |
`==1.47.0` -> `==1.52.0` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/google-genai/1.52.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/google-genai/1.47.0/1.52.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>googleapis/python-genai (google-genai)</summary>

###
[`v1.52.0`](https://redirect.github.com/googleapis/python-genai/blob/HEAD/CHANGELOG.md#1520-2025-11-21)

[Compare
Source](https://redirect.github.com/googleapis/python-genai/compare/v1.51.0...v1.52.0)

##### Features

- Add support for configuring resource scope when using base\_url
([a3e0859](a3e0859b67))

##### Bug Fixes

- `TypeError: issubclass() arg 1 must be a class` when using`List[str]`
for `contents`
([c624d7e](c624d7e570))
- Create new aiohttp Client Session if loop is closed
([1dc35ea](1dc35ea7ab))

###
[`v1.51.0`](https://redirect.github.com/googleapis/python-genai/blob/HEAD/CHANGELOG.md#1510-2025-11-18)

[Compare
Source](https://redirect.github.com/googleapis/python-genai/compare/v1.50.1...v1.51.0)

##### Features

- Add a pre-validation hook to warn about Pydantic model type
mismatches.
([f7af6ef](f7af6ef697))
- Add display name to FunctionResponseBlob
([52906d5](52906d513f))
- Add display name to FunctionResponseFileData
([7c39f70](7c39f70263))
- Add generate\_content\_config.thinking\_level
([30b00db](30b00dbad1))
- Add image output options to ImageConfig for Vertex
([014aaad](014aaad624))
- Add part.media\_resolution
([30b00db](30b00dbad1))
- Support Function call argument streaming for all languages
([9b2ca50](9b2ca50d51))

##### Bug Fixes

- Only log warnings once for accessors in GenerateContentResponse and
LiveServerMessage
([eec841e](eec841e6a3))

##### Documentation

- Remove gemini 2 below model reference
([c42ddff](c42ddff06c))
- Update sample code to use gemini 2 or above
([d48bbba](d48bbba5f8))
- Update Veo and Imagen model id in README
([5c69122](5c69122739))

###
[`v1.50.1`](https://redirect.github.com/googleapis/python-genai/blob/HEAD/CHANGELOG.md#1501-2025-11-13)

[Compare
Source](https://redirect.github.com/googleapis/python-genai/compare/v1.50.0...v1.50.1)

##### Bug Fixes

- Do not use ADC if passing a base\_url, no project, no location
([a00b67a](a00b67a961))
- Ensure the custom httpx client and async client won't be closed
automatically
([9a9fa3c](9a9fa3c95e))

###
[`v1.50.0`](https://redirect.github.com/googleapis/python-genai/blob/HEAD/CHANGELOG.md#1500-2025-11-12)

[Compare
Source](https://redirect.github.com/googleapis/python-genai/compare/v1.49.0...v1.50.0)

##### Features

- Use pytest-xdist for test parallelization
([6ff82fc](6ff82fca9e))

##### Bug Fixes

- Add missing fields to the model types
([4b855e6](4b855e6215))
- Don't generate warnings from response.text property because of
thought\_signature.
([dd9360d](dd9360d21d))
- Fix base\_steps parameter for recontext\_image
([d94077b](d94077bdee))
- Fix file\_search\_stores.documents pagination
([8d40d48](8d40d48d9a))
- Fix models.list() filter parameter
([7fa1e41](7fa1e41580))
- Handle SSE error message types properly in streaming
([72afa50](72afa50eb2))
- Roll back a breaking change to the import system
([8674003](86740033fb))

##### Documentation

- Log Schema.json\_schema and Schema.from\_json\_schema only once
([517300c](517300caab))
- Regenerate docs for 1.49.0
([74b680a](74b680adfd))

###
[`v1.49.0`](https://redirect.github.com/googleapis/python-genai/blob/HEAD/CHANGELOG.md#1490-2025-11-05)

[Compare
Source](https://redirect.github.com/googleapis/python-genai/compare/v1.48.0...v1.49.0)

##### Features

- Add complete stats to BatchJob
([b211466](b211466644))
- Add FileSearch tool and associated FileSearchStore management APIs
([2e2a78d](2e2a78d202))
- Add FileSearch tool and associated FileSearchStore management APIs
([7370d24](7370d24899))
- Add image\_size to ImageConfig (Early Access Program)
([81c027c](81c027c937))
- Make genai.Part constructible from PartUnionDict.
([7526e4d](7526e4de84))

##### Bug Fixes

- Raise errors during file upload.
([946a17e](946a17e0a9))
- Use duck type in t\_part transformer
([be82981](be82981afe))

##### Documentation

- Log deprecation waring to Schema.from\_json\_schema method and
Schema.json\_schema method
([856789a](856789a7a7))
- Regenerate docs for 1.48.0
([004d238](004d238b4f))
- Update log message in Schema.json\_schema and
Schema.from\_json\_schema methods
([5bf69e5](5bf69e55f1))

###
[`v1.48.0`](https://redirect.github.com/googleapis/python-genai/blob/HEAD/CHANGELOG.md#1480-2025-11-03)

[Compare
Source](https://redirect.github.com/googleapis/python-genai/compare/v1.47.0...v1.48.0)

##### Features

- Added phish filtering feature.
([a9297b7](a9297b747e))
- Drop support for Python 3.9 - EOL
([b542082](b54208200e))

##### Bug Fixes

- Append the current model chunk to contents in async streaming
([7c5cf56](7c5cf56ef1))
- Disable AFC when there are incompatible tool presented.
([ce13aef](ce13aefa42))
- Offload sync python tool calls to a thread when used from async
context.
([f2a0782](f2a0782726))
- Only show warning log for non-text or multi-candidate fields when
response.text is accessed directly
([bf82505](bf82505c58))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/googleapis/genai-toolbox).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNTkuNCIsInVwZGF0ZWRJblZlciI6IjQyLjE2LjEiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbXX0=-->

Co-authored-by: Twisha Bansal <58483338+twishabansal@users.noreply.github.com>
Co-authored-by: Harsh Jha <83023263+rapid-killer-9@users.noreply.github.com>
2025-11-21 09:08:11 +00:00
Mend Renovate
60470c32dd chore(deps): update dependency toolbox-core to v0.5.3 (#1977)
This PR contains the following updates:

| Package | Change | Age | Confidence |
|---|---|---|---|
|
[toolbox-core](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python)
([changelog](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/blob/main/packages/toolbox-core/CHANGELOG.md))
| `==0.5.2` -> `==0.5.3` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/toolbox-core/0.5.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/toolbox-core/0.5.2/0.5.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>googleapis/mcp-toolbox-sdk-python (toolbox-core)</summary>

###
[`v0.5.3`](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/releases/tag/toolbox-core-v0.5.3):
toolbox-core: v0.5.3

[Compare
Source](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/compare/toolbox-core-v0.5.2...toolbox-core-v0.5.3)

##### Miscellaneous Chores

- **ci:** Updated the toolbox server version for CI and integration
tests
([#&#8203;388](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/388)),
([#&#8203;414](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/414)),
([#&#8203;421](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/421),
[#&#8203;395](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/395)).
- **deps:** Updated dependencies: `aiohttp` to v3.13.0
([#&#8203;389](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/389)),
`google-auth` to v2.41.1
([#&#8203;383](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/383)),
`isort` to v7
([#&#8203;393](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/393)),
`pytest` to v9
([#&#8203;416](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/416)),
and other non-major Python dependencies
([#&#8203;386](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/386)),
([#&#8203;387](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/387)),
([#&#8203;427](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/427)).

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/googleapis/genai-toolbox).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi4xMy41IiwidXBkYXRlZEluVmVyIjoiNDIuMTMuNSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: Harsh Jha <83023263+rapid-killer-9@users.noreply.github.com>
2025-11-21 08:49:00 +00:00
Mend Renovate
89277513f0 chore(deps): update dependency toolbox-langchain to v0.5.3 (#1978)
This PR contains the following updates:

| Package | Change | Age | Confidence |
|---|---|---|---|
|
[toolbox-langchain](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python)
([changelog](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/blob/main/packages/toolbox-langchain/CHANGELOG.md))
| `==0.5.2` -> `==0.5.3` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/toolbox-langchain/0.5.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/toolbox-langchain/0.5.2/0.5.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>googleapis/mcp-toolbox-sdk-python (toolbox-langchain)</summary>

###
[`v0.5.3`](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/releases/tag/toolbox-core-v0.5.3):
toolbox-core: v0.5.3

[Compare
Source](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/compare/toolbox-langchain-v0.5.2...toolbox-langchain-v0.5.3)

##### Miscellaneous Chores

- **ci:** Updated the toolbox server version for CI and integration
tests
([#&#8203;388](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/388)),
([#&#8203;414](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/414)),
([#&#8203;421](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/421),
[#&#8203;395](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/395)).
- **deps:** Updated dependencies: `aiohttp` to v3.13.0
([#&#8203;389](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/389)),
`google-auth` to v2.41.1
([#&#8203;383](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/383)),
`isort` to v7
([#&#8203;393](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/393)),
`pytest` to v9
([#&#8203;416](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/416)),
and other non-major Python dependencies
([#&#8203;386](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/386)),
([#&#8203;387](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/387)),
([#&#8203;427](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/427)).

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/googleapis/genai-toolbox).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi4xMy41IiwidXBkYXRlZEluVmVyIjoiNDIuMTMuNSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: Harsh Jha <83023263+rapid-killer-9@users.noreply.github.com>
Co-authored-by: Twisha Bansal <58483338+twishabansal@users.noreply.github.com>
2025-11-21 14:01:00 +05:30
Mend Renovate
ee10723480 chore(deps): update dependency toolbox-llamaindex to v0.5.3 (#1979)
This PR contains the following updates:

| Package | Change | Age | Confidence |
|---|---|---|---|
|
[toolbox-llamaindex](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python)
([changelog](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/blob/main/packages/toolbox-llamaindex/CHANGELOG.md))
| `==0.5.2` -> `==0.5.3` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/toolbox-llamaindex/0.5.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/toolbox-llamaindex/0.5.2/0.5.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>googleapis/mcp-toolbox-sdk-python
(toolbox-llamaindex)</summary>

###
[`v0.5.3`](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/releases/tag/toolbox-core-v0.5.3):
toolbox-core: v0.5.3

[Compare
Source](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/compare/toolbox-llamaindex-v0.5.2...toolbox-llamaindex-v0.5.3)

##### Miscellaneous Chores

- **ci:** Updated the toolbox server version for CI and integration
tests
([#&#8203;388](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/388)),
([#&#8203;414](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/414)),
([#&#8203;421](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/421),
[#&#8203;395](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/395)).
- **deps:** Updated dependencies: `aiohttp` to v3.13.0
([#&#8203;389](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/389)),
`google-auth` to v2.41.1
([#&#8203;383](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/383)),
`isort` to v7
([#&#8203;393](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/393)),
`pytest` to v9
([#&#8203;416](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/416)),
and other non-major Python dependencies
([#&#8203;386](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/386)),
([#&#8203;387](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/387)),
([#&#8203;427](https://redirect.github.com/googleapis/mcp-toolbox-sdk-python/issues/427)).

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/googleapis/genai-toolbox).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi4xMy41IiwidXBkYXRlZEluVmVyIjoiNDIuMTMuNSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: Harsh Jha <83023263+rapid-killer-9@users.noreply.github.com>
Co-authored-by: Twisha Bansal <58483338+twishabansal@users.noreply.github.com>
2025-11-21 13:42:33 +05:30
Mend Renovate
eee77ba333 chore(deps): update dependency google-adk to v1.19.0 (#1998)
This PR contains the following updates:

| Package | Change | Age | Confidence |
|---|---|---|---|
| [google-adk](https://redirect.github.com/google/adk-python)
([changelog](https://redirect.github.com/google/adk-python/blob/main/CHANGELOG.md))
| `==1.18.0` -> `==1.19.0` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/google-adk/1.19.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/google-adk/1.18.0/1.19.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>google/adk-python (google-adk)</summary>

###
[`v1.19.0`](https://redirect.github.com/google/adk-python/blob/HEAD/CHANGELOG.md#1190-2025-11-19)

[Compare
Source](https://redirect.github.com/google/adk-python/compare/v1.18.0...v1.19.0)

##### Features

- **\[Core]**
- Add `id` and `custom_metadata` fields to `MemoryEntry`
([4dd28a3](4dd28a3970))
- Add progressive SSE streaming feature
([a5ac1d5](a5ac1d5e14))
- Add a2a\_request\_meta\_provider to RemoteAgent init
([d12468e](d12468ee5a))
- Add feature decorator for the feature registry system
([871da73](871da731f1))
- Breaking: Raise minimum Python version to 3\_10
([8402832](840283228e))
- Refactor and rename BigQuery agent analytics plugin
([6b14f88](6b14f88726))
- Pass custom\_metadata through forwarding artifact service
([c642f13](c642f13f21))
- Update save\_files\_as\_artifacts\_plugin to never keep inline data
([857de04](857de04deb))

- **\[Evals]**
- Add support for InOrder and AnyOrder match in ToolTrajectoryAvgScore
Metric
([e2d3b2d](e2d3b2d862))

- **\[Integrations]**
- Enhance BQ Plugin Schema, Error Handling, and Logging
([5ac5129](5ac5129fb0))
- Schema Enhancements with Descriptions, Partitioning, and Truncation
Indicator
([7c993b0](7c993b01d1))

- **\[Services]**
- Add file-backed artifact service
([99ca6aa](99ca6aa6e6))
- Add service factory for configurable session and artifact backends
([a12ae81](a12ae812d3))
- Add SqliteSessionService and a migration script to migrate existing DB
using DatabaseSessionService to SqliteSessionService
([e218254](e218254495))
- Add transcription fields to session events
([3ad30a5](3ad30a58f9))
- Full async implementation of DatabaseSessionService
([7495941](74959414d8))

- **\[Models]**
- Add experimental feature to use `parameters_json_schema` and
`response_json_schema` for McpTool
([1dd97f5](1dd97f5b45))
- Add support for parsing inline JSON tool calls in LiteLLM responses
([22eb7e5](22eb7e5b06))
- Expose artifact URLs to the model when available
([e3caf79](e3caf79139))

- **\[Tools]**
- Add BigQuery related label handling
([ffbab4c](ffbab4cf4e))
- Allow setting max\_billed\_bytes in BigQuery tools config
([ffbb0b3](ffbb0b37e1))
- Propagate `application_name` set for the BigQuery Tools as BigQuery
job labels
([f13a11e](f13a11e1dc))
- Set per-tool user agent in BQ calls and tool label in BQ jobs
([c0be1df](c0be1df052))

- **\[Observability]**
- Migrate BigQuery logging to Storage Write API
([a2ce34a](a2ce34a0b9))

##### Bug Fixes

- Add `jsonschema` dependency for Agent Builder config validation
([0fa7e46](0fa7e4619d))
- Add None check for `event` in `remote_a2a_agent.py`
([744f94f](744f94f0c8))
- Add vertexai initialization for code being deployed to AgentEngine
([b8e4aed](b8e4aedfbf))
- Change LiteLLM content and tool parameter handling
([a19be12](a19be12c1f))
- Change name for builder agent
([131d39c](131d39c3db))
- Ensure event compaction completes by awaiting task
([b5f5df9](b5f5df9fa8))
- Fix deploy to cloud run on Windows
([29fea7e](29fea7ec1f))
- Fix error handling when MCP server is unreachable
([ee8106b](ee8106be77))
- Fix error when query job destination is None
([0ccc43c](0ccc43cf49))
- Fix Improve logic for checking if a MCP session is disconnected
([a754c96](a754c96d3c))
- Fix McpToolset crashing with anyio.BrokenResourceError
([8e0648d](8e0648df23))
- Fix Safely handle `FunctionDeclaration` without a `required` attribute
([93aad61](93aad61198))
- Fix status code in error message in RestApiTool
([9b75456](9b754564b3))
- Fix Use `async for` to loop through event iterator to get all events
in vertex\_ai\_session\_service
([9211f4c](9211f4ce8c))
- Fix: Fixes DeprecationWarning when using send method
([2882995](2882995289))
- Improve logic for checking if a MCP session is disconnected
([a48a1a9](a48a1a9e88))
- Improve handling of partial and complete transcriptions in live calls
([1819ecb](1819ecb4b8))
- Keep vertex session event after the session update time
([0ec0195](0ec01956e8))
- Let part converters also return multiple parts so they can support
more usecases
([824ab07](824ab07212))
- Load agent/app before creating session
([236f562](236f562cd2))
- Remove app name from FileArtifactService directory structure
([12db84f](12db84f5cd))
- Remove hardcoded `google-cloud-aiplatform` version in agent engine
requirements
([e15e19d](e15e19da05))
- Stop updating write mode in the global settings during tool execution
([5adbf95](5adbf95a0a))
- Update description for `load_artifacts` tool
([c485889](c4858896ff))

##### Improvements

- Add BigQuery related label handling
([ffbab4c](ffbab4cf4e))
- Add demo for rewind
([8eb1bdb](8eb1bdbc58))
- Add debug logging for live connection
([5d5708b](5d5708b2ab))
- Add debug logging for missing function call events
([f3d6fcf](f3d6fcf444))
- Add default retry options as fall back to llm\_request that are made
during evals
([696852a](696852a280))
- Add plugin for returning GenAI Parts from tools into the model request
([116b26c](116b26c33e))
- Add support for abstract types in AFC
([2efc184](2efc184a46))
- Add support for structured output schemas in LiteLLM models
([7ea4aed](7ea4aed35b))
- Add tests for `max_query_result_rows` in BigQuery tool config
([fd33610](fd33610e96))
- Add type hints in `cleanup_unused_files.py`
([2dea573](2dea5733b7))
- Add util to build our llms.txt and llms-full.txt files
- ADK changes
([f1f4467](f1f44675e4))
- Defer import of `google.cloud.storage` in `GCSArtifactService`
([999af55](999af55880))
- Defer import of `live`, `Client` and `_transformers` in `google.genai`
([22c6dbe](22c6dbe83c))
- Enhance the messaging with possible fixes for RESOURCE\_EXHAUSTED
errors from Gemini
([b2c45f8](b2c45f8d91))
- Improve gepa tau-bench colab for external use
([e02f177](e02f177790))
- Improve gepa voter agent demo colab
([d118479](d118479ccf))
- Lazy import DatabaseSessionService in the adk/sessions/ module
([5f05749](5f057498a2))
- Move adk\_agent\_builder\_assistant to built\_in\_agents
([b2b7f2d](b2b7f2d6aa))
- Plumb memory service from LocalEvalService to EvaluationGenerator
([dc3f60c](dc3f60cc93))
- Removes the unrealistic todo comment of visibility management
([e511eb1](e511eb1f70))
- Returns agent state regardless if ctx.is\_resumable
([d6b928b](d6b928bdf7))
- Stop logging the full content of LLM blobs
([0826755](082675546f))
- Update ADK web to match main branch
([14e3802](14e3802643))
- Update agent instructions and retry limit in
`plugin_reflect_tool_retry` sample
([01bac62](01bac62f0c))
- Update conformance test CLI to handle long-running tool calls
([dd706bd](dd706bdc45))
- Update Gemini Live model names in live bidi streaming sample
([aa77834](aa77834e2e))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/googleapis/genai-toolbox).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi4xNi4xIiwidXBkYXRlZEluVmVyIjoiNDIuMTYuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: Harsh Jha <83023263+rapid-killer-9@users.noreply.github.com>
2025-11-21 12:02:31 +05:30
dishaprakash
6b0ffaa309 chore(ci): Cleanup previous workflows after documentation versioning (#1973)
## Description

This PR deletes an older Github Actions Workflow which deploys the
in-development docs to the `gh-pages` branch. This workflow is not
needed going forward as we have switched to versioned documentation in
the `versioned-gh-pages` branch

## 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)
- [ ] 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>
2025-11-21 10:25:43 +05:30
Averi Kitsch
b935193bea docs: add MCP server readme docs per database (#2004)
## Description

> Should include a concise description of the changes (bug or feature),
it's
> impact, along with a summary of the solution

## 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:

- [ ] Make sure you reviewed

[CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md)
- [ ] 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
- [ ] Ensure the tests and linter pass
- [ ] Code coverage does not decrease (if any source code was changed)
- [ ] Appropriate docs were updated (if necessary)
- [ ] 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>
2025-11-20 20:08:27 -06:00
Mend Renovate
dabfad1e1c chore(deps): update dependency go to v1.25.3 (#1796)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [go](https://go.dev/)
([source](https://redirect.github.com/golang/go)) | toolchain | patch |
`1.25.2` -> `1.25.3` |

---

### Release Notes

<details>
<summary>golang/go (go)</summary>

###
[`v1.25.3`](https://redirect.github.com/golang/go/compare/go1.25.2...go1.25.3)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/googleapis/genai-toolbox).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNTkuNCIsInVwZGF0ZWRJblZlciI6IjQxLjE1OS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: Wenxin Du <117315983+duwenxin99@users.noreply.github.com>
2025-11-20 16:25:34 +00:00
Averi Kitsch
58d31a9f51 chore(deps): update module github.com/gocql/gocql to v2 (#1967)
## Description

> Should include a concise description of the changes (bug or feature),
it's
> impact, along with a summary of the solution

## 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:

- [ ] Make sure you reviewed

[CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md)
- [ ] 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
- [ ] Ensure the tests and linter pass
- [ ] Code coverage does not decrease (if any source code was changed)
- [ ] Appropriate docs were updated (if necessary)
- [ ] Make sure to add `!` if this involve a breaking change

🛠️ Fixes #<issue_number_goes_here>

---------
2025-11-19 18:19:08 -08:00
Yuan Teoh
871514d635 chore: fix release please path for server.json file (#1996) 2025-11-19 15:30:46 -08:00
Dr. Strangelove
18017d6545 feat: support alternate accessToken header name (#1968)
## Description

This commit allows a tool to pull an alternate authorization
token from the header of the http request.

This is initially being built for the Looker integration. Looker
uses its own OAuth token. When deploying MCP Toolbox to Cloud
Run, the default token in the "Authorization" header is for
authentication with Cloud Run. An alternate token can be put into
another header by a client such as ADK or any other client that
can programatically set http headers. This token will be used
to authenticate with Looker.

If needed, other sources can use this by setting the header name
in the source config, passing it into the tool config, and returning
the header name in the Tool GetAuthTokenHeaderName() function.

## 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 #1540
2025-11-19 23:00:13 +00:00
211 changed files with 3416 additions and 594 deletions

View File

@@ -33,19 +33,56 @@ steps:
script: |
go get -d ./...
- id: "install-zig"
name: golang:1
waitFor: ['-']
volumes:
- name: 'zig'
path: '/zig-tools'
script: |
#!/usr/bin/env bash
set -e
apt-get update && apt-get install -y xz-utils
curl -fL "https://ziglang.org/download/0.15.2/zig-x86_64-linux-0.15.2.tar.xz" -o zig.tar.xz
tar -xf zig.tar.xz -C /zig-tools --strip-components=1
- id: "install-macos-sdk"
name: golang:1
waitFor: ['-']
volumes:
- name: 'macos-sdk'
path: '/macos-sdk'
script: |
#!/usr/bin/env bash
set -e
apt-get update && apt-get install -y xz-utils
echo "Downloading macOS 14.5 SDK..."
curl -fL -o sdk.tar.xz https://github.com/alexey-lysiuk/macos-sdk/releases/download/14.5/MacOSX14.5.tar.xz
mkdir -p /macos-sdk/MacOSX14.5.sdk
echo "Unpacking macOS 14.5 SDK..."
tar -xf sdk.tar.xz -C /macos-sdk/MacOSX14.5.sdk --strip-components=1
- id: "build-linux-amd64"
name: golang:1
waitFor:
waitFor:
- "install-dependencies"
- "install-zig"
env:
- 'GOPATH=/gopath'
- 'CGO_ENABLED=1'
- 'GOOS=linux'
- 'GOARCH=amd64'
- 'CC=/zig-tools/zig cc -target x86_64-linux-gnu'
- 'CXX=/zig-tools/zig c++ -target x86_64-linux-gnu'
volumes:
- name: 'go'
path: '/gopath'
- name: 'zig'
path: '/zig-tools'
script: |
#!/usr/bin/env bash
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
go build -ldflags "-X github.com/googleapis/genai-toolbox/cmd.commitSha=$(git rev-parse --short HEAD)" -o toolbox.linux.amd64
go build -ldflags "-X github.com/googleapis/genai-toolbox/cmd.commitSha=$(git rev-parse --short HEAD)" -o toolbox.linux.amd64
- id: "store-linux-amd64"
name: "gcr.io/cloud-builders/gcloud:latest"
@@ -57,33 +94,53 @@ steps:
- id: "build-linux-amd64-geminicli"
name: golang:1
waitFor:
waitFor:
- "install-dependencies"
env:
- "install-zig"
env:
- 'GOPATH=/gopath'
- 'CGO_ENABLED=1'
- 'GOOS=linux'
- 'GOARCH=amd64'
- 'CC=/zig-tools/zig cc -target x86_64-linux-gnu'
- 'CXX=/zig-tools/zig c++ -target x86_64-linux-gnu'
volumes:
- name: 'go'
path: '/gopath'
- name: 'zig'
path: '/zig-tools'
script: |
#!/usr/bin/env bash
export VERSION=$(cat ./cmd/version.txt)
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
go build -ldflags "-X github.com/googleapis/genai-toolbox/cmd.commitSha=$(git rev-parse --short HEAD)" -o toolbox.geminicli.linux.amd64
go build -ldflags "-X github.com/googleapis/genai-toolbox/cmd.commitSha=$(git rev-parse --short HEAD)" -o toolbox.geminicli.linux.amd64
- id: "build-darwin-arm64"
name: golang:1
waitFor:
waitFor:
- "install-dependencies"
- "install-zig"
- "install-macos-sdk"
env:
- 'GOPATH=/gopath'
- 'CGO_ENABLED=1'
- 'GOOS=darwin'
- 'GOARCH=arm64'
- 'SDK_PATH=/macos-sdk/MacOSX14.5.sdk'
- 'MACOS_MIN_VER=10.14'
- 'CGO_LDFLAGS=-mmacosx-version-min=10.14 --sysroot /macos-sdk/MacOSX14.5.sdk -F/macos-sdk/MacOSX14.5.sdk/System/Library/Frameworks -L/usr/lib'
- 'COMMON_FLAGS=-mmacosx-version-min=10.14 -target aarch64-macos.11.0.0-none -isysroot /macos-sdk/MacOSX14.5.sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks'
- 'CC=/zig-tools/zig cc -mmacosx-version-min=10.14 -target aarch64-macos.11.0.0-none -isysroot /macos-sdk/MacOSX14.5.sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks'
- 'CXX=/zig-tools/zig c++ -mmacosx-version-min=10.14 -target aarch64-macos.11.0.0-none -isysroot /macos-sdk/MacOSX14.5.sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks'
volumes:
- name: 'go'
path: '/gopath'
- name: 'zig'
path: '/zig-tools'
- name: 'macos-sdk'
path: '/macos-sdk'
script: |
#!/usr/bin/env bash
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 \
go build -ldflags "-X github.com/googleapis/genai-toolbox/cmd.commitSha=$(git rev-parse --short HEAD)" -o toolbox.darwin.arm64
go build -trimpath -buildmode=pie -ldflags "-s -w -X github.com/googleapis/genai-toolbox/cmd.commitSha=$(git rev-parse --short HEAD)" -o toolbox.darwin.arm64
- id: "store-darwin-arm64"
name: "gcr.io/cloud-builders/gcloud:latest"
@@ -95,32 +152,59 @@ steps:
- id: "build-darwin-arm64-geminicli"
name: golang:1
waitFor:
waitFor:
- "install-dependencies"
env:
- "install-zig"
- "install-macos-sdk"
env:
- 'GOPATH=/gopath'
- 'CGO_ENABLED=1'
- 'GOOS=darwin'
- 'GOARCH=arm64'
- 'SDK_PATH=/macos-sdk/MacOSX14.5.sdk'
- 'MACOS_MIN_VER=10.14'
- 'CGO_LDFLAGS=-mmacosx-version-min=10.14 --sysroot /macos-sdk/MacOSX14.5.sdk -F/macos-sdk/MacOSX14.5.sdk/System/Library/Frameworks -L/usr/lib'
- 'COMMON_FLAGS=-mmacosx-version-min=10.14 -target aarch64-macos.11.0.0-none -isysroot /macos-sdk/MacOSX14.5.sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks'
- 'CC=/zig-tools/zig cc -mmacosx-version-min=10.14 -target aarch64-macos.11.0.0-none -isysroot /macos-sdk/MacOSX14.5.sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks'
- 'CXX=/zig-tools/zig c++ -mmacosx-version-min=10.14 -target aarch64-macos.11.0.0-none -isysroot /macos-sdk/MacOSX14.5.sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks'
volumes:
- name: 'go'
path: '/gopath'
- name: 'zig'
path: '/zig-tools'
- name: 'macos-sdk'
path: '/macos-sdk'
script: |
#!/usr/bin/env bash
export VERSION=$(cat ./cmd/version.txt)
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 \
go build -ldflags "-X github.com/googleapis/genai-toolbox/cmd.commitSha=$(git rev-parse --short HEAD)" -o toolbox.geminicli.darwin.arm64
go build -trimpath -buildmode=pie -ldflags "-s -w -X github.com/googleapis/genai-toolbox/cmd.commitSha=$(git rev-parse --short HEAD)" -o toolbox.geminicli.darwin.arm64
- id: "build-darwin-amd64"
name: golang:1
waitFor:
waitFor:
- "install-dependencies"
- "install-zig"
- "install-macos-sdk"
env:
- 'GOPATH=/gopath'
- 'CGO_ENABLED=1'
- 'GOOS=darwin'
- 'GOARCH=amd64'
- 'SDK_PATH=/macos-sdk/MacOSX14.5.sdk'
- 'MACOS_MIN_VER=10.14'
- 'CGO_LDFLAGS=-mmacosx-version-min=10.14 --sysroot /macos-sdk/MacOSX14.5.sdk -F/macos-sdk/MacOSX14.5.sdk/System/Library/Frameworks -L/usr/lib'
- 'COMMON_FLAGS=-mmacosx-version-min=10.14 -target x86_64-macos.11.0.0-none -isysroot /macos-sdk/MacOSX14.5.sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks'
- 'CC=/zig-tools/zig cc -mmacosx-version-min=10.14 -target x86_64-macos.11.0.0-none -isysroot /macos-sdk/MacOSX14.5.sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks'
- 'CXX=/zig-tools/zig c++ -mmacosx-version-min=10.14 -target x86_64-macos.11.0.0-none -isysroot /macos-sdk/MacOSX14.5.sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks'
volumes:
- name: 'go'
path: '/gopath'
- name: 'zig'
path: '/zig-tools'
- name: 'macos-sdk'
path: '/macos-sdk'
script: |
#!/usr/bin/env bash
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 \
go build -ldflags "-X github.com/googleapis/genai-toolbox/cmd.commitSha=$(git rev-parse --short HEAD)" -o toolbox.darwin.amd64
go build -trimpath -buildmode=pie -ldflags "-s -w -X github.com/googleapis/genai-toolbox/cmd.commitSha=$(git rev-parse --short HEAD)" -o toolbox.darwin.amd64
- id: "store-darwin-amd64"
name: "gcr.io/cloud-builders/gcloud:latest"
@@ -132,32 +216,52 @@ steps:
- id: "build-darwin-amd64-geminicli"
name: golang:1
waitFor:
waitFor:
- "install-dependencies"
env:
- "install-zig"
- "install-macos-sdk"
env:
- 'GOPATH=/gopath'
- 'CGO_ENABLED=1'
- 'GOOS=darwin'
- 'GOARCH=amd64'
- 'SDK_PATH=/macos-sdk/MacOSX14.5.sdk'
- 'MACOS_MIN_VER=10.14'
- 'CGO_LDFLAGS=-mmacosx-version-min=10.14 --sysroot /macos-sdk/MacOSX14.5.sdk -F/macos-sdk/MacOSX14.5.sdk/System/Library/Frameworks -L/usr/lib'
- 'COMMON_FLAGS=-mmacosx-version-min=10.14 -target x86_64-macos.11.0.0-none -isysroot /macos-sdk/MacOSX14.5.sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks'
- 'CC=/zig-tools/zig cc -mmacosx-version-min=10.14 -target x86_64-macos.11.0.0-none -isysroot /macos-sdk/MacOSX14.5.sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks'
- 'CXX=/zig-tools/zig c++ -mmacosx-version-min=10.14 -target x86_64-macos.11.0.0-none -isysroot /macos-sdk/MacOSX14.5.sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks'
volumes:
- name: 'go'
path: '/gopath'
- name: 'zig'
path: '/zig-tools'
- name: 'macos-sdk'
path: '/macos-sdk'
script: |
#!/usr/bin/env bash
export VERSION=$(cat ./cmd/version.txt)
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 \
go build -ldflags "-X github.com/googleapis/genai-toolbox/cmd.commitSha=$(git rev-parse --short HEAD)" -o toolbox.geminicli.darwin.amd64
go build -trimpath -buildmode=pie -ldflags "-s -w -X github.com/googleapis/genai-toolbox/cmd.commitSha=$(git rev-parse --short HEAD)" -o toolbox.geminicli.darwin.amd64
- id: "build-windows-amd64"
name: golang:1
waitFor:
waitFor:
- "install-dependencies"
- "install-zig"
env:
- 'GOPATH=/gopath'
- 'CGO_ENABLED=1'
- 'GOOS=windows'
- 'GOARCH=amd64'
- 'CC=/zig-tools/zig cc -target x86_64-windows-gnu'
- 'CXX=/zig-tools/zig c++ -target x86_64-windows-gnu'
volumes:
- name: 'go'
path: '/gopath'
- name: 'zig'
path: '/zig-tools'
script: |
#!/usr/bin/env bash
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 \
go build -ldflags "-X github.com/googleapis/genai-toolbox/cmd.commitSha=$(git rev-parse --short HEAD)" -o toolbox.windows.amd64
go build -ldflags "-X github.com/googleapis/genai-toolbox/cmd.commitSha=$(git rev-parse --short HEAD)" -o toolbox.windows.amd64
- id: "store-windows-amd64"
name: "gcr.io/cloud-builders/gcloud:latest"
@@ -169,18 +273,25 @@ steps:
- id: "build-windows-amd64-geminicli"
name: golang:1
waitFor:
waitFor:
- "install-dependencies"
env:
- "install-zig"
env:
- 'GOPATH=/gopath'
- 'CGO_ENABLED=1'
- 'GOOS=windows'
- 'GOARCH=amd64'
- 'CC=/zig-tools/zig cc -target x86_64-windows-gnu'
- 'CXX=/zig-tools/zig c++ -target x86_64-windows-gnu'
volumes:
- name: 'go'
path: '/gopath'
- name: 'zig'
path: '/zig-tools'
script: |
#!/usr/bin/env bash
export VERSION=$(cat ./cmd/version.txt)
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 \
go build -ldflags "-X github.com/googleapis/genai-toolbox/cmd.commitSha=$(git rev-parse --short HEAD)" -o toolbox.geminicli.windows.amd64
go build -ldflags "-X github.com/googleapis/genai-toolbox/cmd.commitSha=$(git rev-parse --short HEAD)" -o toolbox.geminicli.windows.amd64
options:
automapSubstitutions: true

View File

@@ -29,7 +29,7 @@ steps:
- id: "install-dependencies"
name: golang:1
waitFor: ['-']
env:
env:
- 'GOPATH=/gopath'
volumes:
- name: 'go'
@@ -37,20 +37,56 @@ steps:
script: |
go get -d ./...
- id: "install-zig"
name: golang:1
waitFor: ['-']
volumes:
- name: 'zig'
path: '/zig-tools'
script: |
#!/usr/bin/env bash
set -e
apt-get update && apt-get install -y xz-utils
curl -fL "https://ziglang.org/download/0.15.2/zig-x86_64-linux-0.15.2.tar.xz" -o zig.tar.xz
tar -xf zig.tar.xz -C /zig-tools --strip-components=1
- id: "install-macos-sdk"
name: golang:1
waitFor: ['-']
volumes:
- name: 'macos-sdk'
path: '/macos-sdk'
script: |
#!/usr/bin/env bash
set -e
apt-get update && apt-get install -y xz-utils
echo "Downloading macOS 14.5 SDK..."
curl -fL -o sdk.tar.xz https://github.com/alexey-lysiuk/macos-sdk/releases/download/14.5/MacOSX14.5.tar.xz
mkdir -p /macos-sdk/MacOSX14.5.sdk
echo "Unpacking macOS 14.5 SDK..."
tar -xf sdk.tar.xz -C /macos-sdk/MacOSX14.5.sdk --strip-components=1
- id: "build-linux-amd64"
name: golang:1
waitFor:
waitFor:
- "install-dependencies"
env:
- "install-zig"
env:
- 'GOPATH=/gopath'
- 'CGO_ENABLED=1'
- 'GOOS=linux'
- 'GOARCH=amd64'
- 'CC=/zig-tools/zig cc -target x86_64-linux-gnu'
- 'CXX=/zig-tools/zig c++ -target x86_64-linux-gnu'
volumes:
- name: 'go'
path: '/gopath'
- name: 'zig'
path: '/zig-tools'
script: |
#!/usr/bin/env bash
export VERSION=$(cat ./cmd/version.txt)
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
go build -ldflags "-X github.com/googleapis/genai-toolbox/cmd.buildType=binary -X github.com/googleapis/genai-toolbox/cmd.commitSha=$(git rev-parse --short HEAD)" -o toolbox.linux.amd64
go build -ldflags "-X github.com/googleapis/genai-toolbox/cmd.buildType=binary -X github.com/googleapis/genai-toolbox/cmd.commitSha=$(git rev-parse --short HEAD)" -o toolbox.linux.amd64
- id: "store-linux-amd64"
name: "gcr.io/cloud-builders/gcloud:latest"
@@ -63,18 +99,24 @@ steps:
- id: "build-linux-amd64-geminicli"
name: golang:1
waitFor:
waitFor:
- "install-dependencies"
env:
- "install-zig"
env:
- 'GOPATH=/gopath'
- 'CGO_ENABLED=1'
- 'GOOS=linux'
- 'GOARCH=amd64'
- 'CC=/zig-tools/zig cc -target x86_64-linux-gnu'
- 'CXX=/zig-tools/zig c++ -target x86_64-linux-gnu'
volumes:
- name: 'go'
path: '/gopath'
- name: 'zig'
path: '/zig-tools'
script: |
#!/usr/bin/env bash
export VERSION=$(cat ./cmd/version.txt)
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
go build -ldflags "-X github.com/googleapis/genai-toolbox/cmd.buildType=geminicli.binary -X github.com/googleapis/genai-toolbox/cmd.commitSha=$(git rev-parse --short HEAD)" -o toolbox.geminicli.linux.amd64
go build -ldflags "-X github.com/googleapis/genai-toolbox/cmd.buildType=geminicli.binary -X github.com/googleapis/genai-toolbox/cmd.commitSha=$(git rev-parse --short HEAD)" -o toolbox.geminicli.linux.amd64
- id: "store-linux-amd64-geminicli"
name: "gcr.io/cloud-builders/gcloud:latest"
@@ -87,18 +129,31 @@ steps:
- id: "build-darwin-arm64"
name: golang:1
waitFor:
waitFor:
- "install-dependencies"
env:
- "install-zig"
- "install-macos-sdk"
env:
- 'GOPATH=/gopath'
- 'CGO_ENABLED=1'
- 'GOOS=darwin'
- 'GOARCH=arm64'
- 'SDK_PATH=/macos-sdk/MacOSX14.5.sdk'
- 'MACOS_MIN_VER=10.14'
- 'CGO_LDFLAGS=-mmacosx-version-min=10.14 --sysroot /macos-sdk/MacOSX14.5.sdk -F/macos-sdk/MacOSX14.5.sdk/System/Library/Frameworks -L/usr/lib'
- 'COMMON_FLAGS=-mmacosx-version-min=10.14 -target aarch64-macos.11.0.0-none -isysroot /macos-sdk/MacOSX14.5.sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks'
- 'CC=/zig-tools/zig cc -mmacosx-version-min=10.14 -target aarch64-macos.11.0.0-none -isysroot /macos-sdk/MacOSX14.5.sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks'
- 'CXX=/zig-tools/zig c++ -mmacosx-version-min=10.14 -target aarch64-macos.11.0.0-none -isysroot /macos-sdk/MacOSX14.5.sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks'
volumes:
- name: 'go'
path: '/gopath'
- name: 'zig'
path: '/zig-tools'
- name: 'macos-sdk'
path: '/macos-sdk'
script: |
#!/usr/bin/env bash
export VERSION=$(cat ./cmd/version.txt)
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 \
go build -ldflags "-X github.com/googleapis/genai-toolbox/cmd.buildType=binary -X github.com/googleapis/genai-toolbox/cmd.commitSha=$(git rev-parse --short HEAD)" -o toolbox.darwin.arm64
go build -trimpath -buildmode=pie -ldflags "-s -w -X github.com/googleapis/genai-toolbox/cmd.buildType=binary -X github.com/googleapis/genai-toolbox/cmd.commitSha=$(git rev-parse --short HEAD)" -o toolbox.darwin.arm64
- id: "store-darwin-arm64"
name: "gcr.io/cloud-builders/gcloud:latest"
@@ -107,22 +162,36 @@ steps:
script: |
#!/usr/bin/env bash
export VERSION=v$(cat ./cmd/version.txt)
gcloud storage cp toolbox.darwin.arm64 gs://$_BUCKET_NAME/$VERSION/darwin/arm64/toolbox
gcloud storage cp toolbox.darwin.arm64 \
gs://$_BUCKET_NAME/$VERSION/darwin/arm64/toolbox
- id: "build-darwin-arm64-geminicli"
name: golang:1
waitFor:
waitFor:
- "install-dependencies"
env:
- "install-zig"
- "install-macos-sdk"
env:
- 'GOPATH=/gopath'
- 'CGO_ENABLED=1'
- 'GOOS=darwin'
- 'GOARCH=arm64'
- 'SDK_PATH=/macos-sdk/MacOSX14.5.sdk'
- 'MACOS_MIN_VER=10.14'
- 'CGO_LDFLAGS=-mmacosx-version-min=10.14 --sysroot /macos-sdk/MacOSX14.5.sdk -F/macos-sdk/MacOSX14.5.sdk/System/Library/Frameworks -L/usr/lib'
- 'COMMON_FLAGS=-mmacosx-version-min=10.14 -target aarch64-macos.11.0.0-none -isysroot /macos-sdk/MacOSX14.5.sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks'
- 'CC=/zig-tools/zig cc -mmacosx-version-min=10.14 -target aarch64-macos.11.0.0-none -isysroot /macos-sdk/MacOSX14.5.sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks'
- 'CXX=/zig-tools/zig c++ -mmacosx-version-min=10.14 -target aarch64-macos.11.0.0-none -isysroot /macos-sdk/MacOSX14.5.sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks'
volumes:
- name: 'go'
path: '/gopath'
- name: 'zig'
path: '/zig-tools'
- name: 'macos-sdk'
path: '/macos-sdk'
script: |
#!/usr/bin/env bash
export VERSION=$(cat ./cmd/version.txt)
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 \
go build -ldflags "-X github.com/googleapis/genai-toolbox/cmd.buildType=geminicli.binary -X github.com/googleapis/genai-toolbox/cmd.commitSha=$(git rev-parse --short HEAD)" -o toolbox.geminicli.darwin.arm64
go build -trimpath -buildmode=pie -ldflags "-s -w -X github.com/googleapis/genai-toolbox/cmd.buildType=geminicli.binary -X github.com/googleapis/genai-toolbox/cmd.commitSha=$(git rev-parse --short HEAD)" -o toolbox.geminicli.darwin.arm64
- id: "store-darwin-arm64-geminicli"
name: "gcr.io/cloud-builders/gcloud:latest"
@@ -135,18 +204,31 @@ steps:
- id: "build-darwin-amd64"
name: golang:1
waitFor:
waitFor:
- "install-dependencies"
env:
- "install-zig"
- "install-macos-sdk"
env:
- 'GOPATH=/gopath'
- 'CGO_ENABLED=1'
- 'GOOS=darwin'
- 'GOARCH=amd64'
- 'SDK_PATH=/macos-sdk/MacOSX14.5.sdk'
- 'MACOS_MIN_VER=10.14'
- 'CGO_LDFLAGS=-mmacosx-version-min=10.14 --sysroot /macos-sdk/MacOSX14.5.sdk -F/macos-sdk/MacOSX14.5.sdk/System/Library/Frameworks -L/usr/lib'
- 'COMMON_FLAGS=-mmacosx-version-min=10.14 -target x86_64-macos.11.0.0-none -isysroot /macos-sdk/MacOSX14.5.sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks'
- 'CC=/zig-tools/zig cc -mmacosx-version-min=10.14 -target x86_64-macos.11.0.0-none -isysroot /macos-sdk/MacOSX14.5.sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks'
- 'CXX=/zig-tools/zig c++ -mmacosx-version-min=10.14 -target x86_64-macos.11.0.0-none -isysroot /macos-sdk/MacOSX14.5.sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks'
volumes:
- name: 'go'
path: '/gopath'
- name: 'zig'
path: '/zig-tools'
- name: 'macos-sdk'
path: '/macos-sdk'
script: |
#!/usr/bin/env bash
export VERSION=$(cat ./cmd/version.txt)
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 \
go build -ldflags "-X github.com/googleapis/genai-toolbox/cmd.buildType=binary -X github.com/googleapis/genai-toolbox/cmd.commitSha=$(git rev-parse --short HEAD)" -o toolbox.darwin.amd64
go build -trimpath -buildmode=pie -ldflags "-s -w -X github.com/googleapis/genai-toolbox/cmd.buildType=binary -X github.com/googleapis/genai-toolbox/cmd.commitSha=$(git rev-parse --short HEAD)" -o toolbox.darwin.amd64
- id: "store-darwin-amd64"
name: "gcr.io/cloud-builders/gcloud:latest"
@@ -159,18 +241,31 @@ steps:
- id: "build-darwin-amd64-geminicli"
name: golang:1
waitFor:
waitFor:
- "install-dependencies"
env:
- "install-zig"
- "install-macos-sdk"
env:
- 'GOPATH=/gopath'
- 'CGO_ENABLED=1'
- 'GOOS=darwin'
- 'GOARCH=amd64'
- 'SDK_PATH=/macos-sdk/MacOSX14.5.sdk'
- 'MACOS_MIN_VER=10.14'
- 'CGO_LDFLAGS=-mmacosx-version-min=10.14 --sysroot /macos-sdk/MacOSX14.5.sdk -F/macos-sdk/MacOSX14.5.sdk/System/Library/Frameworks -L/usr/lib'
- 'COMMON_FLAGS=-mmacosx-version-min=10.14 -target x86_64-macos.11.0.0-none -isysroot /macos-sdk/MacOSX14.5.sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks'
- 'CC=/zig-tools/zig cc -mmacosx-version-min=10.14 -target x86_64-macos.11.0.0-none -isysroot /macos-sdk/MacOSX14.5.sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks'
- 'CXX=/zig-tools/zig c++ -mmacosx-version-min=10.14 -target x86_64-macos.11.0.0-none -isysroot /macos-sdk/MacOSX14.5.sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks'
volumes:
- name: 'go'
path: '/gopath'
- name: 'zig'
path: '/zig-tools'
- name: 'macos-sdk'
path: '/macos-sdk'
script: |
#!/usr/bin/env bash
export VERSION=$(cat ./cmd/version.txt)
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 \
go build -ldflags "-X github.com/googleapis/genai-toolbox/cmd.buildType=geminicli.binary -X github.com/googleapis/genai-toolbox/cmd.commitSha=$(git rev-parse --short HEAD)" -o toolbox.geminicli.darwin.amd64
go build -trimpath -buildmode=pie -ldflags "-s -w -X github.com/googleapis/genai-toolbox/cmd.buildType=geminicli.binary -X github.com/googleapis/genai-toolbox/cmd.commitSha=$(git rev-parse --short HEAD)" -o toolbox.geminicli.darwin.amd64
- id: "store-darwin-amd64-geminicli"
name: "gcr.io/cloud-builders/gcloud:latest"
@@ -179,22 +274,29 @@ steps:
script: |
#!/usr/bin/env bash
export VERSION=v$(cat ./cmd/version.txt)
gcloud storage cp toolbox.geminicli.darwin.amd64 gs://$_BUCKET_NAME/geminicli/$VERSION/darwin/amd64/toolbox
gcloud storage cp toolbox.geminicli.darwin.amd64 \
gs://$_BUCKET_NAME/geminicli/$VERSION/darwin/amd64/toolbox
- id: "build-windows-amd64"
name: golang:1
waitFor:
waitFor:
- "install-dependencies"
env:
- "install-zig"
env:
- 'GOPATH=/gopath'
- 'CGO_ENABLED=1'
- 'GOOS=windows'
- 'GOARCH=amd64'
- 'CC=/zig-tools/zig cc -target x86_64-windows-gnu'
- 'CXX=/zig-tools/zig c++ -target x86_64-windows-gnu'
volumes:
- name: 'go'
path: '/gopath'
- name: 'zig'
path: '/zig-tools'
script: |
#!/usr/bin/env bash
export VERSION=$(cat ./cmd/version.txt)
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 \
go build -ldflags "-X github.com/googleapis/genai-toolbox/cmd.buildType=binary -X github.com/googleapis/genai-toolbox/cmd.commitSha=$(git rev-parse --short HEAD)" -o toolbox.windows.amd64
go build -ldflags "-X github.com/googleapis/genai-toolbox/cmd.buildType=binary -X github.com/googleapis/genai-toolbox/cmd.commitSha=$(git rev-parse --short HEAD)" -o toolbox.windows.amd64
- id: "store-windows-amd64"
name: "gcr.io/cloud-builders/gcloud:latest"
@@ -207,18 +309,26 @@ steps:
- id: "build-windows-amd64-geminicli"
name: golang:1
waitFor:
waitFor:
- "install-dependencies"
env:
- "install-zig"
env:
- 'GOPATH=/gopath'
- 'CGO_ENABLED=1'
- 'GOOS=windows'
- 'GOARCH=amd64'
- 'CC=/zig-tools/zig cc -target x86_64-windows-gnu'
- 'CXX=/zig-tools/zig c++ -target x86_64-windows-gnu'
volumes:
- name: 'go'
path: '/gopath'
- name: 'zig'
path: '/zig-tools'
- name: 'macos-sdk'
path: '/macos-sdk'
script: |
#!/usr/bin/env bash
export VERSION=$(cat ./cmd/version.txt)
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 \
go build -ldflags "-X github.com/googleapis/genai-toolbox/cmd.buildType=geminicli.binary -X github.com/googleapis/genai-toolbox/cmd.commitSha=$(git rev-parse --short HEAD)" -o toolbox.geminicli.windows.amd64
go build -ldflags "-X github.com/googleapis/genai-toolbox/cmd.buildType=geminicli.binary -X github.com/googleapis/genai-toolbox/cmd.commitSha=$(git rev-parse --short HEAD)" -o toolbox.geminicli.windows.amd64
- id: "store-windows-amd64-geminicli"
name: "gcr.io/cloud-builders/gcloud:latest"
@@ -243,4 +353,4 @@ substitutions:
_AR_REPO_NAME: toolbox
_BUCKET_NAME: genai-toolbox
_DOCKER_URI: ${_AR_HOSTNAME}/${PROJECT_ID}/${_AR_REPO_NAME}/toolbox
_PUSH_LATEST: "true"
_PUSH_LATEST: "false" # Substituted in trigger

View File

@@ -40,12 +40,12 @@ extraFiles: [
"gemini-extension.json",
{
"type": "json",
"path": ".registry/server.json",
"path": "server.json",
"jsonpath": "$.version"
},
{
"type": "json",
"path": ".registry/server.json",
"path": "server.json",
"jsonpath": "$.packages[0].identifier"
},
]

View File

@@ -35,7 +35,9 @@ jobs:
ref: ${{ github.event.release.tag_name }}
- name: Get Version from Release Tag
run: echo "VERSION=${{ github.event.release.tag_name }}" >> $GITHUB_ENV
run: echo "VERSION=${GITHUB_EVENT_RELEASE_TAG_NAME}" >> $GITHUB_ENV
env:
GITHUB_EVENT_RELEASE_TAG_NAME: ${{ github.event.release.tag_name }}
- name: Setup Hugo
uses: peaceiris/actions-hugo@75d2e84710de30f6ff7268e08f310b60ef14033f # v3

View File

@@ -1,79 +0,0 @@
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: "docs"
permissions:
contents: write
on:
push:
branches:
- main
paths:
- 'docs/**'
- 'github/workflows/docs**'
- '.hugo/**'
# Allow triggering manually.
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-24.04
defaults:
run:
working-directory: .hugo
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
with:
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Setup Hugo
uses: peaceiris/actions-hugo@75d2e84710de30f6ff7268e08f310b60ef14033f # v3
with:
hugo-version: "0.145.0"
extended: true
- name: Setup Node
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
with:
node-version: "22"
- name: Cache dependencies
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
- run: hugo --minify
env:
HUGO_BASEURL: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/
HUGO_RELATIVEURLS: false
- name: Deploy
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: .hugo/public
# Do not delete previews on each production deploy.
# CSS or JS changes will require manual clean-up.
keep_files: true
commit_message: "deploy: ${{ github.event.head_commit.message }}"

View File

@@ -11,10 +11,15 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Use the latest stable golang 1.x to compile to a binary
FROM --platform=$BUILDPLATFORM golang:1 AS build
# Install Zig for CGO cross-compilation
RUN apt-get update && apt-get install -y xz-utils
RUN curl -fL "https://ziglang.org/download/0.15.2/zig-x86_64-linux-0.15.2.tar.xz" -o zig.tar.xz && \
mkdir -p /zig && \
tar -xf zig.tar.xz -C /zig --strip-components=1 && \
rm zig.tar.xz
WORKDIR /go/src/genai-toolbox
COPY . .
@@ -24,11 +29,22 @@ ARG BUILD_TYPE="container.dev"
ARG COMMIT_SHA=""
RUN go get ./...
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} \
go build -ldflags "-X github.com/googleapis/genai-toolbox/cmd.buildType=${BUILD_TYPE} -X github.com/googleapis/genai-toolbox/cmd.commitSha=${COMMIT_SHA}"
RUN export ZIG_TARGET="" && \
case "${TARGETARCH}" in \
("amd64") ZIG_TARGET="x86_64-linux-gnu" ;; \
("arm64") ZIG_TARGET="aarch64-linux-gnu" ;; \
(*) echo "Unsupported architecture: ${TARGETARCH}" && exit 1 ;; \
esac && \
CGO_ENABLED=1 GOOS=${TARGETOS} GOARCH=${TARGETARCH} \
CC="/zig/zig cc -target ${ZIG_TARGET}" \
CXX="/zig/zig c++ -target ${ZIG_TARGET}" \
go build \
-ldflags "-X github.com/googleapis/genai-toolbox/cmd.buildType=${BUILD_TYPE} -X github.com/googleapis/genai-toolbox/cmd.commitSha=${COMMIT_SHA}" \
-o genai-toolbox .
# Final Stage
FROM gcr.io/distroless/static:nonroot
FROM gcr.io/distroless/cc-debian12:nonroot
WORKDIR /app
COPY --from=build --chown=nonroot /go/src/genai-toolbox/genai-toolbox /toolbox

View File

@@ -163,9 +163,9 @@ To install Toolbox as a binary:
> To install Toolbox as a binary on Windows (AMD64):
>
> ```powershell
> # see releases page for other versions
> $VERSION = "0.21.0"
> Invoke-WebRequest -Uri "https://storage.googleapis.com/genai-toolbox/v$VERSION/windows/amd64/toolbox.exe" -OutFile "toolbox.exe"
> :: see releases page for other versions
> set VERSION=0.21.0
> curl -o toolbox.exe "https://storage.googleapis.com/genai-toolbox/v%VERSION%/windows/amd64/toolbox.exe"
> ```
>
> </details>

View File

@@ -98,6 +98,7 @@ import (
_ "github.com/googleapis/genai-toolbox/internal/tools/cloudsqlmssql/cloudsqlmssqlcreateinstance"
_ "github.com/googleapis/genai-toolbox/internal/tools/cloudsqlmysql/cloudsqlmysqlcreateinstance"
_ "github.com/googleapis/genai-toolbox/internal/tools/cloudsqlpg/cloudsqlpgcreateinstances"
_ "github.com/googleapis/genai-toolbox/internal/tools/cloudsqlpg/cloudsqlpgupgradeprecheck"
_ "github.com/googleapis/genai-toolbox/internal/tools/couchbase"
_ "github.com/googleapis/genai-toolbox/internal/tools/dataform/dataformcompilelocal"
_ "github.com/googleapis/genai-toolbox/internal/tools/dataplex/dataplexlookupentry"

View File

@@ -1448,7 +1448,7 @@ func TestPrebuiltTools(t *testing.T) {
wantToolset: server.ToolsetConfigs{
"cloud_sql_postgres_admin_tools": tools.ToolsetConfig{
Name: "cloud_sql_postgres_admin_tools",
ToolNames: []string{"create_instance", "get_instance", "list_instances", "create_database", "list_databases", "create_user", "wait_for_operation"},
ToolNames: []string{"create_instance", "get_instance", "list_instances", "create_database", "list_databases", "create_user", "wait_for_operation", "postgres_upgrade_precheck"},
},
},
},

View File

@@ -0,0 +1,88 @@
# AlloyDB for PostgreSQL Admin MCP Server
The AlloyDB Model Context Protocol (MCP) Server gives AI-powered development tools the ability to work with your Google Cloud AlloyDB for PostgreSQL resources. It supports full lifecycle control, from creating clusters and instances to exploring schemas and running queries.
## Features
An editor configured to use the AlloyDB MCP server can use its AI capabilities to help you:
* **Provision & Manage Infrastructure**: Create and manage AlloyDB clusters, instances, and users
## Installation and Setup
### Prerequisites
* Download and install [MCP Toolbox](https://github.com/googleapis/genai-toolbox):
1. **Download the Toolbox binary**:
Download the latest binary for your operating system and architecture from the storage bucket. Check the [releases page](https://github.com/googleapis/genai-toolbox/releases) for OS and CPU architecture support:
`https://storage.googleapis.com/genai-toolbox/v0.21.0/<os>/<arch>/toolbox`
* Replace `<os>` with `linux`, `darwin` (macOS), or `windows`.
* Replace `<arch>` with `amd64` (Intel) or `arm64` (Apple Silicon).
<!-- {x-release-please-start-version} -->
```
curl -L -o toolbox https://storage.googleapis.com/genai-toolbox/v0.21.0/linux/amd64/toolbox
```
<!-- {x-release-please-end} -->
2. **Make it executable**:
```bash
chmod +x toolbox
```
3. **Move binary to `/usr/local/bin/` or `/usr/bin/`**:
```bash
sudo mv toolbox /usr/local/bin/
# sudo mv toolbox /usr/bin/
```
**On Windows, move binary to the `WindowsApps\` folder**:
```
move "C:\Users\<path-to-binary>\toolbox.exe" "C:\Users\<username>\AppData\Local\Microsoft\WindowsApps\"
```
**Tip:** Ensure the destination folder for your binary is included in
your system's PATH environment variable. To check `PATH`, use `echo
$PATH` (or `echo %PATH%` on Windows).
**Note:** You may need to restart Antigravity for changes to take effect.
* A Google Cloud project with the **AlloyDB API** enabled.
* Ensure [Application Default Credentials](https://cloud.google.com/docs/authentication/gcloud) are available in your environment.
* IAM Permissions:
* AlloyDB Admin (`roles/alloydb.admin`) (for managing infrastructure)
* Service Usage Consumer (`roles/serviceusage.serviceUsageConsumer`)
### Configuration
1. **Access the Store**: Open the MCP Store panel within the "..." dropdown at the top of the editor's side panel.
2. **Browse and Install**: Search for "AlloyDB for PostgreSQL Admin", and click "Install".
## Usage
Once configured, the MCP server will automatically provide AlloyDB capabilities to your AI assistant. You can:
* "Create a new AlloyDB cluster named 'e-commerce-prod' in the 'my-gcp-project' project."
* "Add a read-only instance to my 'e-commerce-prod' cluster."
* "Create a new user named 'analyst' with read access to all tables."
## Server Capabilities
The AlloyDB MCP server provides the following tools:
| Tool Name | Description |
|:---------------------|:-------------------------------------------------------------------|
| `create_cluster` | Create an AlloyDB cluster. |
| `create_instance` | Create an AlloyDB instance (PRIMARY, READ-POOL, or SECONDARY). |
| `create_user` | Create ALLOYDB-BUILT-IN or IAM-based users for an AlloyDB cluster. |
| `get_cluster` | Get details about an AlloyDB cluster. |
| `get_instance` | Get details about an AlloyDB instance. |
| `get_user` | Get details about a user in an AlloyDB cluster. |
| `list_clusters` | List clusters in a given project and location. |
| `list_instances` | List instances in a given project and location. |
| `list_users` | List users in a given project and location. |
| `wait_for_operation` | Poll the operations API until the operation is done. |
## Documentation
For more information, visit the [AlloyDB for PostgreSQL documentation](https://cloud.google.com/alloydb/docs).

103
docs/ALLOYDBPG_README.md Normal file
View File

@@ -0,0 +1,103 @@
# AlloyDB for PostgreSQL MCP Server
The AlloyDB Model Context Protocol (MCP) Server gives AI-powered development tools the ability to work with your Google Cloud AlloyDB for PostgreSQL resources. It supports full lifecycle control, from exploring schemas and running queries to monitoring your database.
## Features
An editor configured to use the AlloyDB MCP server can use its AI capabilities to help you:
- **Explore Schemas and Data** - List tables, get table details, and view data
- **Execute SQL** - Run SQL queries directly from your editor
- **Monitor Performance** - View active queries, query plans, and other performance metrics (via observability tools)
- **Manage Extensions** - List available and installed PostgreSQL extensions
## Installation and Setup
### Prerequisites
* Download and install [MCP Toolbox](https://github.com/googleapis/genai-toolbox):
1. **Download the Toolbox binary**:
Download the latest binary for your operating system and architecture from the storage bucket. Check the [releases page](https://github.com/googleapis/genai-toolbox/releases) for OS and CPU architecture support:
`https://storage.googleapis.com/genai-toolbox/v0.21.0/<os>/<arch>/toolbox`
* Replace `<os>` with `linux`, `darwin` (macOS), or `windows`.
* Replace `<arch>` with `amd64` (Intel) or `arm64` (Apple Silicon).
<!-- {x-release-please-start-version} -->
```
curl -L -o toolbox https://storage.googleapis.com/genai-toolbox/v0.21.0/linux/amd64/toolbox
```
<!-- {x-release-please-end} -->
2. **Make it executable**:
```bash
chmod +x toolbox
```
3. **Move binary to `/usr/local/bin/` or `/usr/bin/`**:
```bash
sudo mv toolbox /usr/local/bin/
# sudo mv toolbox /usr/bin/
```
**On Windows, move binary to the `WindowsApps\` folder**:
```
move "C:\Users\<path-to-binary>\toolbox.exe" "C:\Users\<username>\AppData\Local\Microsoft\WindowsApps\"
```
**Tip:** Ensure the destination folder for your binary is included in
your system's PATH environment variable. To check `PATH`, use `echo
$PATH` (or `echo %PATH%` on Windows).
**Note:** You may need to restart Antigravity for changes to take effect.
* A Google Cloud project with the **AlloyDB API** enabled.
* Ensure [Application Default Credentials](https://cloud.google.com/docs/authentication/gcloud) are available in your environment.
* IAM Permissions:
* AlloyDB Client (`roles/alloydb.client`) (for connecting and querying)
* Service Usage Consumer (`roles/serviceusage.serviceUsageConsumer`)
### Configuration
1. **Access the Store**: Open the MCP Store panel within the "..." dropdown at the top of the editor's side panel.
2. **Browse and Install**: Search for "AlloyDB for PostgreSQL", and click "Install".
3. **Configuration**: The following configuration is needed for the server:
* AlloyDB Project ID: The GCP project ID.
* AlloyDB Region: The region of your AlloyDB instance.
* AlloyDB Cluster ID: The ID of your AlloyDB cluster.
* AlloyDB Instance ID: The ID of your AlloyDB instance.
* AlloyDB Database Name: The name of the database.
* AlloyDB Database User: (Optional) The database username. Defaults to IAM authentication if unspecified.
* AlloyDB Database Password: (Optional) The password for the database user. Defaults to IAM authentication if unspecified.
* AlloyDB IP Type: (Optional) The IP type i.e. “Public” or “Private”. Defaults to "Public" if unspecified.
> [!NOTE]
> If your AlloyDB instance uses private IPs, you must run the MCP server in the same Virtual Private Cloud (VPC) network.
## Usage
Once configured, the MCP server will automatically provide AlloyDB capabilities to your AI assistant. You can:
* "Show me all tables in the 'orders' database."
* "What are the columns in the 'products' table?"
* "How many orders were placed in the last 30 days?"
## Server Capabilities
The AlloyDB MCP server provides the following tools:
| Tool Name | Description |
|:---------------------------------|:-----------------------------------------------------------|
| `list_tables` | Lists detailed schema information for user-created tables. |
| `execute_sql` | Executes a SQL query. |
| `list_active_queries` | List currently running queries. |
| `list_available_extensions` | List available extensions for installation. |
| `list_installed_extensions` | List installed extensions. |
| `get_query_plan` | Get query plan for a SQL statement. |
| `list_autovacuum_configurations` | List autovacuum configurations and their values. |
| `list_memory_configurations` | List memory configurations and their values. |
| `list_top_bloated_tables` | List top bloated tables. |
| `list_replication_slots` | List replication slots. |
| `list_invalid_indexes` | List invalid indexes. |
## Documentation
For more information, visit the [AlloyDB for PostgreSQL documentation](https://cloud.google.com/alloydb/docs).

96
docs/BIGQUERY_README.md Normal file
View File

@@ -0,0 +1,96 @@
# BigQuery MCP Server
The BigQuery Model Context Protocol (MCP) Server enables AI-powered development tools to seamlessly connect, interact, and generate data insights with your BigQuery datasets and data using natural language commands.
## Features
An editor configured to use the BigQuery MCP server can use its AI capabilities to help you:
- **Natural Language to Data Analytics:** Easily find required BigQuery tables and ask analytical questions in plain English.
- **Seamless Workflow:** Stay within your CLI, eliminating the need to constantly switch to the GCP console for generating analytical insights.
- **Run Advanced Analytics:** Generate forecasts and perform contribution analysis using built-in advanced tools.
## Installation and Setup
### Prerequisites
* Download and install [MCP Toolbox](https://github.com/googleapis/genai-toolbox):
1. **Download the Toolbox binary**:
Download the latest binary for your operating system and architecture from the storage bucket. Check the [releases page](https://github.com/googleapis/genai-toolbox/releases) for OS and CPU architecture support:
`https://storage.googleapis.com/genai-toolbox/v0.21.0/<os>/<arch>/toolbox`
* Replace `<os>` with `linux`, `darwin` (macOS), or `windows`.
* Replace `<arch>` with `amd64` (Intel) or `arm64` (Apple Silicon).
<!-- {x-release-please-start-version} -->
```
curl -L -o toolbox https://storage.googleapis.com/genai-toolbox/v0.21.0/linux/amd64/toolbox
```
<!-- {x-release-please-end} -->
2. **Make it executable**:
```bash
chmod +x toolbox
```
3. **Move binary to `/usr/local/bin/` or `/usr/bin/`**:
```bash
sudo mv toolbox /usr/local/bin/
# sudo mv toolbox /usr/bin/
```
**On Windows, move binary to the `WindowsApps\` folder**:
```
move "C:\Users\<path-to-binary>\toolbox.exe" "C:\Users\<username>\AppData\Local\Microsoft\WindowsApps\"
```
**Tip:** Ensure the destination folder for your binary is included in
your system's PATH environment variable. To check `PATH`, use `echo
$PATH` (or `echo %PATH%` on Windows).
**Note:** You may need to restart Antigravity for changes to take effect.
* A Google Cloud project with the **BigQuery API** enabled.
* Ensure [Application Default Credentials](https://cloud.google.com/docs/authentication/gcloud) are available in your environment.
* IAM Permissions:
* BigQuery User (`roles/bigquery.user`)
### Configuration
1. **Access the Store**: Open the MCP Store panel within the "..." dropdown at the top of the editor's side panel.
2. **Browse and Install**: Search for "BigQuery", and click "Install".
3. **Configuration**: The following configuration is needed for the server:
* BigQuery Project ID: The GCP project ID.
* BigQuery Location: (Optional) The location of your BigQuery dataset (e.g. "US", "EU").
### Usage
Once configured, the MCP server will automatically provide BigQuery capabilities to your AI assistant. You can:
* **Find Data:**
* "Find tables related to PyPi downloads"
* "Find tables related to Google analytics data in the dataset bigquery-public-data"
* **Generate Analytics and Insights:**
* "Using bigquery-public-data.pypi.file_downloads show me the top 10 downloaded pypi packages this month."
* "Using bigquery-public-data.pypi.file_downloads can you forecast downloads for the last four months of 2025 for package urllib3?"
## Server Capabilities
The BigQuery MCP server provides the following tools:
| Tool Name | Description |
|:-----------------------|:----------------------------------------------------------------|
| `execute_sql` | Executes a SQL query. |
| `forecast` | Forecast time series data. |
| `get_dataset_info` | Get dataset metadata. |
| `get_table_info` | Get table metadata. |
| `list_dataset_ids` | Lists dataset IDs in the database. |
| `list_table_ids` | Lists table IDs in the database. |
| `analyze_contribution` | Perform contribution analysis, also called key driver analysis. |
| `search_catalog` | Search for tables based on the provided query. |
## Documentation
For more information, visit the [BigQuery documentation](https://cloud.google.com/bigquery/docs).

View File

@@ -0,0 +1,83 @@
# Cloud SQL for SQL Server Admin MCP Server
The Cloud SQL for SQL Server Model Context Protocol (MCP) Server gives AI-powered development tools the ability to work with your Google Cloud SQL for SQL Server databases. It supports connecting to instances, exploring schemas, and running queries.
## Features
An editor configured to use the Cloud SQL for SQL Server MCP server can use its AI capabilities to help you:
- **Provision & Manage Infrastructure** - Create and manage Cloud SQL instances and users
## Installation and Setup
### Prerequisites
* Download and install [MCP Toolbox](https://github.com/googleapis/genai-toolbox):
1. **Download the Toolbox binary**:
Download the latest binary for your operating system and architecture from the storage bucket. Check the [releases page](https://github.com/googleapis/genai-toolbox/releases) for OS and CPU architecture support:
`https://storage.googleapis.com/genai-toolbox/v0.21.0/<os>/<arch>/toolbox`
* Replace `<os>` with `linux`, `darwin` (macOS), or `windows`.
* Replace `<arch>` with `amd64` (Intel) or `arm64` (Apple Silicon).
<!-- {x-release-please-start-version} -->
```
curl -L -o toolbox https://storage.googleapis.com/genai-toolbox/v0.21.0/linux/amd64/toolbox
```
<!-- {x-release-please-end} -->
2. **Make it executable**:
```bash
chmod +x toolbox
```
3. **Move binary to `/usr/local/bin/` or `/usr/bin/`**:
```bash
sudo mv toolbox /usr/local/bin/
# sudo mv toolbox /usr/bin/
```
**On Windows, move binary to the `WindowsApps\` folder**:
```
move "C:\Users\<path-to-binary>\toolbox.exe" "C:\Users\<username>\AppData\Local\Microsoft\WindowsApps\"
```
**Tip:** Ensure the destination folder for your binary is included in
your system's PATH environment variable. To check `PATH`, use `echo
$PATH` (or `echo %PATH%` on Windows).
**Note:** You may need to restart Antigravity for changes to take effect.
* A Google Cloud project with the **Cloud SQL Admin API** enabled.
* Ensure [Application Default Credentials](https://cloud.google.com/docs/authentication/gcloud) are available in your environment.
* IAM Permissions:
* Cloud SQL Viewer (`roles/cloudsql.viewer`)
* Cloud SQL Admin (`roles/cloudsql.admin`)
### Configuration
1. **Access the Store**: Open the MCP Store panel within the "..." dropdown at the top of the editor's side panel.
2. **Browse and Install**: Search for "Cloud SQL for SQL Server Admin", and click "Install".
## Usage
Once configured, the MCP server will automatically provide Cloud SQL for SQL Server capabilities to your AI assistant. You can:
* "Create a new Cloud SQL for SQL Server instance named 'e-commerce-prod' in the 'my-gcp-project' project."
* "Create a new user named 'analyst' with read access to all tables."
## Server Capabilities
The Cloud SQL for SQL Server MCP server provides the following tools:
| Tool Name | Description |
|:---------------------|:-------------------------------------------------------|
| `create_instance` | Create an instance (PRIMARY, READ-POOL, or SECONDARY). |
| `create_user` | Create BUILT-IN or IAM-based users for an instance. |
| `get_instance` | Get details about an instance. |
| `get_user` | Get details about a user in an instance. |
| `list_instances` | List instances in a given project and location. |
| `list_users` | List users in a given project and location. |
| `wait_for_operation` | Poll the operations API until the operation is done. |
## Documentation
For more information, visit the [Cloud SQL for SQL Server documentation](https://cloud.google.com/sql/docs/sqlserver).

View File

@@ -0,0 +1,90 @@
# Cloud SQL for SQL Server MCP Server
The Cloud SQL for SQL Server Model Context Protocol (MCP) Server gives AI-powered development tools the ability to work with your Google Cloud SQL for SQL Server databases. It supports connecting to instances, exploring schemas, and running queries.
## Features
An editor configured to use the Cloud SQL for SQL Server MCP server can use its AI capabilities to help you:
- **Query Data** - Execute SQL queries
- **Explore Schema** - List tables and view schema details
## Installation and Setup
### Prerequisites
* Download and install [MCP Toolbox](https://github.com/googleapis/genai-toolbox):
1. **Download the Toolbox binary**:
Download the latest binary for your operating system and architecture from the storage bucket. Check the [releases page](https://github.com/googleapis/genai-toolbox/releases) for OS and CPU architecture support:
`https://storage.googleapis.com/genai-toolbox/v0.21.0/<os>/<arch>/toolbox`
* Replace `<os>` with `linux`, `darwin` (macOS), or `windows`.
* Replace `<arch>` with `amd64` (Intel) or `arm64` (Apple Silicon).
<!-- {x-release-please-start-version} -->
```
curl -L -o toolbox https://storage.googleapis.com/genai-toolbox/v0.21.0/linux/amd64/toolbox
```
<!-- {x-release-please-end} -->
2. **Make it executable**:
```bash
chmod +x toolbox
```
3. **Move binary to `/usr/local/bin/` or `/usr/bin/`**:
```bash
sudo mv toolbox /usr/local/bin/
# sudo mv toolbox /usr/bin/
```
**On Windows, move binary to the `WindowsApps\` folder**:
```
move "C:\Users\<path-to-binary>\toolbox.exe" "C:\Users\<username>\AppData\Local\Microsoft\WindowsApps\"
```
**Tip:** Ensure the destination folder for your binary is included in
your system's PATH environment variable. To check `PATH`, use `echo
$PATH` (or `echo %PATH%` on Windows).
**Note:** You may need to restart Antigravity for changes to take effect.
* A Google Cloud project with the **Cloud SQL Admin API** enabled.
* Ensure [Application Default Credentials](https://cloud.google.com/docs/authentication/gcloud) are available in your environment.
* IAM Permissions:
* Cloud SQL Client (`roles/cloudsql.client`)
### Configuration
1. **Access the Store**: Open the MCP Store panel within the "..." dropdown at the top of the editor's side panel.
2. **Browse and Install**: Search for "Cloud SQL for SQL Server", and click "Install".
3. **Configuration**: The following configuration is needed for the server:
* Cloud SQL Project ID: The GCP project ID.
* Cloud SQL Region: The region of your Cloud SQL instance.
* Cloud SQL Instance ID: The ID of your Cloud SQL instance.
* Cloud SQL Database Name: The name of the database.
* Cloud SQL Database User: The database username.
* Cloud SQL Database Password: The password for the database user.
* Cloud SQL IP Type: (Optional) The IP type i.e. “Public” or “Private”. Defaults to "Public" if unspecified.
> [!NOTE]
> If your instance uses private IPs, you must run the MCP server in the same Virtual Private Cloud (VPC) network.
## Usage
Once configured, the MCP server will automatically provide Cloud SQL for SQL Server capabilities to your AI assistant. You can:
* "Select top 10 rows from the customers table."
* "List all tables in the database."
## Server Capabilities
The Cloud SQL for SQL Server MCP server provides the following tools:
| Tool Name | Description |
|:--------------|:-----------------------------------------------------------|
| `execute_sql` | Use this tool to execute SQL. |
| `list_tables` | Lists detailed schema information for user-created tables. |
## Documentation
For more information, visit the [Cloud SQL for SQL Server documentation](https://cloud.google.com/sql/docs/sqlserver).

View File

@@ -0,0 +1,83 @@
# Cloud SQL for MySQL Admin MCP Server
The Cloud SQL for MySQL Model Context Protocol (MCP) Server gives AI-powered development tools the ability to work with your Google Cloud SQL for MySQL databases. It supports connecting to instances, exploring schemas, and running queries.
## Features
An editor configured to use the Cloud SQL for MySQL MCP server can use its AI capabilities to help you:
- **Provision & Manage Infrastructure** - Create and manage Cloud SQL instances and users
## Installation and Setup
### Prerequisites
* Download and install [MCP Toolbox](https://github.com/googleapis/genai-toolbox):
1. **Download the Toolbox binary**:
Download the latest binary for your operating system and architecture from the storage bucket. Check the [releases page](https://github.com/googleapis/genai-toolbox/releases) for OS and CPU architecture support:
`https://storage.googleapis.com/genai-toolbox/v0.21.0/<os>/<arch>/toolbox`
* Replace `<os>` with `linux`, `darwin` (macOS), or `windows`.
* Replace `<arch>` with `amd64` (Intel) or `arm64` (Apple Silicon).
<!-- {x-release-please-start-version} -->
```
curl -L -o toolbox https://storage.googleapis.com/genai-toolbox/v0.21.0/linux/amd64/toolbox
```
<!-- {x-release-please-end} -->
2. **Make it executable**:
```bash
chmod +x toolbox
```
3. **Move binary to `/usr/local/bin/` or `/usr/bin/`**:
```bash
sudo mv toolbox /usr/local/bin/
# sudo mv toolbox /usr/bin/
```
**On Windows, move binary to the `WindowsApps\` folder**:
```
move "C:\Users\<path-to-binary>\toolbox.exe" "C:\Users\<username>\AppData\Local\Microsoft\WindowsApps\"
```
**Tip:** Ensure the destination folder for your binary is included in
your system's PATH environment variable. To check `PATH`, use `echo
$PATH` (or `echo %PATH%` on Windows).
**Note:** You may need to restart Antigravity for changes to take effect.
* A Google Cloud project with the **Cloud SQL Admin API** enabled.
* Ensure [Application Default Credentials](https://cloud.google.com/docs/authentication/gcloud) are available in your environment.
* IAM Permissions:
* Cloud SQL Viewer (`roles/cloudsql.viewer`)
* Cloud SQL Admin (`roles/cloudsql.admin`)
### Configuration
1. **Access the Store**: Open the MCP Store panel within the "..." dropdown at the top of the editor's side panel.
2. **Browse and Install**: Search for "Cloud SQL for MySQL Admin", and click "Install".
## Usage
Once configured, the MCP server will automatically provide Cloud SQL for MySQL capabilities to your AI assistant. You can:
* "Create a new Cloud SQL for MySQL instance named 'e-commerce-prod' in the 'my-gcp-project' project."
* "Create a new user named 'analyst' with read access to all tables."
## Server Capabilities
The Cloud SQL for MySQL MCP server provides the following tools:
| Tool Name | Description |
|:---------------------|:-------------------------------------------------------|
| `create_instance` | Create an instance (PRIMARY, READ-POOL, or SECONDARY). |
| `create_user` | Create BUILT-IN or IAM-based users for an instance. |
| `get_instance` | Get details about an instance. |
| `get_user` | Get details about a user in an instance. |
| `list_instances` | List instances in a given project and location. |
| `list_users` | List users in a given project and location. |
| `wait_for_operation` | Poll the operations API until the operation is done. |
## Documentation
For more information, visit the [Cloud SQL for MySQL documentation](https://cloud.google.com/sql/docs/mysql).

View File

@@ -0,0 +1,96 @@
# Cloud SQL for MySQL MCP Server
The Cloud SQL for MySQL Model Context Protocol (MCP) Server gives AI-powered development tools the ability to work with your Google Cloud SQL for MySQL databases. It supports connecting to instances, exploring schemas, and running queries.
## Features
An editor configured to use the Cloud SQL for MySQL MCP server can use its AI capabilities to help you:
- **Query Data** - Execute SQL queries and analyze query plans
- **Explore Schema** - List tables and view schema details
- **Database Maintenance** - Check for fragmentation and missing indexes
- **Monitor Performance** - View active queries
## Installation and Setup
### Prerequisites
* Download and install [MCP Toolbox](https://github.com/googleapis/genai-toolbox):
1. **Download the Toolbox binary**:
Download the latest binary for your operating system and architecture from the storage bucket. Check the [releases page](https://github.com/googleapis/genai-toolbox/releases) for OS and CPU architecture support:
`https://storage.googleapis.com/genai-toolbox/v0.21.0/<os>/<arch>/toolbox`
* Replace `<os>` with `linux`, `darwin` (macOS), or `windows`.
* Replace `<arch>` with `amd64` (Intel) or `arm64` (Apple Silicon).
<!-- {x-release-please-start-version} -->
```
curl -L -o toolbox https://storage.googleapis.com/genai-toolbox/v0.21.0/linux/amd64/toolbox
```
<!-- {x-release-please-end} -->
2. **Make it executable**:
```bash
chmod +x toolbox
```
3. **Move binary to `/usr/local/bin/` or `/usr/bin/`**:
```bash
sudo mv toolbox /usr/local/bin/
# sudo mv toolbox /usr/bin/
```
**On Windows, move binary to the `WindowsApps\` folder**:
```
move "C:\Users\<path-to-binary>\toolbox.exe" "C:\Users\<username>\AppData\Local\Microsoft\WindowsApps\"
```
**Tip:** Ensure the destination folder for your binary is included in
your system's PATH environment variable. To check `PATH`, use `echo
$PATH` (or `echo %PATH%` on Windows).
**Note:** You may need to restart Antigravity for changes to take effect.
* A Google Cloud project with the **Cloud SQL Admin API** enabled.
* Ensure [Application Default Credentials](https://cloud.google.com/docs/authentication/gcloud) are available in your environment.
* IAM Permissions:
* Cloud SQL Client (`roles/cloudsql.client`)
### Configuration
1. **Access the Store**: Open the MCP Store panel within the "..." dropdown at the top of the editor's side panel.
2. **Browse and Install**: Search for "Cloud SQL for MySQL", and click "Install".
3. **Configuration**: The following configuration is needed for the server:
* Cloud SQL Project ID: The GCP project ID.
* Cloud SQL Region: The region of your Cloud SQL instance.
* Cloud SQL Instance ID: The ID of your Cloud SQL instance.
* Cloud SQL Database Name: The name of the database.
* Cloud SQL Database User: The database username.
* Cloud SQL Database Password: The password for the database user.
* Cloud SQL IP Type: (Optional) The IP type i.e. “Public” or “Private”. Defaults to "Public" if unspecified.
> [!NOTE]
> If your instance uses private IPs, you must run the MCP server in the same Virtual Private Cloud (VPC) network.
## Usage
Once configured, the MCP server will automatically provide Cloud SQL for MySQL capabilities to your AI assistant. You can:
* "Show me the schema for the 'orders' table."
* "List the top 10 active queries."
* "Check for tables missing unique indexes."
## Server Capabilities
The Cloud SQL for MySQL MCP server provides the following tools:
| Tool Name | Description |
|:-------------------------------------|:------------------------------------------------------------------------|
| `execute_sql` | Use this tool to execute SQL. |
| `list_active_queries` | Lists top N ongoing queries from processlist and innodb_trx. |
| `get_query_plan` | Provide information about how MySQL executes a SQL statement (EXPLAIN). |
| `list_tables` | Lists detailed schema information for user-created tables. |
| `list_tables_missing_unique_indexes` | Find tables that do not have primary or unique key constraint. |
| `list_table_fragmentation` | List table fragmentation in MySQL. |
## Documentation
For more information, visit the [Cloud SQL for MySQL documentation](https://cloud.google.com/sql/docs/mysql).

View File

@@ -0,0 +1,83 @@
# Cloud SQL for PostgreSQL Admin MCP Server
The Cloud SQL for PostgreSQL Model Context Protocol (MCP) Server gives AI-powered development tools the ability to work with your Google Cloud SQL for PostgreSQL databases. It supports connecting to instances, exploring schemas, running queries, and analyzing performance.
## Features
An editor configured to use the Cloud SQL for PostgreSQL MCP server can use its AI capabilities to help you:
- **Provision & Manage Infrastructure** - Create and manage Cloud SQL instances and users
## Installation and Setup
### Prerequisites
* Download and install [MCP Toolbox](https://github.com/googleapis/genai-toolbox):
1. **Download the Toolbox binary**:
Download the latest binary for your operating system and architecture from the storage bucket. Check the [releases page](https://github.com/googleapis/genai-toolbox/releases) for OS and CPU architecture support:
`https://storage.googleapis.com/genai-toolbox/v0.21.0/<os>/<arch>/toolbox`
* Replace `<os>` with `linux`, `darwin` (macOS), or `windows`.
* Replace `<arch>` with `amd64` (Intel) or `arm64` (Apple Silicon).
<!-- {x-release-please-start-version} -->
```
curl -L -o toolbox https://storage.googleapis.com/genai-toolbox/v0.21.0/linux/amd64/toolbox
```
<!-- {x-release-please-end} -->
2. **Make it executable**:
```bash
chmod +x toolbox
```
3. **Move binary to `/usr/local/bin/` or `/usr/bin/`**:
```bash
sudo mv toolbox /usr/local/bin/
# sudo mv toolbox /usr/bin/
```
**On Windows, move binary to the `WindowsApps\` folder**:
```
move "C:\Users\<path-to-binary>\toolbox.exe" "C:\Users\<username>\AppData\Local\Microsoft\WindowsApps\"
```
**Tip:** Ensure the destination folder for your binary is included in
your system's PATH environment variable. To check `PATH`, use `echo
$PATH` (or `echo %PATH%` on Windows).
**Note:** You may need to restart Antigravity for changes to take effect.
* A Google Cloud project with the **Cloud SQL Admin API** enabled.
* Ensure [Application Default Credentials](https://cloud.google.com/docs/authentication/gcloud) are available in your environment.
* IAM Permissions:
* Cloud SQL Viewer (`roles/cloudsql.viewer`)
* Cloud SQL Admin (`roles/cloudsql.admin`)
### Configuration
1. **Access the Store**: Open the MCP Store panel within the "..." dropdown at the top of the editor's side panel.
2. **Browse and Install**: Search for "Cloud SQL for PostgreSQL Admin", and click "Install".
## Usage
Once configured, the MCP server will automatically provide Cloud SQL for PostgreSQL capabilities to your AI assistant. You can:
* "Create a new Cloud SQL for Postgres instance named 'e-commerce-prod' in the 'my-gcp-project' project."
* "Create a new user named 'analyst' with read access to all tables."
## Server Capabilities
The Cloud SQL for PostgreSQL MCP server provides the following tools:
| Tool Name | Description |
|:---------------------|:-------------------------------------------------------|
| `create_instance` | Create an instance (PRIMARY, READ-POOL, or SECONDARY). |
| `create_user` | Create BUILT-IN or IAM-based users for an instance. |
| `get_instance` | Get details about an instance. |
| `get_user` | Get details about a user in an instance. |
| `list_instances` | List instances in a given project and location. |
| `list_users` | List users in a given project and location. |
| `wait_for_operation` | Poll the operations API until the operation is done. |
## Documentation
For more information, visit the [Cloud SQL for PostgreSQL documentation](https://cloud.google.com/sql/docs/postgres).

108
docs/CLOUDSQLPG_README.md Normal file
View File

@@ -0,0 +1,108 @@
# Cloud SQL for PostgreSQL MCP Server
The Cloud SQL for PostgreSQL Model Context Protocol (MCP) Server gives AI-powered development tools the ability to work with your Google Cloud SQL for PostgreSQL databases. It supports connecting to instances, exploring schemas, running queries, and analyzing performance.
## Features
An editor configured to use the Cloud SQL for PostgreSQL MCP server can use its AI capabilities to help you:
- **Query Data** - Execute SQL queries and analyze query plans
- **Explore Schema** - List tables, views, indexes, and triggers
- **Monitor Performance** - View active queries, bloat, and memory configurations
- **Manage Extensions** - List available and installed extensions
## Installation and Setup
### Prerequisites
* Download and install [MCP Toolbox](https://github.com/googleapis/genai-toolbox):
1. **Download the Toolbox binary**:
Download the latest binary for your operating system and architecture from the storage bucket. Check the [releases page](https://github.com/googleapis/genai-toolbox/releases) for OS and CPU architecture support:
`https://storage.googleapis.com/genai-toolbox/v0.21.0/<os>/<arch>/toolbox`
* Replace `<os>` with `linux`, `darwin` (macOS), or `windows`.
* Replace `<arch>` with `amd64` (Intel) or `arm64` (Apple Silicon).
<!-- {x-release-please-start-version} -->
```
curl -L -o toolbox https://storage.googleapis.com/genai-toolbox/v0.21.0/linux/amd64/toolbox
```
<!-- {x-release-please-end} -->
2. **Make it executable**:
```bash
chmod +x toolbox
```
3. **Move binary to `/usr/local/bin/` or `/usr/bin/`**:
```bash
sudo mv toolbox /usr/local/bin/
# sudo mv toolbox /usr/bin/
```
**On Windows, move binary to the `WindowsApps\` folder**:
```
move "C:\Users\<path-to-binary>\toolbox.exe" "C:\Users\<username>\AppData\Local\Microsoft\WindowsApps\"
```
**Tip:** Ensure the destination folder for your binary is included in
your system's PATH environment variable. To check `PATH`, use `echo
$PATH` (or `echo %PATH%` on Windows).
**Note:** You may need to restart Antigravity for changes to take effect.
* A Google Cloud project with the **Cloud SQL Admin API** enabled.
* Ensure [Application Default Credentials](https://cloud.google.com/docs/authentication/gcloud) are available in your environment.
* IAM Permissions:
* Cloud SQL Client (`roles/cloudsql.client`)
### Configuration
1. **Access the Store**: Open the MCP Store panel within the "..." dropdown at the top of the editor's side panel.
2. **Browse and Install**: Search for "Cloud SQL for PostgreSQL", and click "Install".
3. **Configuration**: The following configuration is needed for the server:
* Cloud SQL Project ID: The GCP project ID.
* Cloud SQL Region: The region of your Cloud SQL instance.
* Cloud SQL Instance ID: The ID of your Cloud SQL instance.
* Cloud SQL Database Name: The name of the database.
* Cloud SQL Database User: (Optional) The database username. Defaults to IAM authentication if unspecified.
* Cloud SQL Database Password: (Optional) The password for the database user. Defaults to IAM authentication if unspecified.
* Cloud SQL IP Type: (Optional) The IP type i.e. “Public” or “Private”. Defaults to "Public" if unspecified.
> [!NOTE]
> If your instance uses private IPs, you must run the MCP server in the same Virtual Private Cloud (VPC) network.
## Usage
Once configured, the MCP server will automatically provide Cloud SQL for PostgreSQL capabilities to your AI assistant. You can:
* "Show me the top 5 bloated tables."
* "List all installed extensions."
* "Explain the query plan for SELECT * FROM users."
## Server Capabilities
The Cloud SQL for PostgreSQL MCP server provides the following tools:
| Tool Name | Description |
|:---------------------------------|:---------------------------------------------------------------|
| `execute_sql` | Use this tool to execute sql. |
| `list_tables` | Lists detailed schema information for user-created tables. |
| `list_active_queries` | List the top N currently running queries. |
| `list_available_extensions` | Discover all PostgreSQL extensions available for installation. |
| `list_installed_extensions` | List all installed PostgreSQL extensions. |
| `list_autovacuum_configurations` | List PostgreSQL autovacuum-related configurations. |
| `list_memory_configurations` | List PostgreSQL memory-related configurations. |
| `list_top_bloated_tables` | List the top tables by dead-tuple (approximate bloat signal). |
| `list_replication_slots` | List key details for all PostgreSQL replication slots. |
| `list_invalid_indexes` | Lists all invalid PostgreSQL indexes. |
| `get_query_plan` | Generate a PostgreSQL EXPLAIN plan in JSON format. |
| `list_views` | Lists views in the database. |
| `list_schemas` | Lists all schemas in the database. |
| `database_overview` | Fetches the current state of the PostgreSQL server. |
| `list_triggers` | Lists all non-internal triggers in a database. |
| `list_indexes` | Lists available user indexes in the database. |
| `list_sequences` | Lists sequences in the database. |
## Documentation
For more information, visit the [Cloud SQL for PostgreSQL documentation](https://cloud.google.com/sql/docs/postgres).

81
docs/DATAPLEX_README.md Normal file
View File

@@ -0,0 +1,81 @@
# Dataplex MCP Server
The Dataplex Model Context Protocol (MCP) Server gives AI-powered development tools the ability to work with your Google Cloud Dataplex Catalog. It supports searching and looking up entries and aspect types.
## Features
An editor configured to use the Dataplex MCP server can use its AI capabilities to help you:
- **Search Catalog** - Search for entries in Dataplex Catalog
- **Explore Metadata** - Lookup specific entries and search aspect types
## Installation and Setup
### Prerequisites
* Download and install [MCP Toolbox](https://github.com/googleapis/genai-toolbox):
1. **Download the Toolbox binary**:
Download the latest binary for your operating system and architecture from the storage bucket. Check the [releases page](https://github.com/googleapis/genai-toolbox/releases) for OS and CPU architecture support:
`https://storage.googleapis.com/genai-toolbox/v0.21.0/<os>/<arch>/toolbox`
* Replace `<os>` with `linux`, `darwin` (macOS), or `windows`.
* Replace `<arch>` with `amd64` (Intel) or `arm64` (Apple Silicon).
<!-- {x-release-please-start-version} -->
```
curl -L -o toolbox https://storage.googleapis.com/genai-toolbox/v0.21.0/linux/amd64/toolbox
```
<!-- {x-release-please-end} -->
2. **Make it executable**:
```bash
chmod +x toolbox
```
3. **Move binary to `/usr/local/bin/` or `/usr/bin/`**:
```bash
sudo mv toolbox /usr/local/bin/
# sudo mv toolbox /usr/bin/
```
**On Windows, move binary to the `WindowsApps\` folder**:
```
move "C:\Users\<path-to-binary>\toolbox.exe" "C:\Users\<username>\AppData\Local\Microsoft\WindowsApps\"
```
**Tip:** Ensure the destination folder for your binary is included in
your system's PATH environment variable. To check `PATH`, use `echo
$PATH` (or `echo %PATH%` on Windows).
**Note:** You may need to restart Antigravity for changes to take effect.
* A Google Cloud project with the **Dataplex API** enabled.
* Ensure [Application Default Credentials](https://cloud.google.com/docs/authentication/gcloud) are available in your environment.
* IAM Permissions:
* Dataplex Viewer (`roles/dataplex.viewer`) or equivalent permissions to read catalog entries.
### Configuration
1. **Access the Store**: Open the MCP Store panel within the "..." dropdown at the top of the editor's side panel.
2. **Browse and Install**: Search for "Dataplex", and click "Install".
3. **Configuration**: The following configuration is needed for the server:
* Dataplex Project ID: The GCP project ID.
## Usage
Once configured, the MCP server will automatically provide Dataplex capabilities to your AI assistant. You can:
* "Search for entries related to 'sales' in Dataplex."
* "Look up details for the entry 'projects/my-project/locations/us-central1/entryGroups/my-group/entries/my-entry'."
## Server Capabilities
The Dataplex MCP server provides the following tools:
| Tool Name | Description |
|:----------------------|:-------------------------------------------------|
| `search_entries` | Search for entries in Dataplex Catalog. |
| `lookup_entry` | Retrieve a specific entry from Dataplex Catalog. |
| `search_aspect_types` | Find aspect types relevant to the query. |
## Documentation
For more information, visit the [Dataplex documentation](https://cloud.google.com/dataplex/docs).

101
docs/LOOKER_README.md Normal file
View File

@@ -0,0 +1,101 @@
# Looker MCP Server
The Looker Model Context Protocol (MCP) Server gives AI-powered development tools the ability to work with your Looker instance. It supports exploring models, running queries, managing dashboards, and more.
## Features
An editor configured to use the Looker MCP server can use its AI capabilities to help you:
- **Explore Models** - Get models, explores, dimensions, measures, filters, and parameters
- **Run Queries** - Execute Looker queries, generate SQL, and create query URLs
- **Manage Dashboards** - Create, run, and modify dashboards
- **Manage Looks** - Search for and run saved looks
- **Health Checks** - Analyze instance health and performance
- **Developer Tools** - Manage project files and toggle dev mode
## Installation and Setup
### Prerequisites
* Download and install [MCP Toolbox](https://github.com/googleapis/genai-toolbox):
1. **Download the Toolbox binary**:
Download the latest binary for your operating system and architecture from the storage bucket. Check the [releases page](https://github.com/googleapis/genai-toolbox/releases) for OS and CPU architecture support:
`https://storage.googleapis.com/genai-toolbox/v0.21.0/<os>/<arch>/toolbox`
* Replace `<os>` with `linux`, `darwin` (macOS), or `windows`.
* Replace `<arch>` with `amd64` (Intel) or `arm64` (Apple Silicon).
<!-- {x-release-please-start-version} -->
```
curl -L -o toolbox https://storage.googleapis.com/genai-toolbox/v0.21.0/linux/amd64/toolbox
```
<!-- {x-release-please-end} -->
2. **Make it executable**:
```bash
chmod +x toolbox
```
3. **Move binary to `/usr/local/bin/` or `/usr/bin/`**:
```bash
sudo mv toolbox /usr/local/bin/
# sudo mv toolbox /usr/bin/
```
**On Windows, move binary to the `WindowsApps\` folder**:
```
move "C:\Users\<path-to-binary>\toolbox.exe" "C:\Users\<username>\AppData\Local\Microsoft\WindowsApps\"
```
**Tip:** Ensure the destination folder for your binary is included in
your system's PATH environment variable. To check `PATH`, use `echo
$PATH` (or `echo %PATH%` on Windows).
**Note:** You may need to restart Antigravity for changes to take effect.
* Access to a Looker instance.
* API Credentials (`Client ID` and `Client Secret`) or OAuth configuration.
### Configuration
1. **Access the Store**: Open the MCP Store panel within the "..." dropdown at the top of the editor's side panel.
2. **Browse and Install**: Search for "Looker", and click "Install".
3. **Configuration**: The following configuration is needed for the server:
* Looker Base URL: The URL of your Looker instance.
* Looker Client ID: The client ID for the Looker API.
* Looker Client Secret: The client secret for the Looker API.
* Looker Verify SSL: Whether to verify SSL certificates.
* Looker Use Client OAuth: Whether to use OAuth for authentication.
* Looker Show Hidden Models: Whether to show hidden models.
* Looker Show Hidden Explores: Whether to show hidden explores.
* Looker Show Hidden Fields: Whether to show hidden fields.
## Usage
Once configured, the MCP server will automatically provide Looker capabilities to your AI assistant. You can:
* "Find explores in the 'ecommerce' model."
* "Run a query to show total sales by month."
* "Create a new dashboard named 'Sales Overview'."
## Server Capabilities
The Looker MCP server provides a wide range of tools. Here are some of the key capabilities:
| Tool Name | Description |
|:------------------------|:----------------------------------------------------------|
| `get_models` | Retrieves the list of LookML models. |
| `get_explores` | Retrieves the list of explores defined in a LookML model. |
| `query` | Run a query against the LookML model. |
| `query_sql` | Generate the SQL that Looker would run. |
| `run_look` | Runs a saved look. |
| `run_dashboard` | Runs all tiles in a dashboard. |
| `make_dashboard` | Creates a new dashboard. |
| `add_dashboard_element` | Adds a tile to a dashboard. |
| `health_pulse` | Checks the status of the Looker instance. |
| `dev_mode` | Toggles development mode. |
| `get_projects` | Lists LookML projects. |
*(See the full list of tools in the extension)*
## Documentation
For more information, visit the [Looker documentation](https://cloud.google.com/looker/docs).

86
docs/SPANNER_README.md Normal file
View File

@@ -0,0 +1,86 @@
# Cloud Spanner MCP Server
The Cloud Spanner Model Context Protocol (MCP) Server gives AI-powered development tools the ability to work with your Google Cloud Spanner databases. It supports executing SQL queries and exploring schemas.
## Features
An editor configured to use the Cloud Spanner MCP server can use its AI capabilities to help you:
- **Query Data** - Execute DML and DQL SQL queries
- **Explore Schema** - List tables and view schema details
## Installation and Setup
### Prerequisites
* Download and install [MCP Toolbox](https://github.com/googleapis/genai-toolbox):
1. **Download the Toolbox binary**:
Download the latest binary for your operating system and architecture from the storage bucket. Check the [releases page](https://github.com/googleapis/genai-toolbox/releases) for OS and CPU architecture support:
`https://storage.googleapis.com/genai-toolbox/v0.21.0/<os>/<arch>/toolbox`
* Replace `<os>` with `linux`, `darwin` (macOS), or `windows`.
* Replace `<arch>` with `amd64` (Intel) or `arm64` (Apple Silicon).
<!-- {x-release-please-start-version} -->
```
curl -L -o toolbox https://storage.googleapis.com/genai-toolbox/v0.21.0/linux/amd64/toolbox
```
<!-- {x-release-please-end} -->
2. **Make it executable**:
```bash
chmod +x toolbox
```
3. **Move binary to `/usr/local/bin/` or `/usr/bin/`**:
```bash
sudo mv toolbox /usr/local/bin/
# sudo mv toolbox /usr/bin/
```
**On Windows, move binary to the `WindowsApps\` folder**:
```
move "C:\Users\<path-to-binary>\toolbox.exe" "C:\Users\<username>\AppData\Local\Microsoft\WindowsApps\"
```
**Tip:** Ensure the destination folder for your binary is included in
your system's PATH environment variable. To check `PATH`, use `echo
$PATH` (or `echo %PATH%` on Windows).
**Note:** You may need to restart Antigravity for changes to take effect.
* A Google Cloud project with the **Cloud Spanner API** enabled.
* Ensure [Application Default Credentials](https://cloud.google.com/docs/authentication/gcloud) are available in your environment.
* IAM Permissions:
* Cloud Spanner Database User (`roles/spanner.databaseUser`) (for data access)
* Cloud Spanner Viewer (`roles/spanner.viewer`) (for schema access)
### Configuration
1. **Access the Store**: Open the MCP Store panel within the "..." dropdown at the top of the editor's side panel.
2. **Browse and Install**: Search for "Spanner", and click "Install".
3. **Configuration**: The following configuration is needed for the server:
* Spanner Project ID: The GCP project ID.
* Spanner Instance ID: The Spanner instance ID.
* Spanner Database ID: The Spanner database ID.
* Spanner Dialect: (Optional) The database dialect, which can be "googlesql" or "postgresql". Defaults to "googlesql" if unspecified.
## Usage
Once configured, the MCP server will automatically provide Cloud Spanner capabilities to your AI assistant. You can:
* "Execute a DML query to update customer names."
* "List all tables in the `my-database`."
* "Execute a DQL query to select data from `orders` table."
## Server Capabilities
The Cloud Spanner MCP server provides the following tools:
| Tool Name | Description |
|:------------------|:-----------------------------------------------------------|
| `execute_sql` | Use this tool to execute DML SQL. |
| `execute_sql_dql` | Use this tool to execute DQL SQL. |
| `list_tables` | Lists detailed schema information for user-created tables. |
## Documentation
For more information, visit the [Cloud Spanner documentation](https://cloud.google.com/spanner/docs).

61
docs/TOOLBOX_README.md Normal file
View File

@@ -0,0 +1,61 @@
# MCP Toolbox for Databases Server
The MCP Toolbox for Databases Server gives AI-powered development tools the ability to work with your custom tools. It is designed to simplify and secure the development of tools for interacting with databases.
## Installation and Setup
### Prerequisites
* Download and install [MCP Toolbox](https://github.com/googleapis/genai-toolbox):
1. **Download the Toolbox binary**:
Download the latest binary for your operating system and architecture from the storage bucket. Check the [releases page](https://github.com/googleapis/genai-toolbox/releases) for OS and CPU architecture support:
`https://storage.googleapis.com/genai-toolbox/v0.21.0/<os>/<arch>/toolbox`
* Replace `<os>` with `linux`, `darwin` (macOS), or `windows`.
* Replace `<arch>` with `amd64` (Intel) or `arm64` (Apple Silicon).
<!-- {x-release-please-start-version} -->
```
curl -L -o toolbox https://storage.googleapis.com/genai-toolbox/v0.21.0/linux/amd64/toolbox
```
<!-- {x-release-please-end} -->
2. **Make it executable**:
```bash
chmod +x toolbox
```
3. **Move binary to `/usr/local/bin/` or `/usr/bin/`**:
```bash
sudo mv toolbox /usr/local/bin/
# sudo mv toolbox /usr/bin/
```
**On Windows, move binary to the `WindowsApps\` folder**:
```
move "C:\Users\<path-to-binary>\toolbox.exe" "C:\Users\<username>\AppData\Local\Microsoft\WindowsApps\"
```
**Tip:** Ensure the destination folder for your binary is included in
your system's PATH environment variable. To check `PATH`, use `echo
$PATH` (or `echo %PATH%` on Windows).
**Note:** You may need to restart Antigravity for changes to take effect.
* Any required APIs and permissions for connecting to your database.
### Configuration
1. **Access the Store**: Open the MCP Store panel within the "..." dropdown at the top of the editor's side panel.
2. **Browse and Install**: Search for "MCP Toolbox for Databases", and click "Install".
3. **Configuration**: The following configuration is needed for the server:
* Add your [`tools.yaml` configuration
file](https://googleapis.github.io/genai-toolbox/getting-started/configure/)
to the directory you are running Antigravity
## Usage
Interact with your custom tools using natural language.
## Documentation
For more information, visit the [MCP Toolbox for Databases documentation](https://googleapis.github.io/genai-toolbox/getting-started/introduction/).

View File

@@ -119,9 +119,9 @@ chmod +x toolbox
To install Toolbox as a binary on Windows (AMD64):
```powershell
# see releases page for other versions
$VERSION = "0.21.0"
Invoke-WebRequest -Uri "https://storage.googleapis.com/genai-toolbox/v$VERSION/windows/amd64/toolbox.exe" -OutFile "toolbox.exe"
:: see releases page for other versions
set VERSION=0.21.0
curl -o toolbox.exe "https://storage.googleapis.com/genai-toolbox/v%VERSION%/windows/amd64/toolbox.exe"
```
{{% /tab %}}

View File

@@ -13,7 +13,7 @@ description: >
This guide assumes you have already done the following:
1. Installed [Python 3.9+][install-python] (including [pip][install-pip] and
1. Installed [Python 3.10+][install-python] (including [pip][install-pip] and
your preferred virtual environment tool for managing dependencies e.g.
[venv][install-venv]).
1. Installed [PostgreSQL 16+ and the `psql` client][install-postgres].

View File

@@ -1,3 +1,3 @@
google-adk==1.18.0
toolbox-core==0.5.2
google-adk==1.19.0
toolbox-core==0.5.3
pytest==9.0.1

View File

@@ -1,3 +1,3 @@
google-genai==1.47.0
toolbox-core==0.5.2
google-genai==1.52.0
toolbox-core==0.5.3
pytest==9.0.1

View File

@@ -1,5 +1,5 @@
langchain==0.3.27
langchain-google-vertexai==2.1.2
langgraph==1.0.1
toolbox-langchain==0.5.2
langchain==1.0.8
langchain-google-vertexai==3.0.3
langgraph==1.0.3
toolbox-langchain==0.5.3
pytest==9.0.1

View File

@@ -1,4 +1,4 @@
llama-index==0.14.6
llama-index==0.14.8
llama-index-llms-google-genai==0.7.3
toolbox-llamaindex==0.5.2
toolbox-llamaindex==0.5.3
pytest==9.0.1

View File

@@ -92,16 +92,17 @@ instead of hardcoding your secrets into the configuration file.
## Reference
| **field** | **type** | **required** | **description** |
| -------------------- | :------: | :----------: | ----------------------------------------------------------------------------------------- |
|----------------------|:--------:|:------------:|-------------------------------------------------------------------------------------------|
| kind | string | true | Must be "looker". |
| base_url | string | true | The URL of your Looker server with no trailing /). |
| base_url | string | true | The URL of your Looker server with no trailing /. |
| client_id | string | false | The client id assigned by Looker. |
| client_secret | string | false | The client secret assigned by Looker. |
| verify_ssl | string | false | Whether to check the ssl certificate of the server. |
| project | string | false | The project id to use in Google Cloud. |
| location | string | false | The location to use in Google Cloud. (default: us) |
| timeout | string | false | Maximum time to wait for query execution (e.g. "30s", "2m"). By default, 120s is applied. |
| use_client_oauth | string | false | Use OAuth tokens instead of client_id and client_secret. (default: false) |
| use_client_oauth | string | false | Use OAuth tokens instead of client_id and client_secret. (default: false) If a header |
| | | | name is provided, it will be used instead of "Authorization". |
| show_hidden_models | string | false | Show or hide hidden models. (default: true) |
| show_hidden_explores | string | false | Show or hide hidden explores. (default: true) |
| show_hidden_fields | string | false | Show or hide hidden fields. (default: true) |
| show_hidden_fields | string | false | Show or hide hidden fields. (default: true) |

View File

@@ -0,0 +1,40 @@
---
title: postgres-upgrade-precheck
type: docs
weight: 11
description: Perform a pre-check for a Cloud SQL for PostgreSQL major version upgrade.
---
The `postgres-upgrade-precheck` tool initiates a pre-check on a Cloud SQL for PostgreSQL
instance to assess its readiness for a major version upgrade using the Cloud SQL Admin API.
It helps identify potential incompatibilities or issues before starting the actual upgrade process.
{{< notice info >}}
This tool uses a `source` of kind `cloud-sql-admin`.
{{< /notice >}}
## Tool Inputs
### Example
```yaml
tools:
postgres-upgrade-precheck:
kind: postgres-upgrade-precheck
source: cloud-sql-admin-source
description: "Checks if a Cloud SQL PostgreSQL instance is ready for a major version upgrade to the specified target version."
```
### Reference
| **field** | **type** | **required** | **description** |
| ------------ | :------: | :----------: | --------------------------------------------------------- |
| kind | string | true | Must be "postgres-upgrade-precheck". |
| source | string | true | The name of the `cloud-sql-admin` source to use. |
| description | string | false | A description of the tool. |
| **parameter** | **type** | **required** | **description** |
| ----------------------- | :------: | :----------: | ------------------------------------------------------------------------------- |
| project | string | true | The project ID containing the instance. |
| instance | string | true | The name of the Cloud SQL instance to check. |
| targetDatabaseVersion | string | false | The target PostgreSQL major version for the upgrade (e.g., `POSTGRES_18`). If not specified, defaults to the PostgreSQL 18. |

View File

@@ -14,7 +14,7 @@ Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.
This guide assumes you have already done the following:
1. Installed [Python 3.9+][install-python] (including [pip][install-pip] and
1. Installed [Python 3.10+][install-python] (including [pip][install-pip] and
your preferred virtual environment tool for managing dependencies e.g.
[venv][install-venv]).
1. Installed and configured the [Google Cloud SDK (gcloud CLI)][install-gcloud].

5
go.mod
View File

@@ -2,7 +2,7 @@ module github.com/googleapis/genai-toolbox
go 1.24.7
toolchain go1.25.2
toolchain go1.25.3
require (
cloud.google.com/go/alloydbconn v1.15.5
@@ -18,6 +18,7 @@ require (
github.com/ClickHouse/clickhouse-go/v2 v2.40.3
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.53.0
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.29.0
github.com/apache/cassandra-gocql-driver/v2 v2.0.0
github.com/cenkalti/backoff/v5 v5.0.3
github.com/couchbase/gocb/v2 v2.11.1
github.com/couchbase/tools-common/http v1.0.9
@@ -31,7 +32,6 @@ require (
github.com/go-playground/validator/v10 v10.28.0
github.com/go-sql-driver/mysql v1.9.3
github.com/goccy/go-yaml v1.18.0
github.com/gocql/gocql v1.7.0
github.com/google/go-cmp v0.7.0
github.com/google/uuid v1.6.0
github.com/jackc/pgx/v5 v5.7.6
@@ -122,7 +122,6 @@ require (
github.com/gorilla/websocket v1.5.3 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2 // indirect
github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect

14
go.sum
View File

@@ -701,6 +701,8 @@ github.com/apache/arrow/go/v10 v10.0.1/go.mod h1:YvhnlEePVnBS4+0z3fhPfUy7W1Ikj0I
github.com/apache/arrow/go/v11 v11.0.0/go.mod h1:Eg5OsL5H+e299f7u5ssuXsuHQVEGC4xei5aX110hRiI=
github.com/apache/arrow/go/v15 v15.0.2 h1:60IliRbiyTWCWjERBCkO1W4Qun9svcYoZrSLcyOsMLE=
github.com/apache/arrow/go/v15 v15.0.2/go.mod h1:DGXsR3ajT524njufqf95822i+KTh+yea1jass9YXgjA=
github.com/apache/cassandra-gocql-driver/v2 v2.0.0 h1:Omnzb1Z/P90Dr2TbVNu54ICQL7TKVIIsJO231w484HU=
github.com/apache/cassandra-gocql-driver/v2 v2.0.0/go.mod h1:QH/asJjB3mHvY6Dot6ZKMMpTcOrWJ8i9GhsvG1g0PK4=
github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU=
github.com/aws/aws-sdk-go v1.55.8 h1:JRmEUbU52aJQZ2AjX4q4Wu7t4uZjOu71uyNmaWlUkJQ=
github.com/aws/aws-sdk-go v1.55.8/go.mod h1:ZkViS9AqA6otK+JBBNH2++sx1sgxrPKcSzPPvQkUtXk=
@@ -741,10 +743,6 @@ github.com/aws/aws-sdk-go-v2/service/sts v1.38.4/go.mod h1:Z+Gd23v97pX9zK97+tX4p
github.com/aws/smithy-go v1.23.0 h1:8n6I3gXzWJB2DxBDnfxgBaSX6oe0d/t10qGz7OKqMCE=
github.com/aws/smithy-go v1.23.0/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI=
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932 h1:mXoPYz/Ul5HYEDvkta6I8/rnYM5gSdSV2tJ6XbZuEtY=
github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932/go.mod h1:NOuUCSz6Q9T7+igc/hlvDOUdtWKryOrtFyIVABv/p7k=
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY=
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4=
github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs=
@@ -909,8 +907,6 @@ github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4=
github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
github.com/goccy/go-yaml v1.18.0 h1:8W7wMFS12Pcas7KU+VVkaiCng+kG8QiFeFwzFb+rwuw=
github.com/goccy/go-yaml v1.18.0/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA=
github.com/gocql/gocql v1.7.0 h1:O+7U7/1gSN7QTEAaMEsJc1Oq2QHXvCWoF3DFK9HDHus=
github.com/gocql/gocql v1.7.0/go.mod h1:vnlvXyFZeLBF0Wy+RS8hrOdbn0UWsWtdg07XJnFxZ+4=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/golang-jwt/jwt/v5 v5.3.0 h1:pv4AsKCKKZuqlgs5sUmn4x8UlGa0kEVt/puTpKx9vvo=
github.com/golang-jwt/jwt/v5 v5.3.0/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE=
@@ -1058,8 +1054,6 @@ github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4Zs
github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2 h1:8Tjv8EJ+pM1xP8mK6egEbD1OgnVTyacbefKhmbLhIhU=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2/go.mod h1:pkJQ2tZHJ0aFOVEEot6oZmaVEZcRme73eIFmhiVuRWs=
github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed h1:5upAirOpQc1Q53c0bnx2ufif5kANL7bfZWcc6VJWJd8=
github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4=
github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8=
github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
@@ -1143,6 +1137,8 @@ github.com/looker-open-source/sdk-codegen/go v0.25.18/go.mod h1:Br1ntSiruDJ/4nYN
github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA=
github.com/lyft/protoc-gen-star v0.6.1/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA=
github.com/lyft/protoc-gen-star/v2 v2.0.1/go.mod h1:RcCdONR2ScXaYnQC5tUzxzlpA3WVYF7/opLeUgcQs/o=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
@@ -1223,6 +1219,8 @@ github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTE
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
github.com/rs/zerolog v1.34.0 h1:k43nTLIwcTVQAncfCw4KZ2VY6ukYoZaBPNOE8txlOeY=
github.com/rs/zerolog v1.34.0/go.mod h1:bJsvje4Z08ROH4Nhs5iH600c3IkWhwp44iRc54W6wYQ=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w=
github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk=

View File

@@ -39,6 +39,9 @@ tools:
wait_for_operation:
kind: cloud-sql-wait-for-operation
source: cloud-sql-admin-source
postgres_upgrade_precheck:
kind: postgres-upgrade-precheck
source: cloud-sql-admin-source
toolsets:
cloud_sql_postgres_admin_tools:
@@ -49,3 +52,4 @@ toolsets:
- list_databases
- create_user
- wait_for_operation
- postgres_upgrade_precheck

View File

@@ -118,6 +118,10 @@ func (t MockTool) McpManifest() tools.McpManifest {
return mcpManifest
}
func (t MockTool) GetAuthTokenHeaderName() string {
return "Authorization"
}
// MockPrompt is used to mock prompts in tests
type MockPrompt struct {
Name string

View File

@@ -99,7 +99,7 @@ func toolsCallHandler(ctx context.Context, id jsonrpc.RequestId, toolsMap map[st
}
// Get access token
accessToken := tools.AccessToken(header.Get("Authorization"))
accessToken := tools.AccessToken(header.Get(tool.GetAuthTokenHeaderName()))
// Check if this specific tool requires the standard authorization header
if tool.RequiresClientAuthorization() {

View File

@@ -99,7 +99,7 @@ func toolsCallHandler(ctx context.Context, id jsonrpc.RequestId, toolsMap map[st
}
// Get access token
accessToken := tools.AccessToken(header.Get("Authorization"))
accessToken := tools.AccessToken(header.Get(tool.GetAuthTokenHeaderName()))
// Check if this specific tool requires the standard authorization header
if tool.RequiresClientAuthorization() {

View File

@@ -99,7 +99,7 @@ func toolsCallHandler(ctx context.Context, id jsonrpc.RequestId, toolsMap map[st
}
// Get access token
accessToken := tools.AccessToken(header.Get("Authorization"))
accessToken := tools.AccessToken(header.Get(tool.GetAuthTokenHeaderName()))
// Check if this specific tool requires the standard authorization header
if tool.RequiresClientAuthorization() {

View File

@@ -18,8 +18,8 @@ import (
"context"
"fmt"
gocql "github.com/apache/cassandra-gocql-driver/v2"
"github.com/goccy/go-yaml"
"github.com/gocql/gocql"
"github.com/googleapis/genai-toolbox/internal/sources"
"go.opentelemetry.io/otel/trace"
)

View File

@@ -16,6 +16,7 @@ package looker
import (
"context"
"fmt"
"strings"
"time"
geminidataanalytics "cloud.google.com/go/geminidataanalytics/apiv1beta"
@@ -46,7 +47,7 @@ func newConfig(ctx context.Context, name string, decoder *yaml.Decoder) (sources
Name: name,
SslVerification: true,
Timeout: "600s",
UseClientOAuth: false,
UseClientOAuth: "false",
ShowHiddenModels: true,
ShowHiddenExplores: true,
ShowHiddenFields: true,
@@ -66,7 +67,7 @@ type Config struct {
ClientId string `yaml:"client_id"`
ClientSecret string `yaml:"client_secret"`
SslVerification bool `yaml:"verify_ssl"`
UseClientOAuth bool `yaml:"use_client_oauth"`
UseClientOAuth string `yaml:"use_client_oauth"`
Timeout string `yaml:"timeout"`
ShowHiddenModels bool `yaml:"show_hidden_models"`
ShowHiddenExplores bool `yaml:"show_hidden_explores"`
@@ -114,12 +115,13 @@ func (r Config) Initialize(ctx context.Context, tracer trace.Tracer) (sources.So
tokenSource, _ = initGoogleCloudConnection(ctx)
s := &Source{
Config: r,
ApiSettings: &cfg,
TokenSource: tokenSource,
Config: r,
ApiSettings: &cfg,
TokenSource: tokenSource,
AuthTokenHeaderName: "Authorization",
}
if !r.UseClientOAuth {
if strings.ToLower(r.UseClientOAuth) == "false" {
if r.ClientId == "" || r.ClientSecret == "" {
return nil, fmt.Errorf("client_id and client_secret need to be specified")
}
@@ -129,6 +131,11 @@ func (r Config) Initialize(ctx context.Context, tracer trace.Tracer) (sources.So
return nil, fmt.Errorf("incorrect settings: %w", err)
}
logger.DebugContext(ctx, fmt.Sprintf("logged in as %s %s", *resp.FirstName, *resp.LastName))
} else {
if strings.ToLower(r.UseClientOAuth) != "true" {
s.AuthTokenHeaderName = r.UseClientOAuth
}
logger.DebugContext(ctx, fmt.Sprintf("Using AuthTokenHeaderName: %s", s.AuthTokenHeaderName))
}
return s, nil
@@ -139,9 +146,10 @@ var _ sources.Source = &Source{}
type Source struct {
Config
Client *v4.LookerSDK
ApiSettings *rtl.ApiSettings
TokenSource oauth2.TokenSource
Client *v4.LookerSDK
ApiSettings *rtl.ApiSettings
TokenSource oauth2.TokenSource
AuthTokenHeaderName string
}
func (s *Source) SourceKind() string {
@@ -157,7 +165,11 @@ func (s *Source) GetApiSettings() *rtl.ApiSettings {
}
func (s *Source) UseClientAuthorization() bool {
return s.UseClientOAuth
return strings.ToLower(s.UseClientOAuth) != "false"
}
func (s *Source) GetAuthTokenHeaderName() string {
return s.AuthTokenHeaderName
}
func (s *Source) GoogleCloudProject() string {

View File

@@ -50,7 +50,7 @@ func TestParseFromYamlLooker(t *testing.T) {
ClientSecret: "sdakl;jgflkasdfkfg",
Timeout: "600s",
SslVerification: true,
UseClientOAuth: false,
UseClientOAuth: "false",
ShowHiddenModels: true,
ShowHiddenExplores: true,
ShowHiddenFields: true,

View File

@@ -201,3 +201,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return t.Source.UseClientAuthorization()
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -211,3 +211,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return t.Source.UseClientAuthorization()
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -212,3 +212,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return t.Source.UseClientAuthorization()
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -170,3 +170,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return t.Source.UseClientAuthorization()
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -175,3 +175,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return t.Source.UseClientAuthorization()
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -175,3 +175,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return t.Source.UseClientAuthorization()
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -165,3 +165,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return t.Source.UseClientAuthorization()
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -170,3 +170,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return t.Source.UseClientAuthorization()
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -170,3 +170,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return t.Source.UseClientAuthorization()
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -366,3 +366,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return t.Source.UseClientAuthorization()
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -206,3 +206,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return false
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -388,3 +388,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return t.UseClientOAuth
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -579,3 +579,7 @@ func appendMessage(messages []map[string]any, newMessage map[string]any) []map[s
}
return append(messages, newMessage)
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -377,3 +377,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return t.UseClientOAuth
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -352,3 +352,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return t.UseClientOAuth
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -196,3 +196,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return t.UseClientOAuth
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -206,3 +206,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return t.UseClientOAuth
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -200,3 +200,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return t.UseClientOAuth
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -211,3 +211,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return t.UseClientOAuth
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -287,3 +287,7 @@ func (t Tool) McpManifest() tools.McpManifest {
// Returns the tool MCP manifest
return t.mcpManifest
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -314,3 +314,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return t.UseClientOAuth
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -227,3 +227,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return false
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -18,8 +18,8 @@ import (
"context"
"fmt"
gocql "github.com/apache/cassandra-gocql-driver/v2"
yaml "github.com/goccy/go-yaml"
"github.com/gocql/gocql"
"github.com/googleapis/genai-toolbox/internal/sources"
"github.com/googleapis/genai-toolbox/internal/sources/cassandra"
"github.com/googleapis/genai-toolbox/internal/tools"
@@ -135,7 +135,7 @@ func (t Tool) Invoke(ctx context.Context, params parameters.ParamValues, accessT
return nil, fmt.Errorf("unable to extract standard params %w", err)
}
sliceParams := newParams.AsSlice()
iter := t.Session.Query(newStatement, sliceParams...).WithContext(ctx).Iter()
iter := t.Session.Query(newStatement, sliceParams...).IterContext(ctx)
// Create a slice to store the out
var out []map[string]interface{}
@@ -171,3 +171,7 @@ func (t Tool) ParseParams(data map[string]any, claims map[string]map[string]any)
}
var _ tools.Tool = Tool{}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -186,3 +186,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return false
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -149,3 +149,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return false
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -160,3 +160,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return false
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -194,3 +194,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return false
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -204,3 +204,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return t.UseClientOAuth
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -228,3 +228,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return t.UseClientOAuth
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -301,3 +301,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return t.UseClientOAuth
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -164,3 +164,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return t.UseClientOAuth
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -175,3 +175,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return t.UseClientOAuth
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -175,3 +175,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return t.UseClientOAuth
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -207,3 +207,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return t.UseClientOAuth
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -175,3 +175,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return t.UseClientOAuth
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -175,3 +175,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return t.UseClientOAuth
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -183,3 +183,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return t.UseClientOAuth
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -183,3 +183,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return t.UseClientOAuth
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -217,3 +217,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return t.UseClientOAuth
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -247,3 +247,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return t.UseClientOAuth
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -230,3 +230,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return t.UseClientOAuth
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -214,3 +214,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return t.UseClientOAuth
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -178,3 +178,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return false
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -172,3 +172,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return t.Source.UseClientAuthorization()
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -185,3 +185,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return t.Source.UseClientAuthorization()
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -161,3 +161,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return t.Source.UseClientAuthorization()
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -179,3 +179,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return t.Source.UseClientAuthorization()
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -172,3 +172,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return t.source.UseClientAuthorization()
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -407,3 +407,7 @@ func (t Tool) fetchInstanceData(ctx context.Context, project, instance string) (
}
return data, nil
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -203,3 +203,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return t.Source.UseClientAuthorization()
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -203,3 +203,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return t.Source.UseClientAuthorization()
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -203,3 +203,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return t.Source.UseClientAuthorization()
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -0,0 +1,243 @@
// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package cloudsqlpgupgradeprecheck
import (
"context"
"fmt"
"time"
yaml "github.com/goccy/go-yaml"
"github.com/googleapis/genai-toolbox/internal/sources"
"github.com/googleapis/genai-toolbox/internal/sources/cloudsqladmin"
"github.com/googleapis/genai-toolbox/internal/tools"
"github.com/googleapis/genai-toolbox/internal/util/parameters"
sqladmin "google.golang.org/api/sqladmin/v1"
)
const kind string = "postgres-upgrade-precheck"
func init() {
if !tools.Register(kind, newConfig) {
panic(fmt.Sprintf("tool kind %q already registered", kind))
}
}
func newConfig(ctx context.Context, name string, decoder *yaml.Decoder) (tools.ToolConfig, error) {
actual := Config{Name: name}
if err := decoder.DecodeContext(ctx, &actual); err != nil {
return nil, err
}
return actual, nil
}
// Config defines the configuration for the precheck-upgrade tool.
type Config struct {
Name string `yaml:"name" validate:"required"`
Kind string `yaml:"kind" validate:"required"`
Description string `yaml:"description"`
Source string `yaml:"source" validate:"required"`
AuthRequired []string `yaml:"authRequired"`
}
// validate interface
var _ tools.ToolConfig = Config{}
// ToolConfigKind returns the kind of the tool.
func (cfg Config) ToolConfigKind() string {
return kind
}
// Initialize initializes the tool from the configuration.
func (cfg Config) Initialize(srcs map[string]sources.Source) (tools.Tool, error) {
rawS, ok := srcs[cfg.Source]
if !ok {
return nil, fmt.Errorf("no source named %q configured", cfg.Source)
}
s, ok := rawS.(*cloudsqladmin.Source)
if !ok {
return nil, fmt.Errorf("invalid source for %q tool: source kind must be `cloud-sql-admin`", kind)
}
allParameters := parameters.Parameters{
parameters.NewStringParameter("project", "The project ID"),
parameters.NewStringParameter("instance", "The name of the instance to check"),
parameters.NewStringParameterWithDefault("targetDatabaseVersion", "POSTGRES_18", "The target PostgreSQL version for the upgrade (e.g., POSTGRES_18). If not specified, defaults to the PostgreSQL 18."),
}
paramManifest := allParameters.Manifest()
description := cfg.Description
if description == "" {
description = "Analyzes a Cloud SQL PostgreSQL instance for major version upgrade readiness. Results are provided to guide customer actions:\n" +
"ERROR: Action Required. These are critical issues blocking the upgrade. Customers must resolve these using the provided actions_required steps before attempting the upgrade.\n" +
"WARNING: Review Recommended. These are potential issues. Customers should review the message and actions_required. While not blocking, addressing these is advised to prevent future problems or unexpected behavior post-upgrade.\n" +
"INFO: No Action Needed. Informational messages only. This pre-check helps customers proactively fix problems, preventing upgrade failures and ensuring a smoother transition."
}
mcpManifest := tools.GetMcpManifest(cfg.Name, description, cfg.AuthRequired, allParameters)
return Tool{
Name: cfg.Name,
Kind: kind,
AuthRequired: cfg.AuthRequired,
Source: s,
AllParams: allParameters,
manifest: tools.Manifest{Description: description, Parameters: paramManifest, AuthRequired: cfg.AuthRequired},
mcpManifest: mcpManifest,
}, nil
}
// Tool represents the precheck-upgrade tool.
type Tool struct {
Name string `yaml:"name"`
Kind string `yaml:"kind"`
Description string `yaml:"description"`
AuthRequired []string `yaml:"authRequired"`
Source *cloudsqladmin.Source
AllParams parameters.Parameters `yaml:"allParams"`
manifest tools.Manifest
mcpManifest tools.McpManifest
Config
}
// PreCheckResultItem holds the details of a single check result.
type PreCheckResultItem struct {
Message string `json:"message"`
MessageType string `json:"messageType"` // INFO, WARNING, ERROR
ActionsRequired []string `json:"actionsRequired"`
}
// PreCheckAPIResponse holds the array of pre-check results.
type PreCheckAPIResponse struct {
Items []PreCheckResultItem `json:"preCheckResponse"`
}
// Helper function to convert from []*sqladmin.PreCheckResponse to []PreCheckResultItem
func convertResults(items []*sqladmin.PreCheckResponse) []PreCheckResultItem {
if len(items) == 0 { // Handle nil or empty slice
return []PreCheckResultItem{}
}
results := make([]PreCheckResultItem, len(items))
for i, item := range items {
results[i] = PreCheckResultItem{
Message: item.Message,
MessageType: item.MessageType,
ActionsRequired: item.ActionsRequired,
}
}
return results
}
func (t Tool) ToConfig() tools.ToolConfig {
return t.Config
}
// Invoke executes the tool's logic.
func (t Tool) Invoke(ctx context.Context, params parameters.ParamValues, accessToken tools.AccessToken) (any, error) {
paramsMap := params.AsMap()
project, ok := paramsMap["project"].(string)
if !ok || project == "" {
return nil, fmt.Errorf("missing or empty 'project' parameter")
}
instanceName, ok := paramsMap["instance"].(string)
if !ok || instanceName == "" {
return nil, fmt.Errorf("missing or empty 'instance' parameter")
}
targetVersion, ok := paramsMap["targetDatabaseVersion"].(string)
if !ok || targetVersion == "" {
// This should not happen due to the default value
return nil, fmt.Errorf("missing or empty 'targetDatabaseVersion' parameter")
}
service, err := t.Source.GetService(ctx, string(accessToken))
if err != nil {
return nil, fmt.Errorf("failed to get HTTP client from source: %w", err)
}
reqBody := &sqladmin.InstancesPreCheckMajorVersionUpgradeRequest{
PreCheckMajorVersionUpgradeContext: &sqladmin.PreCheckMajorVersionUpgradeContext{
TargetDatabaseVersion: targetVersion,
},
}
call := service.Instances.PreCheckMajorVersionUpgrade(project, instanceName, reqBody).Context(ctx)
op, err := call.Do()
if err != nil {
return nil, fmt.Errorf("failed to start pre-check operation: %w", err)
}
const pollTimeout = 20 * time.Second
cutoffTime := time.Now().Add(pollTimeout)
for time.Now().Before(cutoffTime) {
currentOp, err := service.Operations.Get(project, op.Name).Context(ctx).Do()
if err != nil {
return nil, fmt.Errorf("failed to get operation status: %w", err)
}
if currentOp.Status == "DONE" {
if currentOp.Error != nil && len(currentOp.Error.Errors) > 0 {
errMsg := fmt.Sprintf("pre-check operation LRO failed: %s", currentOp.Error.Errors[0].Message)
if currentOp.Error.Errors[0].Code != "" {
errMsg = fmt.Sprintf("%s (Code: %s)", errMsg, currentOp.Error.Errors[0].Code)
}
return nil, fmt.Errorf("%s", errMsg)
}
var preCheckItems []*sqladmin.PreCheckResponse
if currentOp.PreCheckMajorVersionUpgradeContext != nil {
preCheckItems = currentOp.PreCheckMajorVersionUpgradeContext.PreCheckResponse
}
// convertResults handles nil or empty preCheckItems
return PreCheckAPIResponse{Items: convertResults(preCheckItems)}, nil
}
select {
case <-ctx.Done():
return nil, ctx.Err()
case <-time.After(5 * time.Second):
}
}
return op, nil
}
// ParseParams parses the parameters for the tool.
func (t Tool) ParseParams(data map[string]any, claims map[string]map[string]any) (parameters.ParamValues, error) {
return parameters.ParseParams(t.AllParams, data, claims)
}
// Manifest returns the tool's manifest.
func (t Tool) Manifest() tools.Manifest {
return t.manifest
}
// McpManifest returns the tool's MCP manifest.
func (t Tool) McpManifest() tools.McpManifest {
return t.mcpManifest
}
// Authorized checks if the tool is authorized.
func (t Tool) Authorized(verifiedAuthServices []string) bool {
return true
}
func (t Tool) RequiresClientAuthorization() bool {
return t.Source.UseClientAuthorization()
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -0,0 +1,93 @@
// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package cloudsqlpgupgradeprecheck_test
import (
"testing"
yaml "github.com/goccy/go-yaml"
"github.com/google/go-cmp/cmp"
"github.com/googleapis/genai-toolbox/internal/server"
"github.com/googleapis/genai-toolbox/internal/testutils"
"github.com/googleapis/genai-toolbox/internal/tools/cloudsqlpg/cloudsqlpgupgradeprecheck"
)
func TestParseFromYaml(t *testing.T) {
ctx, err := testutils.ContextWithNewLogger()
if err != nil {
t.Fatalf("unexpected error: %s", err)
}
tcs := []struct {
desc string
in string
want server.ToolConfigs
}{
{
desc: "basic precheck example",
in: `
tools:
precheck-upgrade-tool:
kind: postgres-upgrade-precheck
description: a precheck test description
source: some-admin-source
authRequired:
- https://www.googleapis.com/auth/cloud-platform
`,
want: server.ToolConfigs{
"precheck-upgrade-tool": cloudsqlpgupgradeprecheck.Config{
Name: "precheck-upgrade-tool",
Kind: "postgres-upgrade-precheck",
Description: "a precheck test description",
Source: "some-admin-source",
AuthRequired: []string{"https://www.googleapis.com/auth/cloud-platform"},
},
},
},
{
desc: "precheck example with no auth",
in: `
tools:
precheck-upgrade-tool-no-auth:
kind: postgres-upgrade-precheck
description: a precheck test description no auth
source: other-admin-source
`,
want: server.ToolConfigs{
"precheck-upgrade-tool-no-auth": cloudsqlpgupgradeprecheck.Config{
Name: "precheck-upgrade-tool-no-auth",
Kind: "postgres-upgrade-precheck",
Description: "a precheck test description no auth",
Source: "other-admin-source",
AuthRequired: []string{},
},
},
},
}
for _, tc := range tcs {
t.Run(tc.desc, func(t *testing.T) {
got := struct {
Tools server.ToolConfigs `yaml:"tools"`
}{}
// Parse contents
err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got)
if err != nil {
t.Fatalf("unable to unmarshal: %s", err)
}
if diff := cmp.Diff(tc.want, got.Tools); diff != "" {
t.Fatalf("incorrect parse: diff (-want +got):\n%s", diff)
}
})
}
}

View File

@@ -169,3 +169,7 @@ func (t Tool) Authorized(verifiedAuthSources []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return false
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -121,3 +121,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return false
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -182,3 +182,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return false
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -195,3 +195,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return false
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

View File

@@ -166,3 +166,7 @@ func (t Tool) Authorized(verifiedAuthServices []string) bool {
func (t Tool) RequiresClientAuthorization() bool {
return false
}
func (t Tool) GetAuthTokenHeaderName() string {
return "Authorization"
}

Some files were not shown because too many files have changed in this diff Show More