Prerna Kakkar
e2ec345e4a
Merge branch 'main' into envvariable
2025-07-16 11:50:21 +00:00
prernakakkar-google
ed5ef4caea
feat: Create wait for tool ( #885 )
...
`
tools:
wait_for_tool:
kind: wait-for
description: "Tool puts chat to sleep for given timeout example 3m,10s,
5m etc. For tasks such as cluster creation no need to wait. It takes
longer time such as 8m for instance creation. Use timeout value as
default if nothing is provided"
timeout: 10s
`
Output:
`
prernakakkar@prernakakkar:~/senseai/genai-toolbox$ curl -X POST -H
"Content-Type: application/json" -d '{"duration": "5m"}'
http://127.0.0.1:5000/api/tool/wa
it_for_tool/invoke
{"result":"[\"Wait for 5m0s completed successfully.\"]"}
`
2025-07-16 17:18:24 +05:30
Prerna Kakkar
6f569bc950
[feat]: Create tool to update mcp settings file for data plane with relevant env variables for alloydb
2025-07-16 07:54:42 +00:00
release-please[bot]
2b69700c5e
chore(main): release 0.9.0 ( #789 )
...
🤖 I have created a release *beep* *boop*
---
##
[0.9.0](https://github.com/googleapis/genai-toolbox/compare/v0.8.0...v0.9.0 )
(2025-07-11)
### Features
* Dynamic reloading for toolbox config
([#800 ](https://github.com/googleapis/genai-toolbox/issues/800 ))
([4c240ac ](4c240ac3c9 ))
* **sources/mysql:** Add queryTimeout support to MySQL source
([#830 ](https://github.com/googleapis/genai-toolbox/issues/830 ))
([391cb5b ](391cb5bfe8 ))
* **tools/bigquery:** Add optional projectID parameter to bigquery tools
([#799 ](https://github.com/googleapis/genai-toolbox/issues/799 ))
([c6ab74c ](c6ab74c5da ))
### Bug Fixes
* Cleanup unassigned err log
([#857 ](https://github.com/googleapis/genai-toolbox/issues/857 ))
([c081ace ](c081ace46b ))
* Fix docs preview deployment pipeline
([#787 ](https://github.com/googleapis/genai-toolbox/issues/787 ))
([0a93b04 ](0a93b0482c ))
* **tools:** Nil parameter error when arrays are used
([#801 ](https://github.com/googleapis/genai-toolbox/issues/801 ))
([2bdcc08 ](2bdcc0841a ))
* Trigger reload on additional fsnotify operations
([#854 ](https://github.com/googleapis/genai-toolbox/issues/854 ))
([aa8dbec ](aa8dbec970 ))
---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please ). See
[documentation](https://github.com/googleapis/release-please#release-please ).
---------
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com >
2025-07-10 17:46:05 -07:00
AlexTalreja
c081ace46b
fix: cleanup unassigned err log ( #857 )
...
Ref: #843
Addressed one of the bug fixes needed to merge before release.
2025-07-11 00:28:35 +00:00
AlexTalreja
aa8dbec970
fix: trigger reload on additional fsnotify operations ( #854 )
...
Allow fsnotify `CREATE` and `RENAME` events to trigger dynamic reload,
instead of requiring `WRITE`.
This is due to some cases with specific editors/OS, (ex: vim on Mac),
where file writes can potentially occur without ever triggering a
`WRITE` operation on the watched tools file, but solely through creation
and renaming of .swp files.
2025-07-10 16:39:26 -07:00
AlexTalreja
4c240ac3c9
feat: dynamic reloading for toolbox config ( #800 )
...
Allow Toolbox server to automatically update when users modify their
tool configuration file(s), instead of requiring a restart.
This feature is automatically enabled, but can be turned off with the
flag `--disable-reload`.
2025-07-08 17:28:12 -07:00
release-please[bot]
f13e9635ba
chore(main): release 0.8.0 ( #689 )
...
🤖 I have created a release *beep* *boop*
---
##
[0.8.0](https://github.com/googleapis/genai-toolbox/compare/v0.7.0...v0.8.0 )
(2025-07-02)
### ⚠ BREAKING CHANGES
* **postgres,mssql,cloudsqlmssql:** encode source connection url for
sources ([#727 ](https://github.com/googleapis/genai-toolbox/issues/727 ))
### Features
* Add support for multiple YAML configuration files
([#760 ](https://github.com/googleapis/genai-toolbox/issues/760 ))
([40679d7 ](40679d700e ))
* Add support for optional parameters
([#617 ](https://github.com/googleapis/genai-toolbox/issues/617 ))
([4827771 ](4827771b78 )),
closes [#475 ](https://github.com/googleapis/genai-toolbox/issues/475 )
* **mcp:** Support MCP version 2025-03-26
([#755 ](https://github.com/googleapis/genai-toolbox/issues/755 ))
([474df57 ](474df57d62 ))
* **sources/http:** Support disable SSL verification for HTTP Source
([#674 ](https://github.com/googleapis/genai-toolbox/issues/674 ))
([4055b0c ](4055b0c356 ))
* **tools/bigquery:** Add templateParameters field for bigquery
([#699 ](https://github.com/googleapis/genai-toolbox/issues/699 ))
([f5f771b ](f5f771b0f3 ))
* **tools/bigtable:** Add templateParameters field for bigtable
([#692 ](https://github.com/googleapis/genai-toolbox/issues/692 ))
([1c06771 ](1c067715fa ))
* **tools/couchbase:** Add templateParameters field for couchbase
([#723 ](https://github.com/googleapis/genai-toolbox/issues/723 ))
([9197186 ](9197186b8b ))
* **tools/http:** Add support for HTTP Tool pathParams
([#726 ](https://github.com/googleapis/genai-toolbox/issues/726 ))
([fd300dc ](fd300dc606 ))
* **tools/redis:** Add Redis Source and Tool
([#519 ](https://github.com/googleapis/genai-toolbox/issues/519 ))
([f0aef29 ](f0aef29b0c ))
* **tools/spanner:** Add templateParameters field for spanner
([#691 ](https://github.com/googleapis/genai-toolbox/issues/691 ))
([075dfa4 ](075dfa47e1 ))
* **tools/sqlitesql:** Add templateParameters field for sqlitesql
([#687 ](https://github.com/googleapis/genai-toolbox/issues/687 ))
([75e254c ](75e254c0a4 ))
* **tools/valkey:** Add Valkey Source and Tool
([#532 ](https://github.com/googleapis/genai-toolbox/issues/532 ))
([054ec19 ](054ec198b9 ))
### Bug Fixes
* **bigquery,mssql:** Fix panic on tools with array param
([#722 ](https://github.com/googleapis/genai-toolbox/issues/722 ))
([7a6644c ](7a6644cf0c ))
* **postgres,mssql,cloudsqlmssql:** Encode source connection url for
sources ([#727 ](https://github.com/googleapis/genai-toolbox/issues/727 ))
([67964d9 ](67964d939f )),
closes [#717 ](https://github.com/googleapis/genai-toolbox/issues/717 )
* Set default value to field's type during unmarshalling
([#774 ](https://github.com/googleapis/genai-toolbox/issues/774 ))
([fafed24 ](fafed24858 )),
closes [#771 ](https://github.com/googleapis/genai-toolbox/issues/771 )
* **server/mcp:** Do not listen from port for stdio
([#719 ](https://github.com/googleapis/genai-toolbox/issues/719 ))
([d51dbc7 ](d51dbc759b )),
closes [#711 ](https://github.com/googleapis/genai-toolbox/issues/711 )
* **tools/mysqlexecutesql:** Handle nil panic and connection leak in
Invoke ([#757 ](https://github.com/googleapis/genai-toolbox/issues/757 ))
([7badba4 ](7badba42ee ))
* **tools/mysqlsql:** Handle nil panic and connection leak in invoke
([#758 ](https://github.com/googleapis/genai-toolbox/issues/758 ))
([cbb4a33 ](cbb4a33351 ))
---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please ). See
[documentation](https://github.com/googleapis/release-please#release-please ).
---------
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Yuan <45984206+Yuan325@users.noreply.github.com >
2025-07-02 09:30:33 -06:00
Mohd Mujtaba
40679d700e
feat: add support for multiple YAML configuration files ( #760 )
...
# Add Multiple YAML Configuration File Support
## 🎯 Overview
This PR introduces support for loading and merging multiple YAML
configuration files in Toolbox, addressing the need for modular
configuration management in complex deployments.
## ✨ New Features
### 1. Multiple Files Support (`--tools-files`)
- **Usage**: `--tools-files=file1.yaml,file2.yaml,file3.yaml`
- Load and intelligently merge multiple YAML configuration files
- Comma-separated file paths for maximum flexibility
### 2. Directory Support (`--tools-folder`)
- **Usage**: `--tools-folder=config-directory`
- Automatically discover and load all `.yaml` and `.yml` files from a
directory
- Simplifies configuration management for organized deployments
### 3. Smart Merging Logic
- **Sources/AuthServices/Tools**: Later files override earlier files
with same names
- **Toolsets**: Tools from same-named toolsets are combined without
duplicates
- Preserves all existing functionality while enabling composition
## 🔒 Safety & Validation
- **Mutual Exclusivity**: Prevents simultaneous use of `--tools-file`,
`--tools-files`, `--tools-folder`, and `--prebuilt`
- **Clear Error Messages**: Descriptive validation errors guide users to
correct usage
- **Comprehensive Error Handling**: Proper handling of missing files,
directories, and parsing errors
- **Full Backward Compatibility**: Existing configurations continue to
work unchanged
## 🏗️ Implementation Details
### Core Functions Added
- `mergeToolsFiles()` - Smart merging with configurable override rules
- `loadAndMergeToolsFiles()` - Multi-file loading and processing
- `loadAndMergeToolsFolder()` - Directory scanning and batch loading
### Command Structure Updates
- New `tools_files []string` field for multiple file paths
- New `tools_folder string` field for directory path
- Enhanced validation logic in `run()` function
- Updated flag definitions with proper descriptions
## 📋 Use Cases
### Organizational Benefits
- **Modular Configuration**: Separate database, API, and auth
configurations
- **Team Collaboration**: Multiple developers can work on different
config files
- **Environment Management**: Easy configuration swapping for different
environments
- **Scalability**: Large configurations can be broken into manageable
chunks
### Example Usage Patterns
```bash
# Multiple specific files
./toolbox --tools-files=database.yaml,apis.yaml,auth.yaml
# Directory-based loading
./toolbox --tools-folder=./production-configs
# Error case (properly handled)
./toolbox --tools-file=single.yaml --tools-folder=configs
# ERROR: --tools-file, --tools-files, and --tools-folder flags cannot be used simultaneously
---------
Co-authored-by: Wenxin Du <117315983+duwenxin99@users.noreply.github.com >
2025-06-30 14:00:49 -04:00
Wenxin Du
a1b60100c2
chore: Group tools by type ( #743 )
...
Group tools of the same type into the same folder so that they are more
discoverable and our tools are more organized as the number grows.
2025-06-30 11:37:48 -04:00
Yuan
d51dbc759b
fix: do not listen from port for stdio ( #719 )
...
Fix #711
2025-06-17 11:35:04 -07:00
Yuan
65dba4cabc
chore: update to get version from ServerConfig ( #718 )
2025-06-16 11:26:51 -07:00
Wenxin Du
054ec198b9
feat: Add Valkey Source and Tool ( #532 )
2025-06-11 23:17:32 -04:00
Wenxin Du
f0aef29b0c
feat: Add Redis Source and Tool ( #519 )
...
1. Added Redis Source and Tool
2. Moved some integration test helpers from tools.go to common.go
3. Make auth integration test want an input variable
2025-06-11 22:47:27 -04:00
Yuan
075dfa47e1
feat(tools/spanner): add templateParameters field for spanner ( #691 )
...
Add `templateParameters` to support non-filter parameters and DDL
statements.
Added a new argument `ignoreDdl` at integration test. Admin client is
needed to execute ddl statement in spanner. Toolbox does not use admin
client.
Part of #535
2025-06-11 23:54:13 +00:00
release-please[bot]
714d990c34
chore(main): release 0.7.0 ( #640 )
...
🤖 I have created a release *beep* *boop*
---
##
[0.7.0](https://github.com/googleapis/genai-toolbox/compare/v0.6.0...v0.7.0 )
(2025-06-10)
### Features
* Add templateParameters field for mssqlsql
([#671 ](https://github.com/googleapis/genai-toolbox/issues/671 ))
([b81fc6a ](b81fc6aa6c ))
* Add templateParameters field for mysqlsql
([#663 ](https://github.com/googleapis/genai-toolbox/issues/663 ))
([0a08d2c ](0a08d2c15d ))
* **metrics:** Add user agent for prebuilt tools
([#669 ](https://github.com/googleapis/genai-toolbox/issues/669 ))
([29aa0a7 ](29aa0a70da ))
* **tools/postgressql:** Add templateParameters field
([#615 ](https://github.com/googleapis/genai-toolbox/issues/615 ))
([b763469 ](b76346993f ))
### Bug Fixes
* Improve versionString
([#658 ](https://github.com/googleapis/genai-toolbox/issues/658 ))
([cf96f4c ](cf96f4c249 ))
* **server/stdio:** Notifications should not return a response
([#638 ](https://github.com/googleapis/genai-toolbox/issues/638 ))
([69d047a ](69d047af46 ))
* **tools/mysqlsql:** Handled the null value for string case in mysqlsql
tools ([#641 ](https://github.com/googleapis/genai-toolbox/issues/641 ))
([ef94648 ](ef94648455 ))
* Update path library
([#678 ](https://github.com/googleapis/genai-toolbox/issues/678 ))
([4998f82 ](4998f82852 )),
closes [#662 ](https://github.com/googleapis/genai-toolbox/issues/662 )
---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please ). See
[documentation](https://github.com/googleapis/release-please#release-please ).
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
2025-06-09 17:15:26 -07:00
Kurtis Van Gent
cf96f4c249
fix: improve versionString ( #658 )
...
Reduces complexity of the version string calculation and fixes the ci/cd
pipeline to pass the correct parameters.
---------
Co-authored-by: Averi Kitsch <akitsch@google.com >
Co-authored-by: Yuan <45984206+Yuan325@users.noreply.github.com >
2025-06-09 15:31:42 -07:00
Averi Kitsch
29aa0a70da
feat(metrics): add user agent for prebuilt tools ( #669 )
...
Append "+prebuilt.<source>" to the user agent for tracking the prebuilt
tools usage. This is set before the server is initialized and the user
agent is set on the client.
Using the period to stay consistent with our other appended metadata
like "binary.linux"
2025-06-06 09:49:25 -07:00
Kurtis Van Gent
1c9ad5ea24
refactor: implement dynamic source registration ( #614 )
...
This commit refactors the source configuration and loading mechanism to
use a dynamic registration pattern. Each source package now registers
itself with a central registry via its init() function.
The server configuration code uses this registry to decode and
initialize sources, decoupling it from specific source implementations
and simplifying the addition of new sources.
Key changes:
- Introduced `sources.Register()` and `newConfig()` constructor in each
source package.
- Moved source package imports to `cmd/root.go` as blank imports to
trigger `init()` functions for self-registration.
- Removed direct imports of specific source packages from
`internal/server/config.go`.
- Renamed `SourceKind` constants to `Kind` within each source package.
- Updated tests to use the new `Kind` constants and reflect registration
changes.
---------
Co-authored-by: Yuan Teoh <yuanteoh@google.com >
2025-06-04 14:23:57 -07:00
Kurtis Van Gent
b4862825e8
refactor: implement dynamic tool registration ( #613 )
...
This PR refactors the tool configuration and loading mechanism to use a
dynamic registration pattern. Each tool package now registers itself
with a central registry, and the server configuration code uses this
registry to decode and initialize tools.
Key changes:
- Introduced tools.Register and tools.DecodeToolConfig for dynamic tool
handling.
- Removed direct imports of specific tool packages from
internal/server/config.go.
- Updated individual tool packages to include init() functions for
self-registration.
- Modified ToolKind constants to be local kind constants within each
tool package.
- Adjusted test files to reflect the changes in tool kind identifiers.
This change simplifies adding new tools and decouples the server
configuration from specific tool implementations.
---------
Co-authored-by: Yuan Teoh <yuanteoh@google.com >
Co-authored-by: Yuan <45984206+Yuan325@users.noreply.github.com >
2025-06-04 10:19:42 -07:00
Yuan
ba8a6f3a3b
chore: migrate golangci-lint to v2 ( #630 )
...
gosimple had been deprecated in favor of staticcheck:
https://github.com/golangci/golangci-lint/issues/357
Other requirements are all migrated.
`std-error-handling` exclusions is included because without that, it
will ask to check all error returns from (`Close()`, or `os.Setenv`s, or
`fmt.Fprint`s...
2025-05-31 02:50:17 +00:00
release-please[bot]
3180830403
chore(main): release 0.6.0 ( #545 )
...
🤖 I have created a release *beep* *boop*
---
##
[0.6.0](https://github.com/googleapis/genai-toolbox/compare/v0.5.0...v0.6.0 )
(2025-05-28)
### Features
* Add Execute sql tool for SQL Server(MSSQL)
([#585 ](https://github.com/googleapis/genai-toolbox/issues/585 ))
([6083a22 ](6083a224aa ))
* Add mysql-execute-sql tool
([#577 ](https://github.com/googleapis/genai-toolbox/issues/577 ))
([8590061 ](8590061ae4 ))
* Add new BigQuery tools: execute_sql, list_datatset_ids,
list_table_ids, get_dataset_info, get_table_info
([0fd88b5 ](0fd88b574b ))
* Add spanner-execute-sql tool
([#576 ](https://github.com/googleapis/genai-toolbox/issues/576 ))
([d65747a ](d65747a2dc ))
* Add support for read-only in Spanner tool
([#563 ](https://github.com/googleapis/genai-toolbox/issues/563 ))
([6512704 ](6512704e77 ))
* Adding support for the --prebuilt flag
([#604 ](https://github.com/googleapis/genai-toolbox/issues/604 ))
([a29c800 ](a29c80012e ))
* Support MCP stdio transport protocol
([#607 ](https://github.com/googleapis/genai-toolbox/issues/607 ))
([1702ce1 ](1702ce1e00 ))
### Bug Fixes
* Explicitly set query location for BigQuery queries
([#586 ](https://github.com/googleapis/genai-toolbox/issues/586 ))
([eb52b66 ](eb52b66d82 ))
* Fix spellings in comments
([#561 ](https://github.com/googleapis/genai-toolbox/issues/561 ))
([b58bf76 ](b58bf76dda ))
* Prevent tool calls through MCP when auth is required
([#544 ](https://github.com/googleapis/genai-toolbox/issues/544 ))
([e747b6e ](e747b6e289 ))
* Reinitialize required slice if nil
([#571 ](https://github.com/googleapis/genai-toolbox/issues/571 ))
([04dcf47 ](04dcf47912 )),
closes [#564 ](https://github.com/googleapis/genai-toolbox/issues/564 )
---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please ). See
[documentation](https://github.com/googleapis/release-please#release-please ).
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
2025-05-28 15:08:44 -07:00
dishaprakash
a29c80012e
feat: Adding support for the --prebuilt flag ( #604 )
...
Introduces a new --prebuilt <source_type> flag. This flag is mutually
exclusive with the existing --tools-file flag.
Added a new directory cmd/prebuiltconfigs/ to store the prebuilt
tools.yaml files (e.g., alloydb.yaml, postgres.yaml, etc.).
These YAML files are embedded into the Go binary using the //go:embed
directive.
---------
Co-authored-by: Averi Kitsch <akitsch@google.com >
2025-05-28 14:56:42 -07:00
Yuan
1702ce1e00
feat: support MCP stdio transport protocol ( #607 )
...
Support MCP
[stdio](https://modelcontextprotocol.io/specification/2024-11-05/basic/transports#stdio )
transport protocol!
To run stdio with Toolbox, user have to use the `--stdio` flag.
Example of running MCP Toolbox with MCP Inspector via stdio transport
protocol: `npx @modelcontextprotocol/inspector ./toolbox --stdio`.
---------
Co-authored-by: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com >
Co-authored-by: Averi Kitsch <akitsch@google.com >
2025-05-28 10:10:34 -07:00
release-please[bot]
9a5d76e2dc
chore(main): release 0.5.0 ( #484 )
...
🤖 I have created a release *beep* *boop*
---
##
[0.5.0](https://github.com/googleapis/genai-toolbox/compare/v0.4.0...v0.5.0 )
(2025-05-06)
### Features
* Add Couchbase as Source and Tool
([#307 ](https://github.com/googleapis/genai-toolbox/issues/307 ))
([d7390b0 ](d7390b06b7 ))
* Add postgres-execute-sql tool
([#490 ](https://github.com/googleapis/genai-toolbox/issues/490 ))
([11ea7bc ](11ea7bc584 ))
### Bug Fixes
* **deps:** Update module cloud.google.com/go/cloudsqlconn to v1.17.0
([#500 ](https://github.com/googleapis/genai-toolbox/issues/500 ))
([ad040cf ](ad040cfb8b ))
* **deps:** Update module cloud.google.com/go/spanner to v1.80.0
([#481 ](https://github.com/googleapis/genai-toolbox/issues/481 ))
([1e1348f ](1e1348f5f0 ))
* **deps:** Update module google.golang.org/api to v0.231.0
([#505 ](https://github.com/googleapis/genai-toolbox/issues/505 ))
([50ec7f4 ](50ec7f4a06 ))
---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please ). See
[documentation](https://github.com/googleapis/release-please#release-please ).
---------
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Yuan <45984206+Yuan325@users.noreply.github.com >
Co-authored-by: Yuan Teoh <yuanteoh@google.com >
2025-05-06 16:32:01 -06:00
release-please[bot]
4ed16ccd18
chore(main): release 0.4.0 ( #411 )
...
🤖 I have created a release *beep* *boop*
---
##
[0.4.0](https://github.com/googleapis/genai-toolbox/compare/v0.3.0...v0.4.0 )
(2025-04-23)
### Features
* Add `AuthRequired` to Neo4j & Dgraph Tools
([#434 ](https://github.com/googleapis/genai-toolbox/issues/434 ))
([afbf4b2 ](afbf4b2dae ))
* Add `AuthRequired` to tool manifest
([#433 ](https://github.com/googleapis/genai-toolbox/issues/433 ))
([d9388ad ](d9388ad57e ))
* Add BigQuery source and tool
([#463 ](https://github.com/googleapis/genai-toolbox/issues/463 ))
([8055aa5 ](8055aa519f ))
* Add Bigtable source and tool
([#418 ](https://github.com/googleapis/genai-toolbox/issues/418 ))
([ae53b8e ](ae53b8eeff ))
* Add IAM AuthN to AlloyDB Source
([#399 ](https://github.com/googleapis/genai-toolbox/issues/399 ))
([e8ed447 ](e8ed447d91 ))
* Add IAM AuthN to Cloud SQL Sources
([#414 ](https://github.com/googleapis/genai-toolbox/issues/414 ))
([be85b82 ](be85b82078 ))
* Add toolset feature to mcp
([#425 ](https://github.com/googleapis/genai-toolbox/issues/425 ))
([e307857 ](e307857085 )),
closes [#403 ](https://github.com/googleapis/genai-toolbox/issues/403 )
* Add SQLite source and tool
([#438 ](https://github.com/googleapis/genai-toolbox/issues/438 ))
([fc14cbf ](fc14cbfd07 ))
* Support env replacement for tools.yaml
([#462 ](https://github.com/googleapis/genai-toolbox/issues/462 ))
([eadb678 ](eadb678a7b ))
### Bug Fixes
* [#419 ](https://github.com/googleapis/genai-toolbox/issues/419 ) TLS
https URL for SSE endpoint
([#420 ](https://github.com/googleapis/genai-toolbox/issues/420 ))
([0a7d3ff ](0a7d3ff06b ))
* **docs:** Fix link 'Edit this page'
([#454 ](https://github.com/googleapis/genai-toolbox/issues/454 ))
([969065e ](969065e561 )),
closes [#427 ](https://github.com/googleapis/genai-toolbox/issues/427 )
* Update http error code from invocation
([#468 ](https://github.com/googleapis/genai-toolbox/issues/468 ))
([ff7c0ff ](ff7c0ffc65 )),
closes [#465 ](https://github.com/googleapis/genai-toolbox/issues/465 )
---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please ). See
[documentation](https://github.com/googleapis/release-please#release-please ).
---------
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Wenxin Du <117315983+duwenxin99@users.noreply.github.com >
Co-authored-by: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com >
2025-04-23 13:22:25 -04:00
Wenxin Du
d9388ad57e
feat: Add AuthRequired to Tool Manifest ( #433 )
...
Add `AuthRequired` to Tool Manifest so SDK could throw an error early
for unauthorized Tool invocations.
SDK changes:
https://github.com/googleapis/mcp-toolbox-sdk-python/pull/72/files
Also added `authRequired` to Neo4j and dgraph tools.
2025-04-23 12:52:04 -04:00
Wenxin Du
eadb678a7b
feat: Support env replacement for tool.yaml ( #462 )
...
Environment variable replacement is needed so that users don't have to
hardcode their secrets in configuring `tools.yaml`.
Both formats `$ENV_NAME` and `${ENV_NAME}` are standard ways to declare
an environment variable.
However, some database statement placeholders that are already using the
`$ENV_NAME` format.
Therefore, we only support env var declaration using `${ENV_NAME}` to
disambiguate it from other usages.
Fixes issue: https://github.com/googleapis/genai-toolbox/issues/431
2025-04-23 07:33:02 -04:00
Yuan
dced46ad88
chore: cleanup go context ( #457 )
2025-04-21 20:16:05 +00:00
release-please[bot]
12222fe27a
chore(main): release 0.3.0 ( #382 )
...
🤖 I have created a release *beep* *boop*
---
##
[0.3.0](https://github.com/googleapis/genai-toolbox/compare/v0.2.1...v0.3.0 )
(2025-04-04)
### Features
* Add 'alloydb-ai-nl' tool
([#358 ](https://github.com/googleapis/genai-toolbox/issues/358 ))
([f02885f ](f02885fd4a ))
* Add HTTP Source and Tool
([#332 ](https://github.com/googleapis/genai-toolbox/issues/332 ))
([64da5b4 ](64da5b4efe ))
* Adding support for Model Context Protocol (MCP).
([#396 ](https://github.com/googleapis/genai-toolbox/issues/396 ))
([a7d1d4e ](a7d1d4eb2a ))
* Added [toolbox-core](https://pypi.org/project/toolbox-core/ ) SDK –
easily integrate Toolbox into any Python function calling framework
### Bug Fixes
* Add `tools-file` flag and deprecate `tools_file`
([#384 ](https://github.com/googleapis/genai-toolbox/issues/384 ))
([34a7263 ](34a7263fdc )),
closes [#383 ](https://github.com/googleapis/genai-toolbox/issues/383 )
---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please ). See
[documentation](https://github.com/googleapis/release-please#release-please ).
---------
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com >
2025-04-04 11:51:23 -07:00
Yuan
34a7263fdc
fix: add tools-file flag and deprecate tools_file ( #384 )
...
Add `tools-file` flag and deprecate `tools_file` flag. This is not a
breaking change. The old `tools_file` flag is still usable.
User will see the following message when using `tools_file` flag:
```
Flag --tools_file has been deprecated, please use --tools-file instead
2025-04-03T10:09:12.803165-07:00 INFO "Initialized 2 sources."
```
Help command will reveal the new flag:
```
...
--telemetry-service-name string Sets the value of the service.name resource attribute for telemetry data. (default "toolbox")
--tools-file string File path specifying the tool configuration. (default "tools.yaml")
-v, --version version for toolbox
...
```
Fixes #383
2025-04-03 11:09:31 -07:00
release-please[bot]
58c1203f77
chore(main): release 0.2.1 ( #324 )
...
🤖 I have created a release *beep* *boop*
---
##
[0.2.1](https://github.com/googleapis/genai-toolbox/compare/v0.2.0...v0.2.1 )
(2025-03-20)
### Bug Fixes
* Fix variable name in quickstart
([#336 ](https://github.com/googleapis/genai-toolbox/issues/336 ))
([5400127 ](5400127887 ))
* **source/alloydb:** Correct user agents not being sent
([#323 ](https://github.com/googleapis/genai-toolbox/issues/323 ))
([ce12a34 ](ce12a344ed ))
---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please ). See
[documentation](https://github.com/googleapis/release-please#release-please ).
---------
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Yuan <45984206+Yuan325@users.noreply.github.com >
2025-03-20 14:43:12 -07:00
release-please[bot]
0872f1ceab
chore(main): release 0.2.0 ( #294 )
...
🤖 I have created a release *beep* *boop*
---
##
[0.2.0](https://github.com/googleapis/genai-toolbox/compare/v0.1.0...v0.2.0 )
(2025-03-03)
### ⚠ BREAKING CHANGES
* Rename "AuthSource" in favor of "AuthService"
([#297 ](https://github.com/googleapis/genai-toolbox/issues/297 ))
### Features
* Rename "AuthSource" in favor of "AuthService"
([#297 ](https://github.com/googleapis/genai-toolbox/issues/297 ))
([04cb5fb ](04cb5fbc3e ))
### Bug Fixes
* Add items to parameter manifest
([#293 ](https://github.com/googleapis/genai-toolbox/issues/293 ))
([541612d ](541612d72d ))
* **source/cloud-sql:** Correct user agents not being sent
([#306 ](https://github.com/googleapis/genai-toolbox/issues/306 ))
([584c8ae ](584c8aea43 ))
* Throw error when items field is missing from array parameter
([#296 ](https://github.com/googleapis/genai-toolbox/issues/296 ))
([9193836 ](9193836eff ))
* Validate required common fields for parameters
([#298 ](https://github.com/googleapis/genai-toolbox/issues/298 ))
([e494d11 ](e494d11e6e ))
### Miscellaneous Chores
* Release 0.2.0
([#314 ](https://github.com/googleapis/genai-toolbox/issues/314 ))
([d7ccf73 ](d7ccf730e7 ))
---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please ). See
[documentation](https://github.com/googleapis/release-please#release-please ).
---------
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com >
2025-03-03 11:01:38 -07:00
Yuan
04cb5fbc3e
feat!: deprecate authsource in favor of authservice ( #297 )
...
Rename existing `authSource` to `authService` through deprecation.
`AuthService` more clearly distinguishes it from `Sources` objects.
`authSources` will be converted into `authServices` after the
unmarshalling process. A warning log is shown if `authSources` are used
(for both within tools parameters and defining auth services):
```
2025-02-20T13:57:51.156025-08:00 WARN "`authSources` is deprecated, use `authServices` for parameters instead"
2025-02-20T13:57:51.156569-08:00 WARN "`authSources` is deprecated, use `authServices` instead"
2025-02-20T13:57:52.047584-08:00 INFO "Initialized 1 sources."
...
```
The manifest generated will continue to use `authSources` to keep
compatibility with the sdks:
```
{
"serverVersion":"0.1.0",
"tools":{
"test_tool2":{
"description":"Use this tool to test\n",
"parameters":[{
"name":"user_id",
"type":"string",
"description":"Auto-populated from Google login",
"authSources":["my-google-auth"]
}]
}
}
}
```
Test cases with `authSources` are kept for compatibility. Will be
removed when `authSources` are no longer supported.
2025-02-21 18:36:04 -08:00
Yuan
df28036b84
chore: add and retrieves logger from context ( #301 )
...
Add functionality to add and retrieve logger from Go context.
2025-02-21 21:28:40 +00:00
Yuan
95d29f9e8a
chore: pass logger via context through unmarshaller ( #300 )
...
Passing logger via context. With this, we will be able to add logs
during the unmarshaling process.
2025-02-21 13:02:23 -08:00
release-please[bot]
53158b07f2
chore(main): release 0.1.0 ( #217 )
...
🤖 I have created a release *beep* *boop*
---
##
[0.1.0](https://github.com/googleapis/genai-toolbox/compare/v0.0.5...v0.1.0 )
(2025-02-06)
### ⚠ BREAKING CHANGES
* **langchain-sdk:** The SDK for `toolbox-langchain` is now located
[here](https://github.com/googleapis/genai-toolbox-langchain-python ).
### Features
* Add Cloud SQL for SQL Server Source and Tool
([#223 ](https://github.com/googleapis/genai-toolbox/issues/223 ))
([9bad952 ](9bad952060 ))
* Add Cloud SQL for MySQL Source and Tool
([#221 ](https://github.com/googleapis/genai-toolbox/issues/221 ))
([f1f61d7 ](f1f61d7087 ))
* Add Dgraph Source and Tool
([#233 ](https://github.com/googleapis/genai-toolbox/issues/233 ))
([617cc87 ](617cc872d1 ))
* Add local quickstart
([#232 ](https://github.com/googleapis/genai-toolbox/issues/232 ))
([497fb06 ](497fb06fae ))
* Add user agents for cloud sources
([#244 ](https://github.com/googleapis/genai-toolbox/issues/244 ))
([8452f8e ](8452f8eb44 ))
* Add MySQL Source
([#250 ](https://github.com/googleapis/genai-toolbox/issues/250 ))
([378692a ](378692ab50 ))
* Add MSSQL source
([#255 ](https://github.com/googleapis/genai-toolbox/issues/255 ))
([8fca0a9 ](8fca0a95ee ))
### Bug Fixes
* Auth token verification failure should not throw error immediately
([#234 ](https://github.com/googleapis/genai-toolbox/issues/234 ))
([4639cc6 ](4639cc6560 ))
* Fix typo in postgres test
([#216 ](https://github.com/googleapis/genai-toolbox/issues/216 ))
([0c3d12a ](0c3d12ae04 ))
* **mssql:** Fix mssql tool kind to mssql-sql
([#249 ](https://github.com/googleapis/genai-toolbox/issues/249 ))
([1357be2 ](1357be2569 ))
* **mysql:** Fix mysql tool kind to mysql-sql
([#248 ](https://github.com/googleapis/genai-toolbox/issues/248 ))
([669d6b7 ](669d6b7239 ))
* Schema float type
([#264 ](https://github.com/googleapis/genai-toolbox/issues/264 ))
([1702f74 ](1702f74e99 ))
* Typos at test cases
([#265 ](https://github.com/googleapis/genai-toolbox/issues/265 ))
([b7c5661 ](b7c5661215 ))
* Update README and quickstart with the correct async APIs.
([#269 ](https://github.com/googleapis/genai-toolbox/issues/269 ))
([21eef2e ](21eef2e198 ))
* Update tool invoke to return json
([#266 ](https://github.com/googleapis/genai-toolbox/issues/266 ))
([ad58cd5 ](ad58cd5855 ))
---------
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com >
2025-02-05 18:46:38 -08:00
Yuan
ad58cd5855
fix: update tool invoke to return json ( #266 )
...
Return actual rows as `[]any` that contains `map` of results. Each `map`
represent a row, with the key being column name.
2025-02-05 13:45:01 -08:00
Yuan
a0ac5334d1
chore: return error for untested fields in tools.yaml ( #239 )
...
This only checks within `SourceConfig`, `ToolConfig`, and
`AuthSourceConfig`.
Error when an unknown field is provided:
`2025-01-27T22:43:46.988401-08:00 ERROR "unable to parse tool file at
\"tools.yaml\": unable to parse as \"cloud-sql-postgres\": [2:1] unknown
field \"extra\"\n 1 | database: test_database\n> 2 | extra: here\n ^\n 3
| instance: toolbox-cloudsql\n 4 | kind: cloud-sql-postgres\n 5 |
password: postgres\n 6 | "`
Error when a required field is not provided:
`2025-01-27T17:49:47.584846-08:00 ERROR "unable to parse tool file at
\"tools.yaml\": validation failed: Key: 'Config.Region' Error:Field
validation for 'Region' failed on the 'required' tag"`
---------
Co-authored-by: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com >
2025-02-03 15:30:27 -08:00
Yuan
45fc046437
chore: migrate yaml library to goccy/go-yaml ( #211 )
...
Migrate yaml library from
[gopkg.in/yaml.v3](https://pkg.go.dev/gopkg.in/yaml.v3 ) to
[goccy/go-yaml](https://github.com/goccy/go-yaml ).
We are trying to add validation feature to the unmarshaling of yaml.
However, `yaml.v3` currently does not support that and the library had
not been actively maintained for awhile. This migration will allow us to
use validation processing such as
[go-playground/validator](https://github.com/go-playground/validator )
---------
Co-authored-by: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com >
2025-01-16 09:15:18 -08:00
release-please[bot]
afb24d322f
chore(main): release 0.0.5 ( #164 )
...
🤖 I have created a release *beep* *boop*
---
##
[0.0.5](https://github.com/googleapis/genai-toolbox/compare/v0.0.4...v0.0.5 )
(2025-01-14)
### ⚠ BREAKING CHANGES
* replace Source field `ip_type` with `ipType` for consistency
([#197 ](https://github.com/googleapis/genai-toolbox/issues/197 ))
* **toolbox-sdk:** deprecate 'add_auth_headers' in favor of
'add_auth_tokens'
([#170 ](https://github.com/googleapis/genai-toolbox/issues/170 ))
### Features
* Add support for OpenTelemetry
([#205 ](https://github.com/googleapis/genai-toolbox/issues/205 ))
([1fcc20a ](1fcc20a846 ))
* Added Neo4j Source and Tool
([#189 ](https://github.com/googleapis/genai-toolbox/issues/189 ))
([8a1224b ](8a1224b9e0 ))
* **llamaindex-sdk:** Implement OAuth support for LlamaIndex.
([#159 ](https://github.com/googleapis/genai-toolbox/issues/159 ))
([003ce51 ](003ce510a1 ))
* Replace Source field `ip_type` with `ipType` for consistency
([#197 ](https://github.com/googleapis/genai-toolbox/issues/197 ))
([e069520 ](e069520bb7 ))
* Update log with given context
([#147 ](https://github.com/googleapis/genai-toolbox/issues/147 ))
([809e547 ](809e547a48 ))
### Bug Fixes
* Correct parsing of floats/ints from json
([#180 ](https://github.com/googleapis/genai-toolbox/issues/180 ))
([387a5b5 ](387a5b56b5 ))
* **doc:** Update example `clientId` field
([#198 ](https://github.com/googleapis/genai-toolbox/issues/198 ))
([0c86e89 ](0c86e89506 ))
* Fix config name in auth doc samples
([#186 ](https://github.com/googleapis/genai-toolbox/issues/186 ))
([bb03457 ](bb0345767e ))
* Handle shutdown gracefully
([#178 ](https://github.com/googleapis/genai-toolbox/issues/178 ))
([66ab70f ](66ab70f702 ))
* Improve return error for parameters
([#206 ](https://github.com/googleapis/genai-toolbox/issues/206 ))
([346c57d ](346c57da23 ))
* **toolbox-sdk:** Deprecate 'add_auth_headers' in favor of
'add_auth_tokens'
([#170 ](https://github.com/googleapis/genai-toolbox/issues/170 ))
([b56fa68 ](b56fa685e3 ))
### Miscellaneous Chores
* Release 0.0.5
([#210 ](https://github.com/googleapis/genai-toolbox/issues/210 ))
([bd407c0 ](bd407c0ab7 ))
---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please ). See
[documentation](https://github.com/googleapis/release-please#release-please ).
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
2025-01-15 01:52:22 +08:00
Yuan
1fcc20a846
feat: add support for OpenTelemetry ( #205 )
...
Co-authored-by: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com >
Co-authored-by: Wenxin Du <117315983+duwenxin99@users.noreply.github.com >
2025-01-13 15:38:38 -08:00
Kurtis Van Gent
66ab70f702
fix: handle shutdown gracefully ( #178 )
...
Adds logic to make the server shutdown gracefully, including better
respecting cancelled contexts and providing up to 10 seconds to finish
current connections.
2024-12-31 09:53:53 -07:00
Yuan
809e547a48
feat: update log with given context ( #147 )
...
Update logging with the given context.
2024-12-23 19:55:25 -08:00
release-please[bot]
21a9146404
chore(main): release 0.0.4 ( #153 )
...
🤖 I have created a release *beep* *boop*
---
##
[0.0.4](https://github.com/googleapis/genai-toolbox/compare/v0.0.3...v0.0.4 )
(2024-12-18)
### Features
* Add `auth_required` to tools
([#123 ](https://github.com/googleapis/genai-toolbox/issues/123 ))
([3118104 ](3118104ae1 ))
* Add Auth Source configuration
([#71 ](https://github.com/googleapis/genai-toolbox/issues/71 ))
([77b0d43 ](77b0d43175 ))
* Add Tool authenticated parameters
([#80 ](https://github.com/googleapis/genai-toolbox/issues/80 ))
([380a6fb ](380a6fbbd5 ))
* **langchain-sdk:** Correctly parse Manifest API response as JSON
([#143 ](https://github.com/googleapis/genai-toolbox/issues/143 ))
([2c8633c ](2c8633c3eb ))
* **langchain-sdk:** Support authentication in LangChain Toolbox SDK.
([#133 ](https://github.com/googleapis/genai-toolbox/issues/133 ))
([23fa912 ](23fa912a80 ))
### Bug Fixes
* Fix release image version tag
([#136 ](https://github.com/googleapis/genai-toolbox/issues/136 ))
([6d19ff9 ](6d19ff96e4 ))
* **langchain-sdk:** Correct test name to ensure execution and full
coverage.
([#145 ](https://github.com/googleapis/genai-toolbox/issues/145 ))
([d820ac3 ](d820ac3767 ))
* Set server version
([#150 ](https://github.com/googleapis/genai-toolbox/issues/150 ))
([abd1eb7 ](abd1eb702c ))
### Miscellaneous Chores
* Release 0.0.4
([#152 ](https://github.com/googleapis/genai-toolbox/issues/152 ))
([86ec12f ](86ec12f8c5 ))
---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please ). See
[documentation](https://github.com/googleapis/release-please#release-please ).
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
2024-12-18 18:48:13 -05:00
Wenxin Du
abd1eb702c
fix: Set server version ( #150 )
2024-12-18 17:15:55 -05:00
Wenxin Du
3118104ae1
feat: add auth_required to tools ( #123 )
...
Check if a tool invocation request contains required auth token.
2024-12-16 22:41:13 -05:00
Wenxin Du
380a6fbbd5
feat: Add Tool authenticated parameters ( #80 )
...
1. Add []ParamAuthSource to every Parameter type implementation to
support authenticated configs. Create new constructors for types with
auth.
2. Tool invocation API changes to parse auth header and authentecated
parameters.
3. Add authSources to Tool manifest.
2024-12-16 17:46:06 -05:00
Wenxin Du
77b0d43175
feat: Add Auth Source configuration ( #71 )
...
1. Add authentication source configs to Toolbox server.
2. Add Google auth implementation.
2024-12-13 12:22:42 -05:00
release-please[bot]
504fbf508b
chore(main): release 0.0.3 ( #75 )
...
🤖 I have created a release *beep* *boop*
---
##
[0.0.3](https://github.com/googleapis/genai-toolbox/compare/v0.0.2...v0.0.3 )
(2024-12-10)
### Features
* Add --log-level and --logging-format flags
([#97 ](https://github.com/googleapis/genai-toolbox/issues/97 ))
([9a0f618 ](9a0f618efc ))
* Add options for command
([#110 ](https://github.com/googleapis/genai-toolbox/issues/110 ))
([5c690c5 ](5c690c5c30 ))
* Add Spanner source and tool
([#90 ](https://github.com/googleapis/genai-toolbox/issues/90 ))
([890914a ](890914aae0 ))
* Add std logger
([#95 ](https://github.com/googleapis/genai-toolbox/issues/95 ))
([6a8feb5 ](6a8feb51f0 ))
* Add structured logger
([#96 ](https://github.com/googleapis/genai-toolbox/issues/96 ))
([5e20417 ](5e20417551 ))
* **source/alloydb-pg:** Add configuration for public and private IP
([#103 ](https://github.com/googleapis/genai-toolbox/issues/103 ))
([e88ec40 ](e88ec409d1 ))
* **source/cloudsql-pg:** Add configuration for public and private IP
([#114 ](https://github.com/googleapis/genai-toolbox/issues/114 ))
([6479c1d ](6479c1dbe2 ))
### Bug Fixes
* Fix go test workflow
([#84 ](https://github.com/googleapis/genai-toolbox/issues/84 ))
([8c2c373 ](8c2c373d35 ))
* Fix issue causing client session to not close properly while closing
SDK. ([#81 ](https://github.com/googleapis/genai-toolbox/issues/81 ))
([9d360e1 ](9d360e16ea ))
* Fix test cases for ip_type
([#115 ](https://github.com/googleapis/genai-toolbox/issues/115 ))
([5528bec ](5528bec8ed ))
* Fix the errors showing up after setting up mypy type checker.
([#74 ](https://github.com/googleapis/genai-toolbox/issues/74 ))
([522bbef ](522bbefa7b ))
* **llamaindex-sdk:** Fix issue causing client session to not close
properly while closing SDK.
([#82 ](https://github.com/googleapis/genai-toolbox/issues/82 ))
([fa03376 ](fa03376bbc ))
### Miscellaneous Chores
* Release 0.0.3
([#122 ](https://github.com/googleapis/genai-toolbox/issues/122 ))
([626e12f ](626e12fdb3 ))
---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please ). See
[documentation](https://github.com/googleapis/release-please#release-please ).
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
2024-12-09 19:39:11 -05:00