mirror of
https://github.com/googleapis/genai-toolbox.git
synced 2026-02-14 17:15:11 -05:00
🤖 I have created a release *beep* *boop* --- ## [0.27.0](https://github.com/googleapis/genai-toolbox/compare/v0.26.0...v0.27.0) (2026-02-12) ### ⚠ BREAKING CHANGES * Update configuration file v2 ([#2369](293c1d6889)) * Update/add detailed telemetry for mcp endpoint compliant with OTEL semantic convention ([#1987](https://github.com/googleapis/genai-toolbox/issues/1987)) ([478a0bd](478a0bdb59)) ### Features * **cli/invoke:** Add support for direct tool invocation from CLI ([#2353](https://github.com/googleapis/genai-toolbox/issues/2353)) ([6e49ba4](6e49ba436e)) * **cli/skills:** Add support for generating agent skills from toolset ([#2392](https://github.com/googleapis/genai-toolbox/issues/2392)) ([80ef346](80ef346214)) * **cloud-logging-admin:** Add source, tools, integration test and docs ([#2137](https://github.com/googleapis/genai-toolbox/issues/2137)) ([252fc30](252fc3091a)) * **cockroachdb:** Add CockroachDB integration with cockroach-go ([#2006](https://github.com/googleapis/genai-toolbox/issues/2006)) ([1fdd99a](1fdd99a9b6)) * **prebuiltconfigs/alloydb-omni:** Implement Alloydb omni dataplane tools ([#2340](https://github.com/googleapis/genai-toolbox/issues/2340)) ([e995349](e995349ea0)) * **server:** Add Tool call error categories ([#2387](https://github.com/googleapis/genai-toolbox/issues/2387)) ([32cb4db](32cb4db712)) * **tools/looker:** support `looker-validate-project` tool ([#2430](https://github.com/googleapis/genai-toolbox/issues/2430)) ([a15a128](a15a12873f)) ### Bug Fixes * **dataplex:** Capture GCP HTTP errors in MCP Toolbox ([#2347](https://github.com/googleapis/genai-toolbox/issues/2347)) ([1d7c498](1d7c498116)) * **sources/cockroachdb:** Update kind to type ([#2465](https://github.com/googleapis/genai-toolbox/issues/2465)) ([2d341ac](2d341acaa6)) * Surface Dataplex API errors in MCP results ([#2347](1d7c498116)) --- 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>
133 lines
4.0 KiB
Markdown
133 lines
4.0 KiB
Markdown
<!-- This file has been used in local_quickstart.md, local_quickstart_go.md & local_quickstart_js.md -->
|
|
<!-- [START configure_toolbox] -->
|
|
In this section, we will download Toolbox, configure our tools in a
|
|
`tools.yaml`, and then run the Toolbox server.
|
|
|
|
1. Download the latest version of Toolbox as a binary:
|
|
|
|
{{< notice tip >}}
|
|
Select the
|
|
[correct binary](https://github.com/googleapis/genai-toolbox/releases)
|
|
corresponding to your OS and CPU architecture.
|
|
{{< /notice >}}
|
|
<!-- {x-release-please-start-version} -->
|
|
```bash
|
|
export OS="linux/amd64" # one of linux/amd64, darwin/arm64, darwin/amd64, or windows/amd64
|
|
curl -O https://storage.googleapis.com/genai-toolbox/v0.27.0/$OS/toolbox
|
|
```
|
|
<!-- {x-release-please-end} -->
|
|
|
|
1. Make the binary executable:
|
|
|
|
```bash
|
|
chmod +x toolbox
|
|
```
|
|
|
|
1. Write the following into a `tools.yaml` file. Be sure to update any fields
|
|
such as `user`, `password`, or `database` that you may have customized in the
|
|
previous step.
|
|
|
|
{{< notice tip >}}
|
|
In practice, use environment variable replacement with the format ${ENV_NAME}
|
|
instead of hardcoding your secrets into the configuration file.
|
|
{{< /notice >}}
|
|
|
|
```yaml
|
|
kind: sources
|
|
name: my-pg-source
|
|
type: postgres
|
|
host: 127.0.0.1
|
|
port: 5432
|
|
database: toolbox_db
|
|
user: toolbox_user
|
|
password: my-password
|
|
---
|
|
kind: tools
|
|
name: search-hotels-by-name
|
|
type: postgres-sql
|
|
source: my-pg-source
|
|
description: Search for hotels based on name.
|
|
parameters:
|
|
- name: name
|
|
type: string
|
|
description: The name of the hotel.
|
|
statement: SELECT * FROM hotels WHERE name ILIKE '%' || $1 || '%';
|
|
---
|
|
kind: tools
|
|
name: search-hotels-by-location
|
|
type: postgres-sql
|
|
source: my-pg-source
|
|
description: Search for hotels based on location.
|
|
parameters:
|
|
- name: location
|
|
type: string
|
|
description: The location of the hotel.
|
|
statement: SELECT * FROM hotels WHERE location ILIKE '%' || $1 || '%';
|
|
---
|
|
kind: tools
|
|
name: book-hotel
|
|
type: postgres-sql
|
|
source: my-pg-source
|
|
description: >-
|
|
Book a hotel by its ID. If the hotel is successfully booked, returns a NULL, raises an error if not.
|
|
parameters:
|
|
- name: hotel_id
|
|
type: string
|
|
description: The ID of the hotel to book.
|
|
statement: UPDATE hotels SET booked = B'1' WHERE id = $1;
|
|
---
|
|
kind: tools
|
|
name: update-hotel
|
|
type: postgres-sql
|
|
source: my-pg-source
|
|
description: >-
|
|
Update a hotel's check-in and check-out dates by its ID. Returns a message
|
|
indicating whether the hotel was successfully updated or not.
|
|
parameters:
|
|
- name: hotel_id
|
|
type: string
|
|
description: The ID of the hotel to update.
|
|
- name: checkin_date
|
|
type: string
|
|
description: The new check-in date of the hotel.
|
|
- name: checkout_date
|
|
type: string
|
|
description: The new check-out date of the hotel.
|
|
statement: >-
|
|
UPDATE hotels SET checkin_date = CAST($2 as date), checkout_date = CAST($3
|
|
as date) WHERE id = $1;
|
|
---
|
|
kind: tools
|
|
name: cancel-hotel
|
|
type: postgres-sql
|
|
source: my-pg-source
|
|
description: Cancel a hotel by its ID.
|
|
parameters:
|
|
- name: hotel_id
|
|
type: string
|
|
description: The ID of the hotel to cancel.
|
|
statement: UPDATE hotels SET booked = B'0' WHERE id = $1;
|
|
---
|
|
kind: toolsets
|
|
name: my-toolset
|
|
tools:
|
|
- search-hotels-by-name
|
|
- search-hotels-by-location
|
|
- book-hotel
|
|
- update-hotel
|
|
- cancel-hotel
|
|
```
|
|
|
|
For more info on tools, check out the `Resources` section of the docs.
|
|
|
|
1. Run the Toolbox server, pointing to the `tools.yaml` file created earlier:
|
|
|
|
```bash
|
|
./toolbox --tools-file "tools.yaml"
|
|
```
|
|
|
|
{{< notice note >}}
|
|
Toolbox enables dynamic reloading by default. To disable, use the
|
|
`--disable-reload` flag.
|
|
{{< /notice >}}
|
|
<!-- [END configure_toolbox] --> |