mirror of
https://github.com/googleapis/genai-toolbox.git
synced 2026-01-23 06:18:02 -05:00
Compare commits
41 Commits
config-yam
...
spanner-cr
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a7d0f19716 | ||
|
|
86bf7bf8d0 | ||
|
|
ad2893d809 | ||
|
|
e535b372ea | ||
|
|
5054212fa4 | ||
|
|
93ca4578da | ||
|
|
ec936aed03 | ||
|
|
fe69272c84 | ||
|
|
15101b1edb | ||
|
|
e4f60e5633 | ||
|
|
d7af21bdde | ||
|
|
adc9589766 | ||
|
|
c25a2330fe | ||
|
|
6e09b08c6a | ||
|
|
1f15a111f1 | ||
|
|
dfddeb528d | ||
|
|
00c3e6d8cb | ||
|
|
d00b6fdf18 | ||
|
|
4d23a3bbf2 | ||
|
|
5e0999ebf5 | ||
|
|
6b02591703 | ||
|
|
de7c65eb1c | ||
|
|
589059ed3f | ||
|
|
6d43488ddf | ||
|
|
3a317a3455 | ||
|
|
af62ddf9c1 | ||
|
|
1475b4d092 | ||
|
|
c67b0cf0fc | ||
|
|
511c4651f3 | ||
|
|
62095feadb | ||
|
|
f9f34b1005 | ||
|
|
4170fe309f | ||
|
|
a9edd5e32d | ||
|
|
09c979d8db | ||
|
|
7d79f4909a | ||
|
|
330dd843bf | ||
|
|
e831f71421 | ||
|
|
4f62db499d | ||
|
|
e6de2170cf | ||
|
|
5b7f5a3039 | ||
|
|
302b564ca1 |
@@ -87,7 +87,7 @@ steps:
|
||||
- "CLOUD_SQL_POSTGRES_REGION=$_REGION"
|
||||
- "SERVICE_ACCOUNT_EMAIL=$SERVICE_ACCOUNT_EMAIL"
|
||||
secretEnv:
|
||||
["CLOUD_SQL_POSTGRES_USER", "CLOUD_SQL_POSTGRES_PASS", "CLIENT_ID"]
|
||||
["CLOUD_SQL_POSTGRES_USER", "CLOUD_SQL_POSTGRES_PASS", "CLIENT_ID", "API_KEY"]
|
||||
volumes:
|
||||
- name: "go"
|
||||
path: "/gopath"
|
||||
@@ -134,7 +134,7 @@ steps:
|
||||
- "ALLOYDB_POSTGRES_DATABASE=$_DATABASE_NAME"
|
||||
- "ALLOYDB_POSTGRES_REGION=$_REGION"
|
||||
- "SERVICE_ACCOUNT_EMAIL=$SERVICE_ACCOUNT_EMAIL"
|
||||
secretEnv: ["ALLOYDB_POSTGRES_USER", "ALLOYDB_POSTGRES_PASS", "CLIENT_ID"]
|
||||
secretEnv: ["ALLOYDB_POSTGRES_USER", "ALLOYDB_POSTGRES_PASS", "CLIENT_ID", "API_KEY"]
|
||||
volumes:
|
||||
- name: "go"
|
||||
path: "/gopath"
|
||||
@@ -293,7 +293,7 @@ steps:
|
||||
.ci/test_with_coverage.sh \
|
||||
"Cloud Healthcare API" \
|
||||
cloudhealthcare \
|
||||
cloudhealthcare || echo "Integration tests failed."
|
||||
cloudhealthcare
|
||||
|
||||
- id: "postgres"
|
||||
name: golang:1
|
||||
@@ -305,7 +305,7 @@ steps:
|
||||
- "POSTGRES_HOST=$_POSTGRES_HOST"
|
||||
- "POSTGRES_PORT=$_POSTGRES_PORT"
|
||||
- "SERVICE_ACCOUNT_EMAIL=$SERVICE_ACCOUNT_EMAIL"
|
||||
secretEnv: ["POSTGRES_USER", "POSTGRES_PASS", "CLIENT_ID"]
|
||||
secretEnv: ["POSTGRES_USER", "POSTGRES_PASS", "CLIENT_ID", "API_KEY"]
|
||||
volumes:
|
||||
- name: "go"
|
||||
path: "/gopath"
|
||||
@@ -340,6 +340,26 @@ steps:
|
||||
spanner \
|
||||
spanner || echo "Integration tests failed." # ignore test failures
|
||||
|
||||
- id: "spanner-admin"
|
||||
name: golang:1
|
||||
waitFor: ["compile-test-binary"]
|
||||
entrypoint: /bin/bash
|
||||
env:
|
||||
- "GOPATH=/gopath"
|
||||
- "SPANNER_PROJECT=$PROJECT_ID"
|
||||
- "SERVICE_ACCOUNT_EMAIL=$SERVICE_ACCOUNT_EMAIL"
|
||||
secretEnv: ["CLIENT_ID"]
|
||||
volumes:
|
||||
- name: "go"
|
||||
path: "/gopath"
|
||||
args:
|
||||
- -c
|
||||
- |
|
||||
.ci/test_with_coverage.sh \
|
||||
"Spanner Admin" \
|
||||
spanneradmin \
|
||||
spanneradmin || echo "Integration tests failed."
|
||||
|
||||
- id: "neo4j"
|
||||
name: golang:1
|
||||
waitFor: ["compile-test-binary"]
|
||||
@@ -964,6 +984,13 @@ steps:
|
||||
|
||||
availableSecrets:
|
||||
secretManager:
|
||||
# Common secrets
|
||||
- versionName: projects/$PROJECT_ID/secrets/client_id/versions/latest
|
||||
env: CLIENT_ID
|
||||
- versionName: projects/$PROJECT_ID/secrets/api_key/versions/latest
|
||||
env: API_KEY
|
||||
|
||||
# Resource-specific secrets
|
||||
- versionName: projects/$PROJECT_ID/secrets/cloud_sql_pg_user/versions/latest
|
||||
env: CLOUD_SQL_POSTGRES_USER
|
||||
- versionName: projects/$PROJECT_ID/secrets/cloud_sql_pg_pass/versions/latest
|
||||
@@ -980,8 +1007,6 @@ availableSecrets:
|
||||
env: POSTGRES_USER
|
||||
- versionName: projects/$PROJECT_ID/secrets/postgres_pass/versions/latest
|
||||
env: POSTGRES_PASS
|
||||
- versionName: projects/$PROJECT_ID/secrets/client_id/versions/latest
|
||||
env: CLIENT_ID
|
||||
- versionName: projects/$PROJECT_ID/secrets/neo4j_user/versions/latest
|
||||
env: NEO4J_USER
|
||||
- versionName: projects/$PROJECT_ID/secrets/neo4j_pass/versions/latest
|
||||
|
||||
@@ -51,6 +51,10 @@ ignoreFiles = ["quickstart/shared", "quickstart/python", "quickstart/js", "quick
|
||||
# Add a new version block here before every release
|
||||
# The order of versions in this file is mirrored into the dropdown
|
||||
|
||||
[[params.versions]]
|
||||
version = "v0.26.0"
|
||||
url = "https://googleapis.github.io/genai-toolbox/v0.26.0/"
|
||||
|
||||
[[params.versions]]
|
||||
version = "v0.25.0"
|
||||
url = "https://googleapis.github.io/genai-toolbox/v0.25.0/"
|
||||
|
||||
25
CHANGELOG.md
25
CHANGELOG.md
@@ -1,5 +1,30 @@
|
||||
# Changelog
|
||||
|
||||
## [0.26.0](https://github.com/googleapis/genai-toolbox/compare/v0.25.0...v0.26.0) (2026-01-22)
|
||||
|
||||
|
||||
### ⚠ BREAKING CHANGES
|
||||
|
||||
* Validate tool naming ([#2305](https://github.com/googleapis/genai-toolbox/issues/2305)) ([5054212](https://github.com/googleapis/genai-toolbox/commit/5054212fa43017207fe83275d27b9fbab96e8ab5))
|
||||
* **tools/cloudgda:** Update description and parameter name for cloudgda tool ([#2288](https://github.com/googleapis/genai-toolbox/issues/2288)) ([6b02591](https://github.com/googleapis/genai-toolbox/commit/6b025917032394a66840488259db8ff2c3063016))
|
||||
|
||||
### Features
|
||||
|
||||
* Add new `user-agent-metadata` flag ([#2302](https://github.com/googleapis/genai-toolbox/issues/2302)) ([adc9589](https://github.com/googleapis/genai-toolbox/commit/adc9589766904d9e3cbe0a6399222f8d4bb9d0cc))
|
||||
* Add remaining flag to Toolbox server in MCP registry ([#2272](https://github.com/googleapis/genai-toolbox/issues/2272)) ([5e0999e](https://github.com/googleapis/genai-toolbox/commit/5e0999ebf5cdd9046e96857738254b2e0561b6d2))
|
||||
* **embeddingModel:** Add embedding model to MCP handler ([#2310](https://github.com/googleapis/genai-toolbox/issues/2310)) ([e4f60e5](https://github.com/googleapis/genai-toolbox/commit/e4f60e56335b755ef55b9553d3f40b31858ec8d9))
|
||||
* **sources/bigquery:** Make maximum rows returned from queries configurable ([#2262](https://github.com/googleapis/genai-toolbox/issues/2262)) ([4abf0c3](https://github.com/googleapis/genai-toolbox/commit/4abf0c39e717d53b22cc61efb65e09928c598236))
|
||||
* **prebuilt/cloud-sql:** Add create backup tool for Cloud SQL ([#2141](https://github.com/googleapis/genai-toolbox/issues/2141)) ([8e0fb03](https://github.com/googleapis/genai-toolbox/commit/8e0fb0348315a80f63cb47b3c7204869482448f4))
|
||||
* **prebuilt/cloud-sql:** Add restore backup tool for Cloud SQL ([#2171](https://github.com/googleapis/genai-toolbox/issues/2171)) ([00c3e6d](https://github.com/googleapis/genai-toolbox/commit/00c3e6d8cba54e2ab6cb271c7e6b378895df53e1))
|
||||
* Support combining multiple prebuilt configurations ([#2295](https://github.com/googleapis/genai-toolbox/issues/2295)) ([e535b37](https://github.com/googleapis/genai-toolbox/commit/e535b372ea81864d644a67135a1b07e4e519b4b4))
|
||||
* Support MCP specs version 2025-11-25 ([#2303](https://github.com/googleapis/genai-toolbox/issues/2303)) ([4d23a3b](https://github.com/googleapis/genai-toolbox/commit/4d23a3bbf2797b1f7fe328aeb5789e778121da23))
|
||||
* **tools:** Add `valueFromParam` support to Tool config ([#2333](https://github.com/googleapis/genai-toolbox/issues/2333)) ([15101b1](https://github.com/googleapis/genai-toolbox/commit/15101b1edbe2b85a4a5f9f819c23cf83138f4ee1))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **tools/cloudhealthcare:** Add check for client authorization before retrieving token string ([#2327](https://github.com/googleapis/genai-toolbox/issues/2327)) ([c25a233](https://github.com/googleapis/genai-toolbox/commit/c25a2330fea2ac382a398842c9e572e4e19bcb08))
|
||||
|
||||
## [0.25.0](https://github.com/googleapis/genai-toolbox/compare/v0.24.0...v0.25.0) (2026-01-08)
|
||||
|
||||
|
||||
|
||||
@@ -92,11 +92,11 @@ implementation](https://github.com/googleapis/genai-toolbox/blob/main/internal/s
|
||||
`newdb.go`. Create a `Config` struct to include all the necessary parameters
|
||||
for connecting to the database (e.g., host, port, username, password, database
|
||||
name) and a `Source` struct to store necessary parameters for tools (e.g.,
|
||||
Name, Type, connection object, additional config).
|
||||
Name, Kind, connection object, additional config).
|
||||
* **Implement the
|
||||
[`SourceConfig`](https://github.com/googleapis/genai-toolbox/blob/fd300dc606d88bf9f7bba689e2cee4e3565537dd/internal/sources/sources.go#L57)
|
||||
interface**. This interface requires two methods:
|
||||
* `SourceConfigType() string`: Returns a unique string identifier for your
|
||||
* `SourceConfigKind() string`: Returns a unique string identifier for your
|
||||
data source (e.g., `"newdb"`).
|
||||
* `Initialize(ctx context.Context, tracer trace.Tracer) (Source, error)`:
|
||||
Creates a new instance of your data source and establishes a connection to
|
||||
@@ -104,7 +104,7 @@ implementation](https://github.com/googleapis/genai-toolbox/blob/main/internal/s
|
||||
* **Implement the
|
||||
[`Source`](https://github.com/googleapis/genai-toolbox/blob/fd300dc606d88bf9f7bba689e2cee4e3565537dd/internal/sources/sources.go#L63)
|
||||
interface**. This interface requires one method:
|
||||
* `SourceType() string`: Returns the same string identifier as `SourceConfigType()`.
|
||||
* `SourceKind() string`: Returns the same string identifier as `SourceConfigKind()`.
|
||||
* **Implement `init()`** to register the new Source.
|
||||
* **Implement Unit Tests** in a file named `newdb_test.go`.
|
||||
|
||||
@@ -126,7 +126,7 @@ tools.
|
||||
* **Implement the
|
||||
[`ToolConfig`](https://github.com/googleapis/genai-toolbox/blob/fd300dc606d88bf9f7bba689e2cee4e3565537dd/internal/tools/tools.go#L61)
|
||||
interface**. This interface requires one method:
|
||||
* `ToolConfigType() string`: Returns a unique string identifier for your tool
|
||||
* `ToolConfigKind() string`: Returns a unique string identifier for your tool
|
||||
(e.g., `"newdb-tool"`).
|
||||
* `Initialize(sources map[string]Source) (Tool, error)`: Creates a new
|
||||
instance of your tool and validates that it can connect to the specified
|
||||
@@ -243,7 +243,7 @@ resources.
|
||||
| style | Update src code, with only formatting and whitespace updates (e.g. code formatter or linter changes). |
|
||||
|
||||
Pull requests should always add scope whenever possible. The scope is
|
||||
formatted as `<scope-resource>/<scope-type>` (e.g., `sources/postgres`, or
|
||||
formatted as `<scope-type>/<scope-kind>` (e.g., `sources/postgres`, or
|
||||
`tools/mssql-sql`).
|
||||
|
||||
Ideally, **each PR covers only one scope**, if this is
|
||||
|
||||
17
DEVELOPER.md
17
DEVELOPER.md
@@ -47,13 +47,12 @@ Before you begin, ensure you have the following:
|
||||
### Tool Naming Conventions
|
||||
|
||||
This section details the purpose and conventions for MCP Toolbox's tools naming
|
||||
properties, **tool name** and **tool type**.
|
||||
properties, **tool name** and **tool kind**.
|
||||
|
||||
```
|
||||
kind: tools
|
||||
name: cancel_hotel <- tool name
|
||||
type: postgres-sql <- tool type
|
||||
source: my_pg_source
|
||||
cancel_hotel: <- tool name
|
||||
kind: postgres-sql <- tool kind
|
||||
source: my_pg_source
|
||||
```
|
||||
|
||||
#### Tool Name
|
||||
@@ -77,17 +76,17 @@ The following guidelines apply to tool names:
|
||||
to a function) until they can be validated through extensive testing to ensure
|
||||
they do not negatively impact agent's performances.
|
||||
|
||||
#### Tool Type
|
||||
#### Tool Kind
|
||||
|
||||
Tool type serves as a category or type that a user can assign to a tool.
|
||||
Tool kind serves as a category or type that a user can assign to a tool.
|
||||
|
||||
The following guidelines apply to tool types:
|
||||
The following guidelines apply to tool kinds:
|
||||
|
||||
* Should user hyphens over underscores (e.g. `firestore-list-collections` or
|
||||
`firestore_list_colelctions`).
|
||||
* Should use product name in name (e.g. `firestore-list-collections` over
|
||||
`list-collections`).
|
||||
* Changes to tool type are breaking changes and should be avoided.
|
||||
* Changes to tool kind are breaking changes and should be avoided.
|
||||
|
||||
## Testing
|
||||
|
||||
|
||||
52
README.md
52
README.md
@@ -140,7 +140,7 @@ To install Toolbox as a binary:
|
||||
>
|
||||
> ```sh
|
||||
> # see releases page for other versions
|
||||
> export VERSION=0.25.0
|
||||
> export VERSION=0.26.0
|
||||
> curl -L -o toolbox https://storage.googleapis.com/genai-toolbox/v$VERSION/linux/amd64/toolbox
|
||||
> chmod +x toolbox
|
||||
> ```
|
||||
@@ -153,7 +153,7 @@ To install Toolbox as a binary:
|
||||
>
|
||||
> ```sh
|
||||
> # see releases page for other versions
|
||||
> export VERSION=0.25.0
|
||||
> export VERSION=0.26.0
|
||||
> curl -L -o toolbox https://storage.googleapis.com/genai-toolbox/v$VERSION/darwin/arm64/toolbox
|
||||
> chmod +x toolbox
|
||||
> ```
|
||||
@@ -166,7 +166,7 @@ To install Toolbox as a binary:
|
||||
>
|
||||
> ```sh
|
||||
> # see releases page for other versions
|
||||
> export VERSION=0.25.0
|
||||
> export VERSION=0.26.0
|
||||
> curl -L -o toolbox https://storage.googleapis.com/genai-toolbox/v$VERSION/darwin/amd64/toolbox
|
||||
> chmod +x toolbox
|
||||
> ```
|
||||
@@ -179,7 +179,7 @@ To install Toolbox as a binary:
|
||||
>
|
||||
> ```cmd
|
||||
> :: see releases page for other versions
|
||||
> set VERSION=0.25.0
|
||||
> set VERSION=0.26.0
|
||||
> curl -o toolbox.exe "https://storage.googleapis.com/genai-toolbox/v%VERSION%/windows/amd64/toolbox.exe"
|
||||
> ```
|
||||
>
|
||||
@@ -191,7 +191,7 @@ To install Toolbox as a binary:
|
||||
>
|
||||
> ```powershell
|
||||
> # see releases page for other versions
|
||||
> $VERSION = "0.25.0"
|
||||
> $VERSION = "0.26.0"
|
||||
> curl.exe -o toolbox.exe "https://storage.googleapis.com/genai-toolbox/v$VERSION/windows/amd64/toolbox.exe"
|
||||
> ```
|
||||
>
|
||||
@@ -204,7 +204,7 @@ You can also install Toolbox as a container:
|
||||
|
||||
```sh
|
||||
# see releases page for other versions
|
||||
export VERSION=0.25.0
|
||||
export VERSION=0.26.0
|
||||
docker pull us-central1-docker.pkg.dev/database-toolbox/toolbox/toolbox:$VERSION
|
||||
```
|
||||
|
||||
@@ -228,7 +228,7 @@ To install from source, ensure you have the latest version of
|
||||
[Go installed](https://go.dev/doc/install), and then run the following command:
|
||||
|
||||
```sh
|
||||
go install github.com/googleapis/genai-toolbox@v0.25.0
|
||||
go install github.com/googleapis/genai-toolbox@v0.26.0
|
||||
```
|
||||
<!-- {x-release-please-end} -->
|
||||
|
||||
@@ -938,14 +938,14 @@ Toolbox should have access to. Most tools will have at least one source to
|
||||
execute against.
|
||||
|
||||
```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
|
||||
sources:
|
||||
my-pg-source:
|
||||
kind: postgres
|
||||
host: 127.0.0.1
|
||||
port: 5432
|
||||
database: toolbox_db
|
||||
user: toolbox_user
|
||||
password: my-password
|
||||
```
|
||||
|
||||
For more details on configuring different types of sources, see the
|
||||
@@ -954,19 +954,19 @@ For more details on configuring different types of sources, see the
|
||||
### Tools
|
||||
|
||||
The `tools` section of a `tools.yaml` define the actions an agent can take: what
|
||||
type of tool it is, which source(s) it affects, what parameters it uses, etc.
|
||||
kind of tool it is, which source(s) it affects, what parameters it uses, etc.
|
||||
|
||||
```yaml
|
||||
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 || '%';
|
||||
tools:
|
||||
search-hotels-by-name:
|
||||
kind: 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 || '%';
|
||||
```
|
||||
|
||||
For more details on configuring different types of tools, see the
|
||||
|
||||
203
cmd/root.go
203
cmd/root.go
@@ -15,7 +15,6 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
_ "embed"
|
||||
"fmt"
|
||||
@@ -99,6 +98,7 @@ import (
|
||||
_ "github.com/googleapis/genai-toolbox/internal/tools/cloudsql/cloudsqlgetinstances"
|
||||
_ "github.com/googleapis/genai-toolbox/internal/tools/cloudsql/cloudsqllistdatabases"
|
||||
_ "github.com/googleapis/genai-toolbox/internal/tools/cloudsql/cloudsqllistinstances"
|
||||
_ "github.com/googleapis/genai-toolbox/internal/tools/cloudsql/cloudsqlrestorebackup"
|
||||
_ "github.com/googleapis/genai-toolbox/internal/tools/cloudsql/cloudsqlwaitforoperation"
|
||||
_ "github.com/googleapis/genai-toolbox/internal/tools/cloudsqlmssql/cloudsqlmssqlcreateinstance"
|
||||
_ "github.com/googleapis/genai-toolbox/internal/tools/cloudsqlmysql/cloudsqlmysqlcreateinstance"
|
||||
@@ -223,6 +223,7 @@ import (
|
||||
_ "github.com/googleapis/genai-toolbox/internal/tools/spanner/spannerlistgraphs"
|
||||
_ "github.com/googleapis/genai-toolbox/internal/tools/spanner/spannerlisttables"
|
||||
_ "github.com/googleapis/genai-toolbox/internal/tools/spanner/spannersql"
|
||||
_ "github.com/googleapis/genai-toolbox/internal/tools/spanneradmin/spannercreateinstance"
|
||||
_ "github.com/googleapis/genai-toolbox/internal/tools/sqlite/sqliteexecutesql"
|
||||
_ "github.com/googleapis/genai-toolbox/internal/tools/sqlite/sqlitesql"
|
||||
_ "github.com/googleapis/genai-toolbox/internal/tools/tidb/tidbexecutesql"
|
||||
@@ -269,6 +270,7 @@ import (
|
||||
_ "github.com/googleapis/genai-toolbox/internal/sources/singlestore"
|
||||
_ "github.com/googleapis/genai-toolbox/internal/sources/snowflake"
|
||||
_ "github.com/googleapis/genai-toolbox/internal/sources/spanner"
|
||||
_ "github.com/googleapis/genai-toolbox/internal/sources/spanneradmin"
|
||||
_ "github.com/googleapis/genai-toolbox/internal/sources/sqlite"
|
||||
_ "github.com/googleapis/genai-toolbox/internal/sources/tidb"
|
||||
_ "github.com/googleapis/genai-toolbox/internal/sources/trino"
|
||||
@@ -315,15 +317,15 @@ func Execute() {
|
||||
type Command struct {
|
||||
*cobra.Command
|
||||
|
||||
cfg server.ServerConfig
|
||||
logger log.Logger
|
||||
tools_file string
|
||||
tools_files []string
|
||||
tools_folder string
|
||||
prebuiltConfig string
|
||||
inStream io.Reader
|
||||
outStream io.Writer
|
||||
errStream io.Writer
|
||||
cfg server.ServerConfig
|
||||
logger log.Logger
|
||||
tools_file string
|
||||
tools_files []string
|
||||
tools_folder string
|
||||
prebuiltConfigs []string
|
||||
inStream io.Reader
|
||||
outStream io.Writer
|
||||
errStream io.Writer
|
||||
}
|
||||
|
||||
// NewCommand returns a Command object representing an invocation of the CLI.
|
||||
@@ -376,16 +378,17 @@ func NewCommand(opts ...Option) *Command {
|
||||
flags.StringVar(&cmd.cfg.TelemetryServiceName, "telemetry-service-name", "toolbox", "Sets the value of the service.name resource attribute for telemetry data.")
|
||||
// Fetch prebuilt tools sources to customize the help description
|
||||
prebuiltHelp := fmt.Sprintf(
|
||||
"Use a prebuilt tool configuration by source type. Allowed: '%s'.",
|
||||
"Use a prebuilt tool configuration by source type. Allowed: '%s'. Can be specified multiple times.",
|
||||
strings.Join(prebuiltconfigs.GetPrebuiltSources(), "', '"),
|
||||
)
|
||||
flags.StringVar(&cmd.prebuiltConfig, "prebuilt", "", prebuiltHelp)
|
||||
flags.StringSliceVar(&cmd.prebuiltConfigs, "prebuilt", []string{}, prebuiltHelp)
|
||||
flags.BoolVar(&cmd.cfg.Stdio, "stdio", false, "Listens via MCP STDIO instead of acting as a remote HTTP server.")
|
||||
flags.BoolVar(&cmd.cfg.DisableReload, "disable-reload", false, "Disables dynamic reloading of tools file.")
|
||||
flags.BoolVar(&cmd.cfg.UI, "ui", false, "Launches the Toolbox UI web server.")
|
||||
// TODO: Insecure by default. Might consider updating this for v1.0.0
|
||||
flags.StringSliceVar(&cmd.cfg.AllowedOrigins, "allowed-origins", []string{"*"}, "Specifies a list of origins permitted to access this server. Defaults to '*'.")
|
||||
flags.StringSliceVar(&cmd.cfg.AllowedHosts, "allowed-hosts", []string{"*"}, "Specifies a list of hosts permitted to access this server. Defaults to '*'.")
|
||||
flags.StringSliceVar(&cmd.cfg.UserAgentMetadata, "user-agent-metadata", []string{}, "Appends additional metadata to the User-Agent.")
|
||||
|
||||
// wrap RunE command so that we have access to original Command object
|
||||
cmd.RunE = func(*cobra.Command, []string) error { return run(cmd) }
|
||||
@@ -395,6 +398,7 @@ func NewCommand(opts ...Option) *Command {
|
||||
|
||||
type ToolsFile struct {
|
||||
Sources server.SourceConfigs `yaml:"sources"`
|
||||
AuthSources server.AuthServiceConfigs `yaml:"authSources"` // Deprecated: Kept for compatibility.
|
||||
AuthServices server.AuthServiceConfigs `yaml:"authServices"`
|
||||
EmbeddingModels server.EmbeddingModelConfigs `yaml:"embeddingModels"`
|
||||
Tools server.ToolConfigs `yaml:"tools"`
|
||||
@@ -425,106 +429,6 @@ func parseEnv(input string) (string, error) {
|
||||
return output, err
|
||||
}
|
||||
|
||||
func convertToolsFile(ctx context.Context, raw []byte) ([]byte, error) {
|
||||
var input yaml.MapSlice
|
||||
decoder := yaml.NewDecoder(bytes.NewReader(raw), yaml.UseOrderedMap())
|
||||
if err := decoder.Decode(&input); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Convert raw MapSlice to a helper map for quick lookup
|
||||
// while keeping the values as MapSlices to preserve internal order
|
||||
resourceOrder := []string{}
|
||||
lookup := make(map[string]yaml.MapSlice)
|
||||
for _, item := range input {
|
||||
key, ok := item.Key.(string)
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("unexpected non-string key in input: %v", item.Key)
|
||||
}
|
||||
if slice, ok := item.Value.(yaml.MapSlice); ok {
|
||||
// convert authSources to authServices
|
||||
if key == "authSources" {
|
||||
key = "authServices"
|
||||
}
|
||||
// works even if lookup[key] is nil
|
||||
lookup[key] = append(lookup[key], slice...)
|
||||
// preserving the resource's order of original toolsFile
|
||||
if !slices.Contains(resourceOrder, key) {
|
||||
resourceOrder = append(resourceOrder, key)
|
||||
}
|
||||
} else {
|
||||
// toolsfile is already v2
|
||||
if key == "kind" {
|
||||
return raw, nil
|
||||
}
|
||||
return nil, fmt.Errorf("'%s' is not a map", key)
|
||||
}
|
||||
}
|
||||
// convert to tools file v2
|
||||
var buf bytes.Buffer
|
||||
encoder := yaml.NewEncoder(&buf)
|
||||
for _, kind := range resourceOrder {
|
||||
data, exists := lookup[kind]
|
||||
if !exists {
|
||||
// if this is skipped for all keys, the tools file is in v2
|
||||
continue
|
||||
}
|
||||
// Transform each entry
|
||||
for _, entry := range data {
|
||||
entryName, ok := entry.Key.(string)
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("unexpected non-string key for entry in '%s': %v", kind, entry.Key)
|
||||
}
|
||||
entryBody := ProcessValue(entry.Value, kind == "toolsets")
|
||||
|
||||
transformed := yaml.MapSlice{
|
||||
{Key: "kind", Value: kind},
|
||||
{Key: "name", Value: entryName},
|
||||
}
|
||||
|
||||
// Merge the transformed body into our result
|
||||
if bodySlice, ok := entryBody.(yaml.MapSlice); ok {
|
||||
transformed = append(transformed, bodySlice...)
|
||||
} else {
|
||||
return nil, fmt.Errorf("unable to convert entryBody to MapSlice")
|
||||
}
|
||||
|
||||
if err := encoder.Encode(transformed); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
}
|
||||
return buf.Bytes(), nil
|
||||
}
|
||||
|
||||
// ProcessValue recursively looks for MapSlices to rename 'kind' -> 'type'
|
||||
func ProcessValue(v any, isToolset bool) any {
|
||||
switch val := v.(type) {
|
||||
case yaml.MapSlice:
|
||||
for i := range val {
|
||||
// Perform renaming
|
||||
if val[i].Key == "kind" {
|
||||
val[i].Key = "type"
|
||||
}
|
||||
// Recursive call for nested values (e.g., nested objects or lists)
|
||||
val[i].Value = ProcessValue(val[i].Value, false)
|
||||
}
|
||||
return val
|
||||
case []any:
|
||||
// Process lists: If it's a toolset top-level list, wrap it.
|
||||
if isToolset {
|
||||
return yaml.MapSlice{{Key: "tools", Value: val}}
|
||||
}
|
||||
// Otherwise, recurse into list items (to catch nested objects)
|
||||
for i := range val {
|
||||
val[i] = ProcessValue(val[i], false)
|
||||
}
|
||||
return val
|
||||
default:
|
||||
return val
|
||||
}
|
||||
}
|
||||
|
||||
// parseToolsFile parses the provided yaml into appropriate configs.
|
||||
func parseToolsFile(ctx context.Context, raw []byte) (ToolsFile, error) {
|
||||
var toolsFile ToolsFile
|
||||
@@ -535,13 +439,8 @@ func parseToolsFile(ctx context.Context, raw []byte) (ToolsFile, error) {
|
||||
}
|
||||
raw = []byte(output)
|
||||
|
||||
raw, err = convertToolsFile(ctx, raw)
|
||||
if err != nil {
|
||||
return toolsFile, fmt.Errorf("error converting tools file: %s", err)
|
||||
}
|
||||
|
||||
// Parse contents
|
||||
toolsFile.Sources, toolsFile.AuthServices, toolsFile.EmbeddingModels, toolsFile.Tools, toolsFile.Toolsets, toolsFile.Prompts, err = server.UnmarshalResourceConfig(ctx, raw)
|
||||
err = yaml.UnmarshalContext(ctx, raw, &toolsFile, yaml.Strict())
|
||||
if err != nil {
|
||||
return toolsFile, err
|
||||
}
|
||||
@@ -573,6 +472,18 @@ func mergeToolsFiles(files ...ToolsFile) (ToolsFile, error) {
|
||||
}
|
||||
}
|
||||
|
||||
// Check for conflicts and merge authSources (deprecated, but still support)
|
||||
for name, authSource := range file.AuthSources {
|
||||
if _, exists := merged.AuthSources[name]; exists {
|
||||
conflicts = append(conflicts, fmt.Sprintf("authSource '%s' (file #%d)", name, fileIndex+1))
|
||||
} else {
|
||||
if merged.AuthSources == nil {
|
||||
merged.AuthSources = make(server.AuthServiceConfigs)
|
||||
}
|
||||
merged.AuthSources[name] = authSource
|
||||
}
|
||||
}
|
||||
|
||||
// Check for conflicts and merge authServices
|
||||
for name, authService := range file.AuthServices {
|
||||
if _, exists := merged.AuthServices[name]; exists {
|
||||
@@ -958,24 +869,32 @@ func run(cmd *Command) error {
|
||||
var allToolsFiles []ToolsFile
|
||||
|
||||
// Load Prebuilt Configuration
|
||||
if cmd.prebuiltConfig != "" {
|
||||
buf, err := prebuiltconfigs.Get(cmd.prebuiltConfig)
|
||||
if err != nil {
|
||||
cmd.logger.ErrorContext(ctx, err.Error())
|
||||
return err
|
||||
}
|
||||
logMsg := fmt.Sprint("Using prebuilt tool configuration for ", cmd.prebuiltConfig)
|
||||
cmd.logger.InfoContext(ctx, logMsg)
|
||||
// Append prebuilt.source to Version string for the User Agent
|
||||
cmd.cfg.Version += "+prebuilt." + cmd.prebuiltConfig
|
||||
|
||||
parsed, err := parseToolsFile(ctx, buf)
|
||||
if err != nil {
|
||||
errMsg := fmt.Errorf("unable to parse prebuilt tool configuration: %w", err)
|
||||
cmd.logger.ErrorContext(ctx, errMsg.Error())
|
||||
return errMsg
|
||||
if len(cmd.prebuiltConfigs) > 0 {
|
||||
slices.Sort(cmd.prebuiltConfigs)
|
||||
sourcesList := strings.Join(cmd.prebuiltConfigs, ", ")
|
||||
logMsg := fmt.Sprintf("Using prebuilt tool configurations for: %s", sourcesList)
|
||||
cmd.logger.InfoContext(ctx, logMsg)
|
||||
|
||||
for _, configName := range cmd.prebuiltConfigs {
|
||||
buf, err := prebuiltconfigs.Get(configName)
|
||||
if err != nil {
|
||||
cmd.logger.ErrorContext(ctx, err.Error())
|
||||
return err
|
||||
}
|
||||
|
||||
// Update version string
|
||||
cmd.cfg.Version += "+prebuilt." + configName
|
||||
|
||||
// Parse into ToolsFile struct
|
||||
parsed, err := parseToolsFile(ctx, buf)
|
||||
if err != nil {
|
||||
errMsg := fmt.Errorf("unable to parse prebuilt tool configuration for '%s': %w", configName, err)
|
||||
cmd.logger.ErrorContext(ctx, errMsg.Error())
|
||||
return errMsg
|
||||
}
|
||||
allToolsFiles = append(allToolsFiles, parsed)
|
||||
}
|
||||
allToolsFiles = append(allToolsFiles, parsed)
|
||||
}
|
||||
|
||||
// Determine if Custom Files should be loaded
|
||||
@@ -983,7 +902,7 @@ func run(cmd *Command) error {
|
||||
isCustomConfigured := cmd.tools_file != "" || len(cmd.tools_files) > 0 || cmd.tools_folder != ""
|
||||
|
||||
// Determine if default 'tools.yaml' should be used (No prebuilt AND No custom flags)
|
||||
useDefaultToolsFile := cmd.prebuiltConfig == "" && !isCustomConfigured
|
||||
useDefaultToolsFile := len(cmd.prebuiltConfigs) == 0 && !isCustomConfigured
|
||||
|
||||
if useDefaultToolsFile {
|
||||
cmd.tools_file = "tools.yaml"
|
||||
@@ -1048,6 +967,20 @@ func run(cmd *Command) error {
|
||||
cmd.cfg.ToolsetConfigs = finalToolsFile.Toolsets
|
||||
cmd.cfg.PromptConfigs = finalToolsFile.Prompts
|
||||
|
||||
authSourceConfigs := finalToolsFile.AuthSources
|
||||
if authSourceConfigs != nil {
|
||||
cmd.logger.WarnContext(ctx, "`authSources` is deprecated, use `authServices` instead")
|
||||
|
||||
for k, v := range authSourceConfigs {
|
||||
if _, exists := cmd.cfg.AuthServiceConfigs[k]; exists {
|
||||
errMsg := fmt.Errorf("resource conflict detected: authSource '%s' has the same name as an existing authService. Please rename your authSource", k)
|
||||
cmd.logger.ErrorContext(ctx, errMsg.Error())
|
||||
return errMsg
|
||||
}
|
||||
cmd.cfg.AuthServiceConfigs[k] = v
|
||||
}
|
||||
}
|
||||
|
||||
instrumentation, err := telemetry.CreateTelemetryInstrumentation(versionString)
|
||||
if err != nil {
|
||||
errMsg := fmt.Errorf("unable to create telemetry instrumentation: %w", err)
|
||||
|
||||
1072
cmd/root_test.go
1072
cmd/root_test.go
File diff suppressed because it is too large
Load Diff
@@ -1 +1 @@
|
||||
0.25.0
|
||||
0.26.0
|
||||
|
||||
59
docs/SPANNERADMIN_README.md
Normal file
59
docs/SPANNERADMIN_README.md
Normal file
@@ -0,0 +1,59 @@
|
||||
# Cloud Spanner Admin MCP Server
|
||||
|
||||
The Cloud Spanner Admin Model Context Protocol (MCP) Server gives AI-powered development tools the ability to manage your Google Cloud Spanner infrastructure. It supports creating instances.
|
||||
|
||||
## Features
|
||||
|
||||
An editor configured to use the Cloud Spanner Admin MCP server can use its AI capabilities to help you:
|
||||
|
||||
- **Provision & Manage Infrastructure** - Create Cloud Spanner instances
|
||||
|
||||
## Prerequisites
|
||||
|
||||
* [Node.js](https://nodejs.org/) installed.
|
||||
* A Google Cloud project with the **Cloud Spanner Admin API** enabled.
|
||||
* Ensure [Application Default Credentials](https://cloud.google.com/docs/authentication/gcloud) are available in your environment.
|
||||
* IAM Permissions:
|
||||
* Cloud Spanner Admin (`roles/spanner.admin`)
|
||||
|
||||
## Install & Configuration
|
||||
|
||||
In the Antigravity MCP Store, click the "Install" button.
|
||||
|
||||
You'll now be able to see all enabled tools in the "Tools" tab.
|
||||
|
||||
> [!NOTE]
|
||||
> If you encounter issues with Windows Defender blocking the execution, you may need to configure an allowlist. See [Configure exclusions for Microsoft Defender Antivirus](https://learn.microsoft.com/en-us/microsoft-365/security/defender-endpoint/configure-exclusions-microsoft-defender-antivirus?view=o365-worldwide) for more details.
|
||||
|
||||
## Usage
|
||||
|
||||
Once configured, the MCP server will automatically provide Cloud Spanner Admin capabilities to your AI assistant. You can:
|
||||
|
||||
* "Create a new Spanner instance named 'my-spanner-instance' in the 'my-gcp-project' project with config 'regional-us-central1', edition 'ENTERPRISE', and 1 node."
|
||||
|
||||
## Server Capabilities
|
||||
|
||||
The Cloud Spanner Admin MCP server provides the following tools:
|
||||
|
||||
| Tool Name | Description |
|
||||
|:------------------|:---------------------------------|
|
||||
| `create_instance` | Create a Cloud Spanner instance. |
|
||||
|
||||
## Custom MCP Server Configuration
|
||||
|
||||
Add the following configuration to your MCP client (e.g., `settings.json` for Gemini CLI, `mcp_config.json` for Antigravity):
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"spanner-admin": {
|
||||
"command": "npx",
|
||||
"args": ["-y", "@toolbox-sdk/server", "--prebuilt", "spanner-admin", "--stdio"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
For more information, visit the [Cloud Spanner Admin API documentation](https://cloud.google.com/spanner/docs/reference/rpc/google.spanner.admin.instance.v1).
|
||||
@@ -45,7 +45,7 @@ most popular issues, so make sure to +1 ones you are the most interested in.
|
||||
## Can Toolbox be used for non-database tools?
|
||||
|
||||
**Yes!** While Toolbox is primarily focused on databases, it also supports generic
|
||||
**HTTP tools** (`type: http`). These allow you to connect your agents to REST APIs
|
||||
**HTTP tools** (`kind: http`). These allow you to connect your agents to REST APIs
|
||||
and other web services, enabling workflows that extend beyond database interactions.
|
||||
|
||||
For configuration details, see the [HTTP Tools documentation](../resources/tools/http/http.md).
|
||||
|
||||
@@ -64,7 +64,7 @@ The structured logging outputs log as JSON:
|
||||
"timestamp":"2024-11-04T16:45:11.987299-08:00",
|
||||
"severity":"ERROR",
|
||||
"logging.googleapis.com/sourceLocation":{...},
|
||||
"message":"unable to parse tool file at \"tools.yaml\": \"cloud-sql-postgres1\" is not a valid type of data source"
|
||||
"message":"unable to parse tool file at \"tools.yaml\": \"cloud-sql-postgres1\" is not a valid kind of data source"
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -234,7 +234,7 @@
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"version = \"0.25.0\" # x-release-please-version\n",
|
||||
"version = \"0.26.0\" # x-release-please-version\n",
|
||||
"! curl -O https://storage.googleapis.com/genai-toolbox/v{version}/linux/amd64/toolbox\n",
|
||||
"\n",
|
||||
"# Make the binary executable\n",
|
||||
@@ -300,89 +300,78 @@
|
||||
"# You can also upload a tools file and use that to run toolbox.\n",
|
||||
"tools_file_name = \"tools.yml\"\n",
|
||||
"file_content = f\"\"\"\n",
|
||||
"kind: sources\n",
|
||||
"name: my-pg-source\n",
|
||||
"type: postgres\n",
|
||||
"host: 127.0.0.1\n",
|
||||
"port: 5432\n",
|
||||
"database: toolbox_db\n",
|
||||
"user: toolbox_user\n",
|
||||
"password: my-password\n",
|
||||
"---\n",
|
||||
"kind: tools\n",
|
||||
"name: search-hotels-by-name\n",
|
||||
"type: postgres-sql\n",
|
||||
"source: my-pg-source\n",
|
||||
"description: Search for hotels based on name.\n",
|
||||
"parameters:\n",
|
||||
" - name: name\n",
|
||||
" type: string\n",
|
||||
" description: The name of the hotel.\n",
|
||||
"statement: SELECT * FROM hotels WHERE name ILIKE '%' || \\$1 || '%';\n",
|
||||
"---\n",
|
||||
"kind: tools\n",
|
||||
"name: search-hotels-by-location\n",
|
||||
"type: postgres-sql\n",
|
||||
"source: my-pg-source\n",
|
||||
"description: Search for hotels based on location.\n",
|
||||
"parameters:\n",
|
||||
" - name: location\n",
|
||||
" type: string\n",
|
||||
" description: The location of the hotel.\n",
|
||||
"statement: SELECT * FROM hotels WHERE location ILIKE '%' || \\$1 || '%';\n",
|
||||
"---\n",
|
||||
"kind: tools\n",
|
||||
"name: book-hotel\n",
|
||||
"type: postgres-sql\n",
|
||||
"source: my-pg-source\n",
|
||||
"description: >-\n",
|
||||
" Book a hotel by its ID. If the hotel is successfully booked, returns a NULL, raises an error if not.\n",
|
||||
"parameters:\n",
|
||||
" - name: hotel_id\n",
|
||||
" type: string\n",
|
||||
" description: The ID of the hotel to book.\n",
|
||||
"statement: UPDATE hotels SET booked = B'1' WHERE id = \\$1;\n",
|
||||
"---\n",
|
||||
"kind: tools\n",
|
||||
"name: update-hotel\n",
|
||||
"type: postgres-sql\n",
|
||||
"source: my-pg-source\n",
|
||||
"description: >-\n",
|
||||
" Update a hotel's check-in and check-out dates by its ID. Returns a message\n",
|
||||
" indicating whether the hotel was successfully updated or not.\n",
|
||||
"parameters:\n",
|
||||
" - name: hotel_id\n",
|
||||
" type: string\n",
|
||||
" description: The ID of the hotel to update.\n",
|
||||
" - name: checkin_date\n",
|
||||
" type: string\n",
|
||||
" description: The new check-in date of the hotel.\n",
|
||||
" - name: checkout_date\n",
|
||||
" type: string\n",
|
||||
" description: The new check-out date of the hotel.\n",
|
||||
"statement: >-\n",
|
||||
" UPDATE hotels SET checkin_date = CAST(\\$2 as date), checkout_date = CAST(\\$3\n",
|
||||
" as date) WHERE id = \\$1;\n",
|
||||
"---\n",
|
||||
"kind: tools\n",
|
||||
"name: cancel-hotel\n",
|
||||
"type: postgres-sql\n",
|
||||
"source: my-pg-source\n",
|
||||
"description: Cancel a hotel by its ID.\n",
|
||||
"parameters:\n",
|
||||
" - name: hotel_id\n",
|
||||
" type: string\n",
|
||||
" description: The ID of the hotel to cancel.\n",
|
||||
"statement: UPDATE hotels SET booked = B'0' WHERE id = \\$1;\n",
|
||||
"---\n",
|
||||
"kind: toolsets\n",
|
||||
"name: my-toolset\n",
|
||||
"sources:\n",
|
||||
" my-pg-source:\n",
|
||||
" kind: postgres\n",
|
||||
" host: 127.0.0.1\n",
|
||||
" port: 5432\n",
|
||||
" database: toolbox_db\n",
|
||||
" user: toolbox_user\n",
|
||||
" password: my-password\n",
|
||||
"tools:\n",
|
||||
" - search-hotels-by-name\n",
|
||||
" - search-hotels-by-location\n",
|
||||
" - book-hotel\n",
|
||||
" - update-hotel\n",
|
||||
" - cancel-hotel\n",
|
||||
" search-hotels-by-name:\n",
|
||||
" kind: postgres-sql\n",
|
||||
" source: my-pg-source\n",
|
||||
" description: Search for hotels based on name.\n",
|
||||
" parameters:\n",
|
||||
" - name: name\n",
|
||||
" type: string\n",
|
||||
" description: The name of the hotel.\n",
|
||||
" statement: SELECT * FROM hotels WHERE name ILIKE '%' || \\$1 || '%';\n",
|
||||
" search-hotels-by-location:\n",
|
||||
" kind: postgres-sql\n",
|
||||
" source: my-pg-source\n",
|
||||
" description: Search for hotels based on location.\n",
|
||||
" parameters:\n",
|
||||
" - name: location\n",
|
||||
" type: string\n",
|
||||
" description: The location of the hotel.\n",
|
||||
" statement: SELECT * FROM hotels WHERE location ILIKE '%' || \\$1 || '%';\n",
|
||||
" book-hotel:\n",
|
||||
" kind: postgres-sql\n",
|
||||
" source: my-pg-source\n",
|
||||
" description: >-\n",
|
||||
" Book a hotel by its ID. If the hotel is successfully booked, returns a NULL, raises an error if not.\n",
|
||||
" parameters:\n",
|
||||
" - name: hotel_id\n",
|
||||
" type: string\n",
|
||||
" description: The ID of the hotel to book.\n",
|
||||
" statement: UPDATE hotels SET booked = B'1' WHERE id = \\$1;\n",
|
||||
" update-hotel:\n",
|
||||
" kind: postgres-sql\n",
|
||||
" source: my-pg-source\n",
|
||||
" description: >-\n",
|
||||
" Update a hotel's check-in and check-out dates by its ID. Returns a message\n",
|
||||
" indicating whether the hotel was successfully updated or not.\n",
|
||||
" parameters:\n",
|
||||
" - name: hotel_id\n",
|
||||
" type: string\n",
|
||||
" description: The ID of the hotel to update.\n",
|
||||
" - name: checkin_date\n",
|
||||
" type: string\n",
|
||||
" description: The new check-in date of the hotel.\n",
|
||||
" - name: checkout_date\n",
|
||||
" type: string\n",
|
||||
" description: The new check-out date of the hotel.\n",
|
||||
" statement: >-\n",
|
||||
" UPDATE hotels SET checkin_date = CAST(\\$2 as date), checkout_date = CAST(\\$3\n",
|
||||
" as date) WHERE id = \\$1;\n",
|
||||
" cancel-hotel:\n",
|
||||
" kind: postgres-sql\n",
|
||||
" source: my-pg-source\n",
|
||||
" description: Cancel a hotel by its ID.\n",
|
||||
" parameters:\n",
|
||||
" - name: hotel_id\n",
|
||||
" type: string\n",
|
||||
" description: The ID of the hotel to cancel.\n",
|
||||
" statement: UPDATE hotels SET booked = B'0' WHERE id = \\$1;\n",
|
||||
"toolsets:\n",
|
||||
" my-toolset:\n",
|
||||
" - search-hotels-by-name\n",
|
||||
" - search-hotels-by-location\n",
|
||||
" - book-hotel\n",
|
||||
" - update-hotel\n",
|
||||
" - cancel-hotel\n",
|
||||
"\"\"\""
|
||||
]
|
||||
},
|
||||
|
||||
@@ -36,14 +36,14 @@ Toolbox should have access to. Most tools will have at least one source to
|
||||
execute against.
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-pg-source
|
||||
type: postgres
|
||||
host: 127.0.0.1
|
||||
port: 5432
|
||||
database: toolbox_db
|
||||
user: ${USER_NAME}
|
||||
password: ${PASSWORD}
|
||||
sources:
|
||||
my-pg-source:
|
||||
kind: postgres
|
||||
host: 127.0.0.1
|
||||
port: 5432
|
||||
database: toolbox_db
|
||||
user: ${USER_NAME}
|
||||
password: ${PASSWORD}
|
||||
```
|
||||
|
||||
For more details on configuring different types of sources, see the
|
||||
@@ -52,20 +52,20 @@ For more details on configuring different types of sources, see the
|
||||
### Tools
|
||||
|
||||
The `tools` section of your `tools.yaml` defines the actions your agent can
|
||||
take: what type of tool it is, which source(s) it affects, what parameters it
|
||||
take: what kind of tool it is, which source(s) it affects, what parameters it
|
||||
uses, etc.
|
||||
|
||||
```yaml
|
||||
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 || '%';
|
||||
tools:
|
||||
search-hotels-by-name:
|
||||
kind: 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 || '%';
|
||||
```
|
||||
|
||||
For more details on configuring different types of tools, see the
|
||||
@@ -78,17 +78,13 @@ that you want to be able to load together. This can be useful for defining
|
||||
different sets for different agents or different applications.
|
||||
|
||||
```yaml
|
||||
kind: toolsets
|
||||
name: my_first_toolset
|
||||
tools:
|
||||
- my_first_tool
|
||||
- my_second_tool
|
||||
---
|
||||
kind: toolsets
|
||||
name: my_second_toolset
|
||||
tools:
|
||||
- my_second_tool
|
||||
- my_third_tool
|
||||
toolsets:
|
||||
my_first_toolset:
|
||||
- my_first_tool
|
||||
- my_second_tool
|
||||
my_second_toolset:
|
||||
- my_second_tool
|
||||
- my_third_tool
|
||||
```
|
||||
|
||||
You can load toolsets by name:
|
||||
@@ -107,14 +103,14 @@ The `prompts` section of your `tools.yaml` defines the templates containing
|
||||
structured messages and instructions for interacting with language models.
|
||||
|
||||
```yaml
|
||||
kind: prompts
|
||||
name: code_review
|
||||
description: "Asks the LLM to analyze code quality and suggest improvements."
|
||||
messages:
|
||||
- content: "Please review the following code for quality, correctness, and potential improvements: \n\n{{.code}}"
|
||||
arguments:
|
||||
- name: "code"
|
||||
description: "The code to review"
|
||||
prompts:
|
||||
code_review:
|
||||
description: "Asks the LLM to analyze code quality and suggest improvements."
|
||||
messages:
|
||||
- content: "Please review the following code for quality, correctness, and potential improvements: \n\n{{.code}}"
|
||||
arguments:
|
||||
- name: "code"
|
||||
description: "The code to review"
|
||||
```
|
||||
|
||||
For more details on configuring different types of prompts, see the
|
||||
|
||||
@@ -103,7 +103,7 @@ To install Toolbox as a binary on Linux (AMD64):
|
||||
|
||||
```sh
|
||||
# see releases page for other versions
|
||||
export VERSION=0.25.0
|
||||
export VERSION=0.26.0
|
||||
curl -L -o toolbox https://storage.googleapis.com/genai-toolbox/v$VERSION/linux/amd64/toolbox
|
||||
chmod +x toolbox
|
||||
```
|
||||
@@ -114,7 +114,7 @@ To install Toolbox as a binary on macOS (Apple Silicon):
|
||||
|
||||
```sh
|
||||
# see releases page for other versions
|
||||
export VERSION=0.25.0
|
||||
export VERSION=0.26.0
|
||||
curl -L -o toolbox https://storage.googleapis.com/genai-toolbox/v$VERSION/darwin/arm64/toolbox
|
||||
chmod +x toolbox
|
||||
```
|
||||
@@ -125,7 +125,7 @@ To install Toolbox as a binary on macOS (Intel):
|
||||
|
||||
```sh
|
||||
# see releases page for other versions
|
||||
export VERSION=0.25.0
|
||||
export VERSION=0.26.0
|
||||
curl -L -o toolbox https://storage.googleapis.com/genai-toolbox/v$VERSION/darwin/amd64/toolbox
|
||||
chmod +x toolbox
|
||||
```
|
||||
@@ -136,7 +136,7 @@ To install Toolbox as a binary on Windows (Command Prompt):
|
||||
|
||||
```cmd
|
||||
:: see releases page for other versions
|
||||
set VERSION=0.25.0
|
||||
set VERSION=0.26.0
|
||||
curl -o toolbox.exe "https://storage.googleapis.com/genai-toolbox/v%VERSION%/windows/amd64/toolbox.exe"
|
||||
```
|
||||
|
||||
@@ -146,7 +146,7 @@ To install Toolbox as a binary on Windows (PowerShell):
|
||||
|
||||
```powershell
|
||||
# see releases page for other versions
|
||||
$VERSION = "0.25.0"
|
||||
$VERSION = "0.26.0"
|
||||
curl.exe -o toolbox.exe "https://storage.googleapis.com/genai-toolbox/v$VERSION/windows/amd64/toolbox.exe"
|
||||
```
|
||||
|
||||
@@ -158,7 +158,7 @@ You can also install Toolbox as a container:
|
||||
|
||||
```sh
|
||||
# see releases page for other versions
|
||||
export VERSION=0.25.0
|
||||
export VERSION=0.26.0
|
||||
docker pull us-central1-docker.pkg.dev/database-toolbox/toolbox/toolbox:$VERSION
|
||||
```
|
||||
|
||||
@@ -177,7 +177,7 @@ To install from source, ensure you have the latest version of
|
||||
[Go installed](https://go.dev/doc/install), and then run the following command:
|
||||
|
||||
```sh
|
||||
go install github.com/googleapis/genai-toolbox@v0.25.0
|
||||
go install github.com/googleapis/genai-toolbox@v0.26.0
|
||||
```
|
||||
|
||||
{{% /tab %}}
|
||||
|
||||
@@ -105,7 +105,7 @@ In this section, we will download Toolbox, configure our tools in a
|
||||
<!-- {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.25.0/$OS/toolbox
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.26.0/$OS/toolbox
|
||||
```
|
||||
<!-- {x-release-please-end} -->
|
||||
|
||||
@@ -125,89 +125,78 @@ In this section, we will download Toolbox, configure our tools in a
|
||||
{{< /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
|
||||
sources:
|
||||
my-pg-source:
|
||||
kind: postgres
|
||||
host: 127.0.0.1
|
||||
port: 5432
|
||||
database: toolbox_db
|
||||
user: toolbox_user
|
||||
password: my-password
|
||||
tools:
|
||||
- search-hotels-by-name
|
||||
- search-hotels-by-location
|
||||
- book-hotel
|
||||
- update-hotel
|
||||
- cancel-hotel
|
||||
search-hotels-by-name:
|
||||
kind: 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 || '%';
|
||||
search-hotels-by-location:
|
||||
kind: 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 || '%';
|
||||
book-hotel:
|
||||
kind: 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;
|
||||
update-hotel:
|
||||
kind: 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;
|
||||
cancel-hotel:
|
||||
kind: 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;
|
||||
toolsets:
|
||||
my-toolset:
|
||||
- search-hotels-by-name
|
||||
- search-hotels-by-location
|
||||
- book-hotel
|
||||
- update-hotel
|
||||
- cancel-hotel
|
||||
```
|
||||
|
||||
For more info on tools, check out the
|
||||
|
||||
@@ -157,67 +157,61 @@ Create a file named `tools.yaml`. This file defines the database connection, the
|
||||
SQL tools available, and the prompts the agents will use.
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-foodiefind-db
|
||||
type: postgres
|
||||
host: 127.0.0.1
|
||||
port: 5432
|
||||
database: toolbox_db
|
||||
user: toolbox_user
|
||||
password: my-password
|
||||
---
|
||||
kind: tools
|
||||
name: find_user_by_email
|
||||
type: postgres-sql
|
||||
source: my-foodiefind-db
|
||||
description: Find a user's ID by their email address.
|
||||
parameters:
|
||||
- name: email
|
||||
type: string
|
||||
description: The email address of the user to find.
|
||||
statement: SELECT id FROM users WHERE email = $1;
|
||||
---
|
||||
kind: tools
|
||||
name: find_restaurant_by_name
|
||||
type: postgres-sql
|
||||
source: my-foodiefind-db
|
||||
description: Find a restaurant's ID by its exact name.
|
||||
parameters:
|
||||
- name: name
|
||||
type: string
|
||||
description: The name of the restaurant to find.
|
||||
statement: SELECT id FROM restaurants WHERE name = $1;
|
||||
---
|
||||
kind: tools
|
||||
name: find_review_by_user_and_restaurant
|
||||
type: postgres-sql
|
||||
source: my-foodiefind-db
|
||||
description: Find the full record for a specific review using the user's ID and the restaurant's ID.
|
||||
parameters:
|
||||
- name: user_id
|
||||
type: integer
|
||||
description: The numerical ID of the user.
|
||||
- name: restaurant_id
|
||||
type: integer
|
||||
description: The numerical ID of the restaurant.
|
||||
statement: SELECT * FROM reviews WHERE user_id = $1 AND restaurant_id = $2;
|
||||
---
|
||||
kind: prompts
|
||||
name: investigate_missing_review
|
||||
description: "Investigates a user's missing review by finding the user, restaurant, and the review itself, then analyzing its status."
|
||||
arguments:
|
||||
- name: "user_email"
|
||||
description: "The email of the user who wrote the review."
|
||||
- name: "restaurant_name"
|
||||
description: "The name of the restaurant being reviewed."
|
||||
messages:
|
||||
- content: >-
|
||||
**Goal:** Find the review written by the user with email '{{.user_email}}' for the restaurant named '{{.restaurant_name}}' and understand its status.
|
||||
**Workflow:**
|
||||
1. Use the `find_user_by_email` tool with the email '{{.user_email}}' to get the `user_id`.
|
||||
2. Use the `find_restaurant_by_name` tool with the name '{{.restaurant_name}}' to get the `restaurant_id`.
|
||||
3. Use the `find_review_by_user_and_restaurant` tool with the `user_id` and `restaurant_id` you just found.
|
||||
4. Analyze the results from the final tool call. Examine the `is_published` and `moderation_status` fields and explain the review's status to the user in a clear, human-readable sentence.
|
||||
sources:
|
||||
my-foodiefind-db:
|
||||
kind: postgres
|
||||
host: 127.0.0.1
|
||||
port: 5432
|
||||
database: toolbox_db
|
||||
user: toolbox_user
|
||||
password: my-password
|
||||
tools:
|
||||
find_user_by_email:
|
||||
kind: postgres-sql
|
||||
source: my-foodiefind-db
|
||||
description: Find a user's ID by their email address.
|
||||
parameters:
|
||||
- name: email
|
||||
type: string
|
||||
description: The email address of the user to find.
|
||||
statement: SELECT id FROM users WHERE email = $1;
|
||||
find_restaurant_by_name:
|
||||
kind: postgres-sql
|
||||
source: my-foodiefind-db
|
||||
description: Find a restaurant's ID by its exact name.
|
||||
parameters:
|
||||
- name: name
|
||||
type: string
|
||||
description: The name of the restaurant to find.
|
||||
statement: SELECT id FROM restaurants WHERE name = $1;
|
||||
find_review_by_user_and_restaurant:
|
||||
kind: postgres-sql
|
||||
source: my-foodiefind-db
|
||||
description: Find the full record for a specific review using the user's ID and the restaurant's ID.
|
||||
parameters:
|
||||
- name: user_id
|
||||
type: integer
|
||||
description: The numerical ID of the user.
|
||||
- name: restaurant_id
|
||||
type: integer
|
||||
description: The numerical ID of the restaurant.
|
||||
statement: SELECT * FROM reviews WHERE user_id = $1 AND restaurant_id = $2;
|
||||
prompts:
|
||||
investigate_missing_review:
|
||||
description: "Investigates a user's missing review by finding the user, restaurant, and the review itself, then analyzing its status."
|
||||
arguments:
|
||||
- name: "user_email"
|
||||
description: "The email of the user who wrote the review."
|
||||
- name: "restaurant_name"
|
||||
description: "The name of the restaurant being reviewed."
|
||||
messages:
|
||||
- content: >-
|
||||
**Goal:** Find the review written by the user with email '{{.user_email}}' for the restaurant named '{{.restaurant_name}}' and understand its status.
|
||||
**Workflow:**
|
||||
1. Use the `find_user_by_email` tool with the email '{{.user_email}}' to get the `user_id`.
|
||||
2. Use the `find_restaurant_by_name` tool with the name '{{.restaurant_name}}' to get the `restaurant_id`.
|
||||
3. Use the `find_review_by_user_and_restaurant` tool with the `user_id` and `restaurant_id` you just found.
|
||||
4. Analyze the results from the final tool call. Examine the `is_published` and `moderation_status` fields and explain the review's status to the user in a clear, human-readable sentence.
|
||||
```
|
||||
|
||||
## Step 3: Connect to Gemini CLI
|
||||
|
||||
@@ -13,7 +13,7 @@ In this section, we will download Toolbox, configure our tools in a
|
||||
<!-- {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.25.0/$OS/toolbox
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.26.0/$OS/toolbox
|
||||
```
|
||||
<!-- {x-release-please-end} -->
|
||||
|
||||
@@ -33,89 +33,78 @@ In this section, we will download Toolbox, configure our tools in a
|
||||
{{< /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
|
||||
sources:
|
||||
my-pg-source:
|
||||
kind: postgres
|
||||
host: 127.0.0.1
|
||||
port: 5432
|
||||
database: toolbox_db
|
||||
user: ${USER_NAME}
|
||||
password: ${PASSWORD}
|
||||
tools:
|
||||
- search-hotels-by-name
|
||||
- search-hotels-by-location
|
||||
- book-hotel
|
||||
- update-hotel
|
||||
- cancel-hotel
|
||||
search-hotels-by-name:
|
||||
kind: 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 || '%';
|
||||
search-hotels-by-location:
|
||||
kind: 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 || '%';
|
||||
book-hotel:
|
||||
kind: 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;
|
||||
update-hotel:
|
||||
kind: 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;
|
||||
cancel-hotel:
|
||||
kind: 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;
|
||||
toolsets:
|
||||
my-toolset:
|
||||
- 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.
|
||||
|
||||
@@ -54,6 +54,7 @@ instance, database and users:
|
||||
* `create_instance`
|
||||
* `create_user`
|
||||
* `clone_instance`
|
||||
* `restore_backup`
|
||||
|
||||
## Install MCP Toolbox
|
||||
|
||||
@@ -301,6 +302,7 @@ instances and interacting with your database:
|
||||
* **wait_for_operation**: Waits for a Cloud SQL operation to complete.
|
||||
* **clone_instance**: Creates a clone of an existing Cloud SQL for SQL Server instance.
|
||||
* **create_backup**: Creates a backup on a Cloud SQL instance.
|
||||
* **restore_backup**: Restores a backup of a Cloud SQL instance.
|
||||
|
||||
{{< notice note >}}
|
||||
Prebuilt tools are pre-1.0, so expect some tool changes between versions. LLMs
|
||||
|
||||
@@ -54,6 +54,7 @@ database and users:
|
||||
* `create_instance`
|
||||
* `create_user`
|
||||
* `clone_instance`
|
||||
* `restore_backup`
|
||||
|
||||
## Install MCP Toolbox
|
||||
|
||||
@@ -301,6 +302,7 @@ instances and interacting with your database:
|
||||
* **wait_for_operation**: Waits for a Cloud SQL operation to complete.
|
||||
* **clone_instance**: Creates a clone of an existing Cloud SQL for MySQL instance.
|
||||
* **create_backup**: Creates a backup on a Cloud SQL instance.
|
||||
* **restore_backup**: Restores a backup of a Cloud SQL instance.
|
||||
|
||||
{{< notice note >}}
|
||||
Prebuilt tools are pre-1.0, so expect some tool changes between versions. LLMs
|
||||
|
||||
@@ -54,6 +54,7 @@ instance, database and users:
|
||||
* `create_instance`
|
||||
* `create_user`
|
||||
* `clone_instance`
|
||||
* `restore_backup`
|
||||
|
||||
## Install MCP Toolbox
|
||||
|
||||
@@ -301,6 +302,7 @@ instances and interacting with your database:
|
||||
* **wait_for_operation**: Waits for a Cloud SQL operation to complete.
|
||||
* **clone_instance**: Creates a clone of an existing Cloud SQL for PostgreSQL instance.
|
||||
* **create_backup**: Creates a backup on a Cloud SQL instance.
|
||||
* **restore_backup**: Restores a backup of a Cloud SQL instance.
|
||||
|
||||
{{< notice note >}}
|
||||
Prebuilt tools are pre-1.0, so expect some tool changes between versions. LLMs
|
||||
|
||||
@@ -100,19 +100,19 @@ After you install Looker in the MCP Store, resources and tools from the server a
|
||||
|
||||
{{< tabpane persist=header >}}
|
||||
{{< tab header="linux/amd64" lang="bash" >}}
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.25.0/linux/amd64/toolbox
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.26.0/linux/amd64/toolbox
|
||||
{{< /tab >}}
|
||||
|
||||
{{< tab header="darwin/arm64" lang="bash" >}}
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.25.0/darwin/arm64/toolbox
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.26.0/darwin/arm64/toolbox
|
||||
{{< /tab >}}
|
||||
|
||||
{{< tab header="darwin/amd64" lang="bash" >}}
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.25.0/darwin/amd64/toolbox
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.26.0/darwin/amd64/toolbox
|
||||
{{< /tab >}}
|
||||
|
||||
{{< tab header="windows/amd64" lang="bash" >}}
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.25.0/windows/amd64/toolbox.exe
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.26.0/windows/amd64/toolbox.exe
|
||||
{{< /tab >}}
|
||||
{{< /tabpane >}}
|
||||
<!-- {x-release-please-end} -->
|
||||
|
||||
@@ -45,19 +45,19 @@ instance:
|
||||
<!-- {x-release-please-start-version} -->
|
||||
{{< tabpane persist=header >}}
|
||||
{{< tab header="linux/amd64" lang="bash" >}}
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.25.0/linux/amd64/toolbox
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.26.0/linux/amd64/toolbox
|
||||
{{< /tab >}}
|
||||
|
||||
{{< tab header="darwin/arm64" lang="bash" >}}
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.25.0/darwin/arm64/toolbox
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.26.0/darwin/arm64/toolbox
|
||||
{{< /tab >}}
|
||||
|
||||
{{< tab header="darwin/amd64" lang="bash" >}}
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.25.0/darwin/amd64/toolbox
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.26.0/darwin/amd64/toolbox
|
||||
{{< /tab >}}
|
||||
|
||||
{{< tab header="windows/amd64" lang="bash" >}}
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.25.0/windows/amd64/toolbox.exe
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.26.0/windows/amd64/toolbox.exe
|
||||
{{< /tab >}}
|
||||
{{< /tabpane >}}
|
||||
<!-- {x-release-please-end} -->
|
||||
|
||||
@@ -43,19 +43,19 @@ expose your developer assistant tools to a MySQL instance:
|
||||
<!-- {x-release-please-start-version} -->
|
||||
{{< tabpane persist=header >}}
|
||||
{{< tab header="linux/amd64" lang="bash" >}}
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.25.0/linux/amd64/toolbox
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.26.0/linux/amd64/toolbox
|
||||
{{< /tab >}}
|
||||
|
||||
{{< tab header="darwin/arm64" lang="bash" >}}
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.25.0/darwin/arm64/toolbox
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.26.0/darwin/arm64/toolbox
|
||||
{{< /tab >}}
|
||||
|
||||
{{< tab header="darwin/amd64" lang="bash" >}}
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.25.0/darwin/amd64/toolbox
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.26.0/darwin/amd64/toolbox
|
||||
{{< /tab >}}
|
||||
|
||||
{{< tab header="windows/amd64" lang="bash" >}}
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.25.0/windows/amd64/toolbox.exe
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.26.0/windows/amd64/toolbox.exe
|
||||
{{< /tab >}}
|
||||
{{< /tabpane >}}
|
||||
<!-- {x-release-please-end} -->
|
||||
|
||||
@@ -44,19 +44,19 @@ expose your developer assistant tools to a Neo4j instance:
|
||||
<!-- {x-release-please-start-version} -->
|
||||
{{< tabpane persist=header >}}
|
||||
{{< tab header="linux/amd64" lang="bash" >}}
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.25.0/linux/amd64/toolbox
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.26.0/linux/amd64/toolbox
|
||||
{{< /tab >}}
|
||||
|
||||
{{< tab header="darwin/arm64" lang="bash" >}}
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.25.0/darwin/arm64/toolbox
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.26.0/darwin/arm64/toolbox
|
||||
{{< /tab >}}
|
||||
|
||||
{{< tab header="darwin/amd64" lang="bash" >}}
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.25.0/darwin/amd64/toolbox
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.26.0/darwin/amd64/toolbox
|
||||
{{< /tab >}}
|
||||
|
||||
{{< tab header="windows/amd64" lang="bash" >}}
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.25.0/windows/amd64/toolbox.exe
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.26.0/windows/amd64/toolbox.exe
|
||||
{{< /tab >}}
|
||||
{{< /tabpane >}}
|
||||
<!-- {x-release-please-end} -->
|
||||
|
||||
@@ -56,19 +56,19 @@ Omni](https://cloud.google.com/alloydb/omni/current/docs/overview).
|
||||
<!-- {x-release-please-start-version} -->
|
||||
{{< tabpane persist=header >}}
|
||||
{{< tab header="linux/amd64" lang="bash" >}}
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.25.0/linux/amd64/toolbox
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.26.0/linux/amd64/toolbox
|
||||
{{< /tab >}}
|
||||
|
||||
{{< tab header="darwin/arm64" lang="bash" >}}
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.25.0/darwin/arm64/toolbox
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.26.0/darwin/arm64/toolbox
|
||||
{{< /tab >}}
|
||||
|
||||
{{< tab header="darwin/amd64" lang="bash" >}}
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.25.0/darwin/amd64/toolbox
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.26.0/darwin/amd64/toolbox
|
||||
{{< /tab >}}
|
||||
|
||||
{{< tab header="windows/amd64" lang="bash" >}}
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.25.0/windows/amd64/toolbox.exe
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.26.0/windows/amd64/toolbox.exe
|
||||
{{< /tab >}}
|
||||
{{< /tabpane >}}
|
||||
<!-- {x-release-please-end} -->
|
||||
|
||||
@@ -43,19 +43,19 @@ to expose your developer assistant tools to a SQLite instance:
|
||||
<!-- {x-release-please-start-version} -->
|
||||
{{< tabpane persist=header >}}
|
||||
{{< tab header="linux/amd64" lang="bash" >}}
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.25.0/linux/amd64/toolbox
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.26.0/linux/amd64/toolbox
|
||||
{{< /tab >}}
|
||||
|
||||
{{< tab header="darwin/arm64" lang="bash" >}}
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.25.0/darwin/arm64/toolbox
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.26.0/darwin/arm64/toolbox
|
||||
{{< /tab >}}
|
||||
|
||||
{{< tab header="darwin/amd64" lang="bash" >}}
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.25.0/darwin/amd64/toolbox
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.26.0/darwin/amd64/toolbox
|
||||
{{< /tab >}}
|
||||
|
||||
{{< tab header="windows/amd64" lang="bash" >}}
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.25.0/windows/amd64/toolbox.exe
|
||||
curl -O https://storage.googleapis.com/genai-toolbox/v0.26.0/windows/amd64/toolbox.exe
|
||||
{{< /tab >}}
|
||||
{{< /tabpane >}}
|
||||
<!-- {x-release-please-end} -->
|
||||
|
||||
@@ -20,6 +20,7 @@ The native SDKs can be combined with MCP clients in many cases.
|
||||
|
||||
Toolbox currently supports the following versions of MCP specification:
|
||||
|
||||
* [2025-11-25](https://modelcontextprotocol.io/specification/2025-11-25)
|
||||
* [2025-06-18](https://modelcontextprotocol.io/specification/2025-06-18)
|
||||
* [2025-03-26](https://modelcontextprotocol.io/specification/2025-03-26)
|
||||
* [2024-11-05](https://modelcontextprotocol.io/specification/2024-11-05)
|
||||
|
||||
@@ -207,6 +207,7 @@ You can connect to Toolbox Cloud Run instances directly through the SDK.
|
||||
{{< tab header="Python" lang="python" >}}
|
||||
import asyncio
|
||||
from toolbox_core import ToolboxClient, auth_methods
|
||||
from toolbox_core.protocol import Protocol
|
||||
|
||||
# Replace with the Cloud Run service URL generated in the previous step
|
||||
URL = "https://cloud-run-url.app"
|
||||
@@ -217,6 +218,7 @@ async def main():
|
||||
async with ToolboxClient(
|
||||
URL,
|
||||
client_headers={"Authorization": auth_token_provider},
|
||||
protocol=Protocol.TOOLBOX,
|
||||
) as toolbox:
|
||||
toolset = await toolbox.load_toolset()
|
||||
# ...
|
||||
@@ -281,3 +283,5 @@ contain the specific error message needed to diagnose the problem.
|
||||
Manager, it means the Toolbox service account is missing permissions.
|
||||
- Ensure the `toolbox-identity` service account has the **Secret Manager
|
||||
Secret Accessor** (`roles/secretmanager.secretAccessor`) IAM role.
|
||||
|
||||
- **Cloud Run Connections via IAP:** Currently we do not support Cloud Run connections via [IAP](https://docs.cloud.google.com/iap/docs/concepts-overview). Please disable IAP if you are using it.
|
||||
@@ -16,7 +16,7 @@ description: >
|
||||
| | `--log-level` | Specify the minimum level logged. Allowed: 'DEBUG', 'INFO', 'WARN', 'ERROR'. | `info` |
|
||||
| | `--logging-format` | Specify logging format to use. Allowed: 'standard' or 'JSON'. | `standard` |
|
||||
| `-p` | `--port` | Port the server will listen on. | `5000` |
|
||||
| | `--prebuilt` | Use a prebuilt tool configuration by source type. See [Prebuilt Tools Reference](prebuilt-tools.md) for allowed values. | |
|
||||
| | `--prebuilt` | Use one or more prebuilt tool configuration by source type. See [Prebuilt Tools Reference](prebuilt-tools.md) for allowed values. | |
|
||||
| | `--stdio` | Listens via MCP STDIO instead of acting as a remote HTTP server. | |
|
||||
| | `--telemetry-gcp` | Enable exporting directly to Google Cloud Monitoring. | |
|
||||
| | `--telemetry-otlp` | Enable exporting using OpenTelemetry Protocol (OTLP) to the specified endpoint (e.g. 'http://127.0.0.1:4318') | |
|
||||
@@ -27,6 +27,7 @@ description: >
|
||||
| | `--ui` | Launches the Toolbox UI web server. | |
|
||||
| | `--allowed-origins` | Specifies a list of origins permitted to access this server for CORs access. | `*` |
|
||||
| | `--allowed-hosts` | Specifies a list of hosts permitted to access this server to prevent DNS rebinding attacks. | `*` |
|
||||
| | `--user-agent-extra` | Appends additional metadata to the User-Agent. | |
|
||||
| `-v` | `--version` | version for toolbox | |
|
||||
|
||||
## Examples
|
||||
@@ -50,6 +51,11 @@ description: >
|
||||
|
||||
# Server with prebuilt + custom tools configurations
|
||||
./toolbox --tools-file tools.yaml --prebuilt alloydb-postgres
|
||||
|
||||
# Server with multiple prebuilt tools configurations
|
||||
./toolbox --prebuilt alloydb-postgres,alloydb-postgres-admin
|
||||
# OR
|
||||
./toolbox --prebuilt alloydb-postgres --prebuilt alloydb-postgres-admin
|
||||
```
|
||||
|
||||
### Tool Configuration Sources
|
||||
@@ -70,7 +76,7 @@ The CLI supports multiple mutually exclusive ways to specify tool configurations
|
||||
|
||||
**Prebuilt Configurations:**
|
||||
|
||||
- `--prebuilt`: Use predefined configurations for specific database types (e.g.,
|
||||
- `--prebuilt`: Use one or more predefined configurations for specific database types (e.g.,
|
||||
'bigquery', 'postgres', 'spanner'). See [Prebuilt Tools
|
||||
Reference](prebuilt-tools.md) for allowed values.
|
||||
|
||||
|
||||
@@ -16,6 +16,9 @@ details on how to connect your AI tools (IDEs) to databases via Toolbox and MCP.
|
||||
{{< notice tip >}}
|
||||
You can now use `--prebuilt` along `--tools-file`, `--tools-files`, or
|
||||
`--tools-folder` to combine prebuilt configs with custom tools.
|
||||
|
||||
You can also combine multiple prebuilt configs.
|
||||
|
||||
See [Usage Examples](../reference/cli.md#examples).
|
||||
{{< /notice >}}
|
||||
|
||||
@@ -194,6 +197,7 @@ See [Usage Examples](../reference/cli.md#examples).
|
||||
* `create_instance`
|
||||
* `create_user`
|
||||
* `clone_instance`
|
||||
* `restore_backup`
|
||||
|
||||
* **Tools:**
|
||||
* `create_instance`: Creates a new Cloud SQL for MySQL instance.
|
||||
@@ -205,6 +209,7 @@ See [Usage Examples](../reference/cli.md#examples).
|
||||
* `wait_for_operation`: Waits for a Cloud SQL operation to complete.
|
||||
* `clone_instance`: Creates a clone for an existing Cloud SQL for MySQL instance.
|
||||
* `create_backup`: Creates a backup on a Cloud SQL instance.
|
||||
* `restore_backup`: Restores a backup of a Cloud SQL instance.
|
||||
|
||||
## Cloud SQL for PostgreSQL
|
||||
|
||||
@@ -284,6 +289,7 @@ See [Usage Examples](../reference/cli.md#examples).
|
||||
* `create_instance`
|
||||
* `create_user`
|
||||
* `clone_instance`
|
||||
* `restore_backup`
|
||||
* **Tools:**
|
||||
* `create_instance`: Creates a new Cloud SQL for PostgreSQL instance.
|
||||
* `get_instance`: Gets information about a Cloud SQL instance.
|
||||
@@ -294,6 +300,7 @@ See [Usage Examples](../reference/cli.md#examples).
|
||||
* `wait_for_operation`: Waits for a Cloud SQL operation to complete.
|
||||
* `clone_instance`: Creates a clone for an existing Cloud SQL for PostgreSQL instance.
|
||||
* `create_backup`: Creates a backup on a Cloud SQL instance.
|
||||
* `restore_backup`: Restores a backup of a Cloud SQL instance.
|
||||
|
||||
## Cloud SQL for SQL Server
|
||||
|
||||
@@ -347,6 +354,7 @@ See [Usage Examples](../reference/cli.md#examples).
|
||||
* `create_instance`
|
||||
* `create_user`
|
||||
* `clone_instance`
|
||||
* `restore_backup`
|
||||
* **Tools:**
|
||||
* `create_instance`: Creates a new Cloud SQL for SQL Server instance.
|
||||
* `get_instance`: Gets information about a Cloud SQL instance.
|
||||
@@ -357,6 +365,7 @@ See [Usage Examples](../reference/cli.md#examples).
|
||||
* `wait_for_operation`: Waits for a Cloud SQL operation to complete.
|
||||
* `clone_instance`: Creates a clone for an existing Cloud SQL for SQL Server instance.
|
||||
* `create_backup`: Creates a backup on a Cloud SQL instance.
|
||||
* `restore_backup`: Restores a backup of a Cloud SQL instance.
|
||||
|
||||
## Dataplex
|
||||
|
||||
|
||||
@@ -28,19 +28,17 @@ The following configurations are placed at the top level of a `tools.yaml` file.
|
||||
{{< notice tip >}}
|
||||
If you are accessing Toolbox with multiple applications, each
|
||||
application should register their own Client ID even if they use the same
|
||||
"type" of auth provider.
|
||||
"kind" of auth provider.
|
||||
{{< /notice >}}
|
||||
|
||||
```yaml
|
||||
kind: authServices
|
||||
name: my_auth_app_1
|
||||
type: google
|
||||
clientId: ${YOUR_CLIENT_ID_1}
|
||||
---
|
||||
kind: authServices
|
||||
name: my_auth_app_2
|
||||
type: google
|
||||
clientId: ${YOUR_CLIENT_ID_2}
|
||||
authServices:
|
||||
my_auth_app_1:
|
||||
kind: google
|
||||
clientId: ${YOUR_CLIENT_ID_1}
|
||||
my_auth_app_2:
|
||||
kind: google
|
||||
clientId: ${YOUR_CLIENT_ID_2}
|
||||
```
|
||||
|
||||
{{< notice tip >}}
|
||||
|
||||
@@ -40,10 +40,10 @@ id-token][provided-claims] can be used for the parameter.
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: authServices
|
||||
name: my-google-auth
|
||||
type: google
|
||||
clientId: ${YOUR_GOOGLE_CLIENT_ID}
|
||||
authServices:
|
||||
my-google-auth:
|
||||
kind: google
|
||||
clientId: ${YOUR_GOOGLE_CLIENT_ID}
|
||||
```
|
||||
|
||||
{{< notice tip >}}
|
||||
@@ -55,5 +55,5 @@ instead of hardcoding your secrets into the configuration file.
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|-----------|:--------:|:------------:|------------------------------------------------------------------|
|
||||
| type | string | true | Must be "google". |
|
||||
| kind | string | true | Must be "google". |
|
||||
| clientId | string | true | Client ID of your application from registering your application. |
|
||||
|
||||
@@ -3,13 +3,14 @@ title: "EmbeddingModels"
|
||||
type: docs
|
||||
weight: 2
|
||||
description: >
|
||||
EmbeddingModels represent services that transform text into vector embeddings for semantic search.
|
||||
EmbeddingModels represent services that transform text into vector embeddings
|
||||
for semantic search.
|
||||
---
|
||||
|
||||
EmbeddingModels represent services that generate vector representations of text
|
||||
data. In the MCP Toolbox, these models enable **Semantic Queries**,
|
||||
allowing [Tools](../tools/) to automatically convert human-readable text into
|
||||
numerical vectors before using them in a query.
|
||||
data. In the MCP Toolbox, these models enable **Semantic Queries**, allowing
|
||||
[Tools](../tools/) to automatically convert human-readable text into numerical
|
||||
vectors before using them in a query.
|
||||
|
||||
This is primarily used in two scenarios:
|
||||
|
||||
@@ -19,14 +20,33 @@ This is primarily used in two scenarios:
|
||||
- **Semantic Search**: Converting a natural language query into a vector to
|
||||
perform similarity searches.
|
||||
|
||||
## Hidden Parameter Duplication (valueFromParam)
|
||||
|
||||
When building tools for vector ingestion, you often need the same input string
|
||||
twice:
|
||||
|
||||
1. To store the original text in a TEXT column.
|
||||
1. To generate the vector embedding for a VECTOR column.
|
||||
|
||||
Requesting an Agent (LLM) to output the exact same string twice is inefficient
|
||||
and error-prone. The `valueFromParam` field solves this by allowing a parameter
|
||||
to inherit its value from another parameter in the same tool.
|
||||
|
||||
### Key Behaviors
|
||||
|
||||
1. Hidden from Manifest: Parameters with valueFromParam set are excluded from
|
||||
the tool definition sent to the Agent. The Agent does not know this parameter
|
||||
exists.
|
||||
1. Auto-Filled: When the tool is executed, the Toolbox automatically copies the
|
||||
value from the referenced parameter before processing embeddings.
|
||||
|
||||
## Example
|
||||
|
||||
The following configuration defines an embedding model and applies it to
|
||||
specific tool parameters.
|
||||
|
||||
{{< notice tip >}}
|
||||
Use environment variable replacement with the format ${ENV_NAME}
|
||||
instead of hardcoding your API keys into the configuration file.
|
||||
{{< notice tip >}} Use environment variable replacement with the format
|
||||
${ENV_NAME} instead of hardcoding your API keys into the configuration file.
|
||||
{{< /notice >}}
|
||||
|
||||
### Step 1 - Define an Embedding Model
|
||||
@@ -34,51 +54,52 @@ instead of hardcoding your API keys into the configuration file.
|
||||
Define an embedding model in the `embeddingModels` section:
|
||||
|
||||
```yaml
|
||||
kind: embeddingModels
|
||||
name: gemini-model: # Name of the embedding model
|
||||
type: gemini
|
||||
model: gemini-embedding-001
|
||||
apiKey: ${GOOGLE_API_KEY}
|
||||
dimension: 768
|
||||
embeddingModels:
|
||||
gemini-model: # Name of the embedding model
|
||||
kind: gemini
|
||||
model: gemini-embedding-001
|
||||
apiKey: ${GOOGLE_API_KEY}
|
||||
dimension: 768
|
||||
```
|
||||
|
||||
### Step 2 - Embed Tool Parameters
|
||||
|
||||
Use the defined embedding model, embed your query parameters using the
|
||||
`embeddedBy` field. Only string-typed
|
||||
parameters can be embedded:
|
||||
`embeddedBy` field. Only string-typed parameters can be embedded:
|
||||
|
||||
```yaml
|
||||
# Vector ingestion tool
|
||||
kind: tools
|
||||
name: insert_embedding
|
||||
type: postgres-sql
|
||||
source: my-pg-instance
|
||||
statement: |
|
||||
INSERT INTO documents (content, embedding)
|
||||
VALUES ($1, $2);
|
||||
parameters:
|
||||
- name: content
|
||||
type: string
|
||||
- name: vector_string
|
||||
type: string
|
||||
description: The text to be vectorized and stored.
|
||||
embeddedBy: gemini-model # refers to the name of a defined embedding model
|
||||
---
|
||||
# Semantic search tool
|
||||
kind: tools
|
||||
name: search_embedding
|
||||
type: postgres-sql
|
||||
source: my-pg-instance
|
||||
statement: |
|
||||
SELECT id, content, embedding <-> $1 AS distance
|
||||
FROM documents
|
||||
ORDER BY distance LIMIT 1
|
||||
parameters:
|
||||
- name: semantic_search_string
|
||||
type: string
|
||||
description: The search query that will be converted to a vector.
|
||||
embeddedBy: gemini-model # refers to the name of a defined embedding model
|
||||
tools:
|
||||
# Vector ingestion tool
|
||||
insert_embedding:
|
||||
kind: postgres-sql
|
||||
source: my-pg-instance
|
||||
statement: |
|
||||
INSERT INTO documents (content, embedding)
|
||||
VALUES ($1, $2);
|
||||
parameters:
|
||||
- name: content
|
||||
type: string
|
||||
description: The raw text content to be stored in the database.
|
||||
- name: vector_string
|
||||
type: string
|
||||
# This parameter is hidden from the LLM.
|
||||
# It automatically copies the value from 'content' and embeds it.
|
||||
valueFromParam: content
|
||||
embeddedBy: gemini-model
|
||||
|
||||
# Semantic search tool
|
||||
search_embedding:
|
||||
kind: postgres-sql
|
||||
source: my-pg-instance
|
||||
statement: |
|
||||
SELECT id, content, embedding <-> $1 AS distance
|
||||
FROM documents
|
||||
ORDER BY distance LIMIT 1
|
||||
parameters:
|
||||
- name: semantic_search_string
|
||||
type: string
|
||||
description: The search query that will be converted to a vector.
|
||||
embeddedBy: gemini-model # refers to the name of a defined embedding model
|
||||
```
|
||||
|
||||
## Kinds of Embedding Models
|
||||
|
||||
@@ -50,12 +50,12 @@ information.
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: embeddingModels
|
||||
name: gemini-model
|
||||
type: gemini
|
||||
model: gemini-embedding-001
|
||||
apiKey: ${GOOGLE_API_KEY}
|
||||
dimension: 768
|
||||
embeddingModels:
|
||||
gemini-model:
|
||||
kind: gemini
|
||||
model: gemini-embedding-001
|
||||
apiKey: ${GOOGLE_API_KEY}
|
||||
dimension: 768
|
||||
```
|
||||
|
||||
{{< notice tip >}}
|
||||
@@ -67,7 +67,7 @@ instead of hardcoding your secrets into the configuration file.
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|-----------|:--------:|:------------:|--------------------------------------------------------------|
|
||||
| type | string | true | Must be `gemini`. |
|
||||
| kind | string | true | Must be `gemini`. |
|
||||
| model | string | true | The Gemini model ID to use (e.g., `gemini-embedding-001`). |
|
||||
| apiKey | string | false | Your API Key from Google AI Studio. |
|
||||
| dimension | integer | false | The number of dimensions in the output vector (e.g., `768`). |
|
||||
|
||||
@@ -16,14 +16,14 @@ can be sent to a Large Language Model (LLM). The Toolbox server implements the
|
||||
specification, allowing clients to discover and retrieve these prompts.
|
||||
|
||||
```yaml
|
||||
kind: prompts
|
||||
name: code_review
|
||||
description: "Asks the LLM to analyze code quality and suggest improvements."
|
||||
messages:
|
||||
- content: "Please review the following code for quality, correctness, and potential improvements: \n\n{{.code}}"
|
||||
arguments:
|
||||
- name: "code"
|
||||
description: "The code to review"
|
||||
prompts:
|
||||
code_review:
|
||||
description: "Asks the LLM to analyze code quality and suggest improvements."
|
||||
messages:
|
||||
- content: "Please review the following code for quality, correctness, and potential improvements: \n\n{{.code}}"
|
||||
arguments:
|
||||
- name: "code"
|
||||
description: "The code to review"
|
||||
```
|
||||
|
||||
## Prompt Schema
|
||||
@@ -31,7 +31,7 @@ messages:
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|-------------|--------------------------------|--------------|--------------------------------------------------------------------------|
|
||||
| description | string | No | A brief explanation of what the prompt does. |
|
||||
| type | string | No | The type of prompt. Defaults to `"custom"`. |
|
||||
| kind | string | No | The kind of prompt. Defaults to `"custom"`. |
|
||||
| messages | [][Message](#message-schema) | Yes | A list of one or more message objects that make up the prompt's content. |
|
||||
| arguments | [][Argument](#argument-schema) | No | A list of arguments that can be interpolated into the prompt's content. |
|
||||
|
||||
|
||||
@@ -17,14 +17,14 @@ Here is an example of a simple prompt that takes a single argument, code, and
|
||||
asks an LLM to review it.
|
||||
|
||||
```yaml
|
||||
kind: prompts
|
||||
name: code_review
|
||||
description: "Asks the LLM to analyze code quality and suggest improvements."
|
||||
messages:
|
||||
- content: "Please review the following code for quality, correctness, and potential improvements: \n\n{{.code}}"
|
||||
arguments:
|
||||
- name: "code"
|
||||
description: "The code to review"
|
||||
prompts:
|
||||
code_review:
|
||||
description: "Asks the LLM to analyze code quality and suggest improvements."
|
||||
messages:
|
||||
- content: "Please review the following code for quality, correctness, and potential improvements: \n\n{{.code}}"
|
||||
arguments:
|
||||
- name: "code"
|
||||
description: "The code to review"
|
||||
```
|
||||
|
||||
### Multi-message prompt
|
||||
@@ -33,19 +33,19 @@ You can define prompts with multiple messages to set up more complex
|
||||
conversational contexts, like a role-playing scenario.
|
||||
|
||||
```yaml
|
||||
kind: prompts
|
||||
name: roleplay_scenario
|
||||
description: "Sets up a roleplaying scenario with initial messages."
|
||||
arguments:
|
||||
- name: "character"
|
||||
description: "The character the AI should embody."
|
||||
- name: "situation"
|
||||
description: "The initial situation for the roleplay."
|
||||
messages:
|
||||
- role: "user"
|
||||
content: "Let's roleplay. You are {{.character}}. The situation is: {{.situation}}"
|
||||
- role: "assistant"
|
||||
content: "Okay, I understand. I am ready. What happens next?"
|
||||
prompts:
|
||||
roleplay_scenario:
|
||||
description: "Sets up a roleplaying scenario with initial messages."
|
||||
arguments:
|
||||
- name: "character"
|
||||
description: "The character the AI should embody."
|
||||
- name: "situation"
|
||||
description: "The initial situation for the roleplay."
|
||||
messages:
|
||||
- role: "user"
|
||||
content: "Let's roleplay. You are {{.character}}. The situation is: {{.situation}}"
|
||||
- role: "assistant"
|
||||
content: "Okay, I understand. I am ready. What happens next?"
|
||||
```
|
||||
|
||||
## Reference
|
||||
@@ -54,7 +54,7 @@ messages:
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|-------------|--------------------------------|--------------|--------------------------------------------------------------------------|
|
||||
| type | string | No | The type of prompt. Must be `"custom"`. |
|
||||
| kind | string | No | The kind of prompt. Must be `"custom"`. |
|
||||
| description | string | No | A brief explanation of what the prompt does. |
|
||||
| messages | [][Message](#message-schema) | Yes | A list of one or more message objects that make up the prompt's content. |
|
||||
| arguments | [][Argument](#argument-schema) | No | A list of arguments that can be interpolated into the prompt's content. |
|
||||
|
||||
@@ -17,15 +17,15 @@ instead of hardcoding your secrets into the configuration file.
|
||||
{{< /notice >}}
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-cloud-sql-source
|
||||
type: cloud-sql-postgres
|
||||
project: my-project-id
|
||||
region: us-central1
|
||||
instance: my-instance-name
|
||||
database: my_db
|
||||
user: ${USER_NAME}
|
||||
password: ${PASSWORD}
|
||||
sources:
|
||||
my-cloud-sql-source:
|
||||
kind: cloud-sql-postgres
|
||||
project: my-project-id
|
||||
region: us-central1
|
||||
instance: my-instance-name
|
||||
database: my_db
|
||||
user: ${USER_NAME}
|
||||
password: ${PASSWORD}
|
||||
```
|
||||
|
||||
In implementation, each source is a different connection pool or client that used
|
||||
|
||||
@@ -25,20 +25,19 @@ Authentication can be handled in two ways:
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-alloydb-admin
|
||||
type: alloy-admin
|
||||
---
|
||||
kind: sources
|
||||
name: my-oauth-alloydb-admin
|
||||
type: alloydb-admin
|
||||
useClientOAuth: true
|
||||
sources:
|
||||
my-alloydb-admin:
|
||||
kind: alloy-admin
|
||||
|
||||
my-oauth-alloydb-admin:
|
||||
kind: alloydb-admin
|
||||
useClientOAuth: true
|
||||
```
|
||||
|
||||
## Reference
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
| -------------- | :------: | :----------: | ---------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| type | string | true | Must be "alloydb-admin". |
|
||||
| kind | string | true | Must be "alloydb-admin". |
|
||||
| defaultProject | string | false | The Google Cloud project ID to use for AlloyDB infrastructure tools. |
|
||||
| useClientOAuth | boolean | false | If true, the source will use client-side OAuth for authorization. Otherwise, it will use Application Default Credentials. Defaults to `false`. |
|
||||
|
||||
@@ -176,17 +176,17 @@ To connect using IAM authentication:
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-alloydb-pg-source
|
||||
type: alloydb-postgres
|
||||
project: my-project-id
|
||||
region: us-central1
|
||||
cluster: my-cluster
|
||||
instance: my-instance
|
||||
database: my_db
|
||||
user: ${USER_NAME}
|
||||
password: ${PASSWORD}
|
||||
# ipType: "public"
|
||||
sources:
|
||||
my-alloydb-pg-source:
|
||||
kind: alloydb-postgres
|
||||
project: my-project-id
|
||||
region: us-central1
|
||||
cluster: my-cluster
|
||||
instance: my-instance
|
||||
database: my_db
|
||||
user: ${USER_NAME}
|
||||
password: ${PASSWORD}
|
||||
# ipType: "public"
|
||||
```
|
||||
|
||||
{{< notice tip >}}
|
||||
@@ -198,7 +198,7 @@ instead of hardcoding your secrets into the configuration file.
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|-----------|:--------:|:------------:|--------------------------------------------------------------------------------------------------------------------------|
|
||||
| type | string | true | Must be "alloydb-postgres". |
|
||||
| kind | string | true | Must be "alloydb-postgres". |
|
||||
| project | string | true | Id of the GCP project that the cluster was created in (e.g. "my-project-id"). |
|
||||
| region | string | true | Name of the GCP region that the cluster was created in (e.g. "us-central1"). |
|
||||
| cluster | string | true | Name of the AlloyDB cluster (e.g. "my-cluster"). |
|
||||
|
||||
@@ -121,47 +121,47 @@ identity used has been granted the correct IAM permissions.
|
||||
Initialize a BigQuery source that uses ADC:
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-bigquery-source
|
||||
type: "bigquery"
|
||||
project: "my-project-id"
|
||||
# location: "US" # Optional: Specifies the location for query jobs.
|
||||
# writeMode: "allowed" # One of: allowed, blocked, protected. Defaults to "allowed".
|
||||
# allowedDatasets: # Optional: Restricts tool access to a specific list of datasets.
|
||||
# - "my_dataset_1"
|
||||
# - "other_project.my_dataset_2"
|
||||
# impersonateServiceAccount: "service-account@project-id.iam.gserviceaccount.com" # Optional: Service account to impersonate
|
||||
# scopes: # Optional: List of OAuth scopes to request.
|
||||
# - "https://www.googleapis.com/auth/bigquery"
|
||||
# - "https://www.googleapis.com/auth/drive.readonly"
|
||||
# maxQueryResultRows: 50 # Optional: Limits the number of rows returned by queries. Defaults to 50.
|
||||
sources:
|
||||
my-bigquery-source:
|
||||
kind: "bigquery"
|
||||
project: "my-project-id"
|
||||
# location: "US" # Optional: Specifies the location for query jobs.
|
||||
# writeMode: "allowed" # One of: allowed, blocked, protected. Defaults to "allowed".
|
||||
# allowedDatasets: # Optional: Restricts tool access to a specific list of datasets.
|
||||
# - "my_dataset_1"
|
||||
# - "other_project.my_dataset_2"
|
||||
# impersonateServiceAccount: "service-account@project-id.iam.gserviceaccount.com" # Optional: Service account to impersonate
|
||||
# scopes: # Optional: List of OAuth scopes to request.
|
||||
# - "https://www.googleapis.com/auth/bigquery"
|
||||
# - "https://www.googleapis.com/auth/drive.readonly"
|
||||
# maxQueryResultRows: 50 # Optional: Limits the number of rows returned by queries. Defaults to 50.
|
||||
```
|
||||
|
||||
Initialize a BigQuery source that uses the client's access token:
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-bigquery-client-auth-source
|
||||
type: "bigquery"
|
||||
project: "my-project-id"
|
||||
useClientOAuth: true
|
||||
# location: "US" # Optional: Specifies the location for query jobs.
|
||||
# writeMode: "allowed" # One of: allowed, blocked, protected. Defaults to "allowed".
|
||||
# allowedDatasets: # Optional: Restricts tool access to a specific list of datasets.
|
||||
# - "my_dataset_1"
|
||||
# - "other_project.my_dataset_2"
|
||||
# impersonateServiceAccount: "service-account@project-id.iam.gserviceaccount.com" # Optional: Service account to impersonate
|
||||
# scopes: # Optional: List of OAuth scopes to request.
|
||||
# - "https://www.googleapis.com/auth/bigquery"
|
||||
# - "https://www.googleapis.com/auth/drive.readonly"
|
||||
# maxQueryResultRows: 50 # Optional: Limits the number of rows returned by queries. Defaults to 50.
|
||||
sources:
|
||||
my-bigquery-client-auth-source:
|
||||
kind: "bigquery"
|
||||
project: "my-project-id"
|
||||
useClientOAuth: true
|
||||
# location: "US" # Optional: Specifies the location for query jobs.
|
||||
# writeMode: "allowed" # One of: allowed, blocked, protected. Defaults to "allowed".
|
||||
# allowedDatasets: # Optional: Restricts tool access to a specific list of datasets.
|
||||
# - "my_dataset_1"
|
||||
# - "other_project.my_dataset_2"
|
||||
# impersonateServiceAccount: "service-account@project-id.iam.gserviceaccount.com" # Optional: Service account to impersonate
|
||||
# scopes: # Optional: List of OAuth scopes to request.
|
||||
# - "https://www.googleapis.com/auth/bigquery"
|
||||
# - "https://www.googleapis.com/auth/drive.readonly"
|
||||
# maxQueryResultRows: 50 # Optional: Limits the number of rows returned by queries. Defaults to 50.
|
||||
```
|
||||
|
||||
## Reference
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|---------------------------|:--------:|:------------:|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| type | string | true | Must be "bigquery". |
|
||||
| kind | string | true | Must be "bigquery". |
|
||||
| project | string | true | Id of the Google Cloud project to use for billing and as the default project for BigQuery resources. |
|
||||
| location | string | false | Specifies the location (e.g., 'us', 'asia-northeast1') in which to run the query job. This location must match the location of any tables referenced in the query. Defaults to the table's location or 'US' if the location cannot be determined. [Learn More](https://cloud.google.com/bigquery/docs/locations) |
|
||||
| writeMode | string | false | Controls the write behavior for tools. `allowed` (default): All queries are permitted. `blocked`: Only `SELECT` statements are allowed for the `bigquery-execute-sql` tool. `protected`: Enables session-based execution where all tools associated with this source instance share the same [BigQuery session](https://cloud.google.com/bigquery/docs/sessions-intro). This allows for stateful operations using temporary tables (e.g., `CREATE TEMP TABLE`). For `bigquery-execute-sql`, `SELECT` statements can be used on all tables, but write operations are restricted to the session's temporary dataset. For tools like `bigquery-sql`, `bigquery-forecast`, and `bigquery-analyze-contribution`, the `writeMode` restrictions do not apply, but they will operate within the shared session. **Note:** The `protected` mode cannot be used with `useClientOAuth: true`. It is also not recommended for multi-user server environments, as all users would share the same session. A session is terminated automatically after 24 hours of inactivity or after 7 days, whichever comes first. A new session is created on the next request, and any temporary data from the previous session will be lost. |
|
||||
|
||||
@@ -59,17 +59,17 @@ applying IAM permissions and roles to an identity.
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-bigtable-source
|
||||
type: "bigtable"
|
||||
project: "my-project-id"
|
||||
instance: "test-instance"
|
||||
sources:
|
||||
my-bigtable-source:
|
||||
kind: "bigtable"
|
||||
project: "my-project-id"
|
||||
instance: "test-instance"
|
||||
```
|
||||
|
||||
## Reference
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|-----------|:--------:|:------------:|-------------------------------------------------------------------------------|
|
||||
| type | string | true | Must be "bigtable". |
|
||||
| kind | string | true | Must be "bigtable". |
|
||||
| project | string | true | Id of the GCP project that the cluster was created in (e.g. "my-project-id"). |
|
||||
| instance | string | true | Name of the Bigtable instance. |
|
||||
|
||||
@@ -23,19 +23,19 @@ distributed architectures, and a flexible approach to schema definition.
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-cassandra-source
|
||||
type: cassandra
|
||||
hosts:
|
||||
- 127.0.0.1
|
||||
keyspace: my_keyspace
|
||||
protoVersion: 4
|
||||
username: ${USER_NAME}
|
||||
password: ${PASSWORD}
|
||||
caPath: /path/to/ca.crt # Optional: path to CA certificate
|
||||
certPath: /path/to/client.crt # Optional: path to client certificate
|
||||
keyPath: /path/to/client.key # Optional: path to client key
|
||||
enableHostVerification: true # Optional: enable host verification
|
||||
sources:
|
||||
my-cassandra-source:
|
||||
kind: cassandra
|
||||
hosts:
|
||||
- 127.0.0.1
|
||||
keyspace: my_keyspace
|
||||
protoVersion: 4
|
||||
username: ${USER_NAME}
|
||||
password: ${PASSWORD}
|
||||
caPath: /path/to/ca.crt # Optional: path to CA certificate
|
||||
certPath: /path/to/client.crt # Optional: path to client certificate
|
||||
keyPath: /path/to/client.key # Optional: path to client key
|
||||
enableHostVerification: true # Optional: enable host verification
|
||||
```
|
||||
|
||||
{{< notice tip >}}
|
||||
@@ -47,7 +47,7 @@ instead of hardcoding your secrets into the configuration file.
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|------------------------|:--------:|:------------:|----------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| type | string | true | Must be "cassandra". |
|
||||
| kind | string | true | Must be "cassandra". |
|
||||
| hosts | string[] | true | List of IP addresses to connect to (e.g., ["192.168.1.1:9042", "192.168.1.2:9042","192.168.1.3:9042"]). The default port is 9042 if not specified. |
|
||||
| keyspace | string | true | Name of the Cassandra keyspace to connect to (e.g., "my_keyspace"). |
|
||||
| protoVersion | integer | false | Protocol version for the Cassandra connection (e.g., 4). |
|
||||
|
||||
@@ -46,31 +46,31 @@ ClickHouse supports multiple protocols:
|
||||
### Secure Connection Example
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: secure-clickhouse-source
|
||||
type: clickhouse
|
||||
host: clickhouse.example.com
|
||||
port: "8443"
|
||||
database: analytics
|
||||
user: ${CLICKHOUSE_USER}
|
||||
password: ${CLICKHOUSE_PASSWORD}
|
||||
protocol: https
|
||||
secure: true
|
||||
sources:
|
||||
secure-clickhouse-source:
|
||||
kind: clickhouse
|
||||
host: clickhouse.example.com
|
||||
port: "8443"
|
||||
database: analytics
|
||||
user: ${CLICKHOUSE_USER}
|
||||
password: ${CLICKHOUSE_PASSWORD}
|
||||
protocol: https
|
||||
secure: true
|
||||
```
|
||||
|
||||
### HTTP Protocol Example
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: http-clickhouse-source
|
||||
type: clickhouse
|
||||
host: localhost
|
||||
port: "8123"
|
||||
database: logs
|
||||
user: ${CLICKHOUSE_USER}
|
||||
password: ${CLICKHOUSE_PASSWORD}
|
||||
protocol: http
|
||||
secure: false
|
||||
sources:
|
||||
http-clickhouse-source:
|
||||
kind: clickhouse
|
||||
host: localhost
|
||||
port: "8123"
|
||||
database: logs
|
||||
user: ${CLICKHOUSE_USER}
|
||||
password: ${CLICKHOUSE_PASSWORD}
|
||||
protocol: http
|
||||
secure: false
|
||||
```
|
||||
|
||||
{{< notice tip >}}
|
||||
@@ -82,7 +82,7 @@ instead of hardcoding your secrets into the configuration file.
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|-----------|:--------:|:------------:|-------------------------------------------------------------------------------------|
|
||||
| type | string | true | Must be "clickhouse". |
|
||||
| kind | string | true | Must be "clickhouse". |
|
||||
| host | string | true | IP address or hostname to connect to (e.g. "127.0.0.1" or "clickhouse.example.com") |
|
||||
| port | string | true | Port to connect to (e.g. "8443" for HTTPS, "8123" for HTTP) |
|
||||
| database | string | true | Name of the ClickHouse database to connect to (e.g. "my_database"). |
|
||||
|
||||
@@ -20,22 +20,21 @@ Authentication can be handled in two ways:
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-gda-source
|
||||
type: cloud-gemini-data-analytics
|
||||
projectId: my-project-id
|
||||
---
|
||||
kind: sources
|
||||
name: my-oauth-gda-source
|
||||
type: cloud-gemini-data-analytics
|
||||
projectId: my-project-id
|
||||
useClientOAuth: true
|
||||
sources:
|
||||
my-gda-source:
|
||||
kind: cloud-gemini-data-analytics
|
||||
projectId: my-project-id
|
||||
|
||||
my-oauth-gda-source:
|
||||
kind: cloud-gemini-data-analytics
|
||||
projectId: my-project-id
|
||||
useClientOAuth: true
|
||||
```
|
||||
|
||||
## Reference
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
| -------------- | :------: | :----------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| type | string | true | Must be "cloud-gemini-data-analytics". |
|
||||
| kind | string | true | Must be "cloud-gemini-data-analytics". |
|
||||
| projectId | string | true | The Google Cloud Project ID where the API is enabled. |
|
||||
| useClientOAuth | boolean | false | If true, the source uses the token provided by the caller (forwarded to the API). Otherwise, it uses server-side Application Default Credentials (ADC). Defaults to `false`. |
|
||||
|
||||
@@ -123,41 +123,41 @@ identity used has been granted the correct IAM permissions.
|
||||
Initialize a Cloud Healthcare API source that uses ADC:
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-healthcare-source
|
||||
type: "cloud-healthcare"
|
||||
project: "my-project-id"
|
||||
region: "us-central1"
|
||||
dataset: "my-healthcare-dataset-id"
|
||||
# allowedFhirStores: # Optional: Restricts tool access to a specific list of FHIR store IDs.
|
||||
# - "my_fhir_store_1"
|
||||
# allowedDicomStores: # Optional: Restricts tool access to a specific list of DICOM store IDs.
|
||||
# - "my_dicom_store_1"
|
||||
# - "my_dicom_store_2"
|
||||
sources:
|
||||
my-healthcare-source:
|
||||
kind: "cloud-healthcare"
|
||||
project: "my-project-id"
|
||||
region: "us-central1"
|
||||
dataset: "my-healthcare-dataset-id"
|
||||
# allowedFhirStores: # Optional: Restricts tool access to a specific list of FHIR store IDs.
|
||||
# - "my_fhir_store_1"
|
||||
# allowedDicomStores: # Optional: Restricts tool access to a specific list of DICOM store IDs.
|
||||
# - "my_dicom_store_1"
|
||||
# - "my_dicom_store_2"
|
||||
```
|
||||
|
||||
Initialize a Cloud Healthcare API source that uses the client's access token:
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-healthcare-client-auth-source
|
||||
type: "cloud-healthcare"
|
||||
project: "my-project-id"
|
||||
region: "us-central1"
|
||||
dataset: "my-healthcare-dataset-id"
|
||||
useClientOAuth: true
|
||||
# allowedFhirStores: # Optional: Restricts tool access to a specific list of FHIR store IDs.
|
||||
# - "my_fhir_store_1"
|
||||
# allowedDicomStores: # Optional: Restricts tool access to a specific list of DICOM store IDs.
|
||||
# - "my_dicom_store_1"
|
||||
# - "my_dicom_store_2"
|
||||
sources:
|
||||
my-healthcare-client-auth-source:
|
||||
kind: "cloud-healthcare"
|
||||
project: "my-project-id"
|
||||
region: "us-central1"
|
||||
dataset: "my-healthcare-dataset-id"
|
||||
useClientOAuth: true
|
||||
# allowedFhirStores: # Optional: Restricts tool access to a specific list of FHIR store IDs.
|
||||
# - "my_fhir_store_1"
|
||||
# allowedDicomStores: # Optional: Restricts tool access to a specific list of DICOM store IDs.
|
||||
# - "my_dicom_store_1"
|
||||
# - "my_dicom_store_2"
|
||||
```
|
||||
|
||||
## Reference
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|--------------------|:--------:|:------------:|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| type | string | true | Must be "cloud-healthcare". |
|
||||
| kind | string | true | Must be "cloud-healthcare". |
|
||||
| project | string | true | ID of the GCP project that the dataset lives in. |
|
||||
| region | string | true | Specifies the region (e.g., 'us', 'asia-northeast1') of the healthcare dataset. [Learn More](https://cloud.google.com/healthcare-api/docs/regions) |
|
||||
| dataset | string | true | ID of the healthcare dataset. |
|
||||
|
||||
@@ -25,19 +25,18 @@ Authentication can be handled in two ways:
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-cloud-monitoring
|
||||
type: cloud-monitoring
|
||||
---
|
||||
kind: sources
|
||||
name: my-oauth-cloud-monitoring
|
||||
type: cloud-monitoring
|
||||
useClientOAuth: true
|
||||
sources:
|
||||
my-cloud-monitoring:
|
||||
kind: cloud-monitoring
|
||||
|
||||
my-oauth-cloud-monitoring:
|
||||
kind: cloud-monitoring
|
||||
useClientOAuth: true
|
||||
```
|
||||
|
||||
## Reference
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|----------------|:--------:|:------------:|------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| type | string | true | Must be "cloud-monitoring". |
|
||||
| kind | string | true | Must be "cloud-monitoring". |
|
||||
| useClientOAuth | boolean | false | If true, the source will use client-side OAuth for authorization. Otherwise, it will use Application Default Credentials. Defaults to `false`. |
|
||||
|
||||
@@ -24,20 +24,19 @@ Authentication can be handled in two ways:
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-cloud-sql-admin
|
||||
type: cloud-sql-admin
|
||||
---
|
||||
kind: sources
|
||||
name: my-oauth-cloud-sql-admin
|
||||
type: cloud-sql-admin
|
||||
useClientOAuth: true
|
||||
sources:
|
||||
my-cloud-sql-admin:
|
||||
kind: cloud-sql-admin
|
||||
|
||||
my-oauth-cloud-sql-admin:
|
||||
kind: cloud-sql-admin
|
||||
useClientOAuth: true
|
||||
```
|
||||
|
||||
## Reference
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
| -------------- | :------: | :----------: | ---------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| type | string | true | Must be "cloud-sql-admin". |
|
||||
| kind | string | true | Must be "cloud-sql-admin". |
|
||||
| defaultProject | string | false | The Google Cloud project ID to use for Cloud SQL infrastructure tools. |
|
||||
| useClientOAuth | boolean | false | If true, the source will use client-side OAuth for authorization. Otherwise, it will use Application Default Credentials. Defaults to `false`. |
|
||||
|
||||
@@ -87,16 +87,16 @@ Currently, this source only uses standard authentication. You will need to
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-cloud-sql-mssql-instance
|
||||
type: cloud-sql-mssql
|
||||
project: my-project
|
||||
region: my-region
|
||||
instance: my-instance
|
||||
database: my_db
|
||||
user: ${USER_NAME}
|
||||
password: ${PASSWORD}
|
||||
# ipType: private
|
||||
sources:
|
||||
my-cloud-sql-mssql-instance:
|
||||
kind: cloud-sql-mssql
|
||||
project: my-project
|
||||
region: my-region
|
||||
instance: my-instance
|
||||
database: my_db
|
||||
user: ${USER_NAME}
|
||||
password: ${PASSWORD}
|
||||
# ipType: private
|
||||
```
|
||||
|
||||
{{< notice tip >}}
|
||||
@@ -108,7 +108,7 @@ instead of hardcoding your secrets into the configuration file.
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|-----------|:--------:|:------------:|------------------------------------------------------------------------------------------------------|
|
||||
| type | string | true | Must be "cloud-sql-mssql". |
|
||||
| kind | string | true | Must be "cloud-sql-mssql". |
|
||||
| project | string | true | Id of the GCP project that the cluster was created in (e.g. "my-project-id"). |
|
||||
| region | string | true | Name of the GCP region that the cluster was created in (e.g. "us-central1"). |
|
||||
| instance | string | true | Name of the Cloud SQL instance within the cluster (e.g. "my-instance"). |
|
||||
|
||||
@@ -128,16 +128,16 @@ To connect using IAM authentication:
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-cloud-sql-mysql-source
|
||||
type: cloud-sql-mysql
|
||||
project: my-project-id
|
||||
region: us-central1
|
||||
instance: my-instance
|
||||
database: my_db
|
||||
user: ${USER_NAME}
|
||||
password: ${PASSWORD}
|
||||
# ipType: "private"
|
||||
sources:
|
||||
my-cloud-sql-mysql-source:
|
||||
kind: cloud-sql-mysql
|
||||
project: my-project-id
|
||||
region: us-central1
|
||||
instance: my-instance
|
||||
database: my_db
|
||||
user: ${USER_NAME}
|
||||
password: ${PASSWORD}
|
||||
# ipType: "private"
|
||||
```
|
||||
|
||||
{{< notice tip >}}
|
||||
@@ -149,7 +149,7 @@ instead of hardcoding your secrets into the configuration file.
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|-----------|:--------:|:------------:|------------------------------------------------------------------------------------------------------|
|
||||
| type | string | true | Must be "cloud-sql-mysql". |
|
||||
| kind | string | true | Must be "cloud-sql-mysql". |
|
||||
| project | string | true | Id of the GCP project that the cluster was created in (e.g. "my-project-id"). |
|
||||
| region | string | true | Name of the GCP region that the cluster was created in (e.g. "us-central1"). |
|
||||
| instance | string | true | Name of the Cloud SQL instance within the cluster (e.g. "my-instance"). |
|
||||
|
||||
@@ -178,16 +178,16 @@ To connect using IAM authentication:
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-cloud-sql-pg-source
|
||||
type: cloud-sql-postgres
|
||||
project: my-project-id
|
||||
region: us-central1
|
||||
instance: my-instance
|
||||
database: my_db
|
||||
user: ${USER_NAME}
|
||||
password: ${PASSWORD}
|
||||
# ipType: "private"
|
||||
sources:
|
||||
my-cloud-sql-pg-source:
|
||||
kind: cloud-sql-postgres
|
||||
project: my-project-id
|
||||
region: us-central1
|
||||
instance: my-instance
|
||||
database: my_db
|
||||
user: ${USER_NAME}
|
||||
password: ${PASSWORD}
|
||||
# ipType: "private"
|
||||
```
|
||||
|
||||
{{< notice tip >}}
|
||||
@@ -199,7 +199,7 @@ instead of hardcoding your secrets into the configuration file.
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|-----------|:--------:|:------------:|--------------------------------------------------------------------------------------------------------------------------|
|
||||
| type | string | true | Must be "cloud-sql-postgres". |
|
||||
| kind | string | true | Must be "cloud-sql-postgres". |
|
||||
| project | string | true | Id of the GCP project that the cluster was created in (e.g. "my-project-id"). |
|
||||
| region | string | true | Name of the GCP region that the cluster was created in (e.g. "us-central1"). |
|
||||
| instance | string | true | Name of the Cloud SQL instance within the cluster (e.g. "my-instance"). |
|
||||
|
||||
@@ -19,14 +19,14 @@ allowing tools to execute SQL queries against it.
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-couchbase-instance
|
||||
type: couchbase
|
||||
connectionString: couchbase://localhost
|
||||
bucket: travel-sample
|
||||
scope: inventory
|
||||
username: Administrator
|
||||
password: password
|
||||
sources:
|
||||
my-couchbase-instance:
|
||||
kind: couchbase
|
||||
connectionString: couchbase://localhost
|
||||
bucket: travel-sample
|
||||
scope: inventory
|
||||
username: Administrator
|
||||
password: password
|
||||
```
|
||||
|
||||
{{< notice note >}}
|
||||
@@ -38,7 +38,7 @@ Connections](https://docs.couchbase.com/java-sdk/current/howtos/managing-connect
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|----------------------|:--------:|:------------:|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| type | string | true | Must be "couchbase". |
|
||||
| kind | string | true | Must be "couchbase". |
|
||||
| connectionString | string | true | Connection string for the Couchbase cluster. |
|
||||
| bucket | string | true | Name of the bucket to connect to. |
|
||||
| scope | string | true | Name of the scope within the bucket. |
|
||||
|
||||
@@ -23,10 +23,10 @@ applying artificial intelligence and machine learning.
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-dataplex-source
|
||||
type: "dataplex"
|
||||
project: "my-project-id"
|
||||
sources:
|
||||
my-dataplex-source:
|
||||
kind: "dataplex"
|
||||
project: "my-project-id"
|
||||
```
|
||||
|
||||
## Sample System Prompt
|
||||
@@ -355,5 +355,5 @@ This abbreviated syntax works for the qualified predicates except for `label` in
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|-----------|:--------:|:------------:|----------------------------------------------------------------------------------|
|
||||
| type | string | true | Must be "dataplex". |
|
||||
| kind | string | true | Must be "dataplex". |
|
||||
| project | string | true | ID of the GCP project used for quota and billing purposes (e.g. "my-project-id").|
|
||||
|
||||
@@ -7,6 +7,17 @@ description: >
|
||||
|
||||
---
|
||||
|
||||
{{< notice note >}}
|
||||
**⚠️ Best Effort Maintenance**
|
||||
|
||||
This integration is maintained on a best-effort basis by the project
|
||||
team/community. While we strive to address issues and provide workarounds when
|
||||
resources are available, there are no guaranteed response times or code fixes.
|
||||
|
||||
The automated integration tests for this module are currently non-functional or
|
||||
failing.
|
||||
{{< /notice >}}
|
||||
|
||||
## About
|
||||
|
||||
[Dgraph][dgraph-docs] is an open-source graph database. It is designed for
|
||||
@@ -40,14 +51,14 @@ and user credentials for that namespace.
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-dgraph-source
|
||||
type: dgraph
|
||||
dgraphUrl: https://xxxx.cloud.dgraph.io
|
||||
user: ${USER_NAME}
|
||||
password: ${PASSWORD}
|
||||
apiKey: ${API_KEY}
|
||||
namespace : 0
|
||||
sources:
|
||||
my-dgraph-source:
|
||||
kind: dgraph
|
||||
dgraphUrl: https://xxxx.cloud.dgraph.io
|
||||
user: ${USER_NAME}
|
||||
password: ${PASSWORD}
|
||||
apiKey: ${API_KEY}
|
||||
namespace : 0
|
||||
```
|
||||
|
||||
{{< notice tip >}}
|
||||
@@ -59,7 +70,7 @@ instead of hardcoding your secrets into the configuration file.
|
||||
|
||||
| **Field** | **Type** | **Required** | **Description** |
|
||||
|-------------|:--------:|:------------:|--------------------------------------------------------------------------------------------------|
|
||||
| type | string | true | Must be "dgraph". |
|
||||
| kind | string | true | Must be "dgraph". |
|
||||
| dgraphUrl | string | true | Connection URI (e.g. "<https://xxx.cloud.dgraph.io>", "<https://localhost:8080>"). |
|
||||
| user | string | false | Name of the Dgraph user to connect as (e.g., "groot"). |
|
||||
| password | string | false | Password of the Dgraph user (e.g., "password"). |
|
||||
|
||||
@@ -59,18 +59,18 @@ applying permissions to an API key.
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-elasticsearch-source
|
||||
type: "elasticsearch"
|
||||
addresses:
|
||||
- "http://localhost:9200"
|
||||
apikey: "my-api-key"
|
||||
sources:
|
||||
my-elasticsearch-source:
|
||||
kind: "elasticsearch"
|
||||
addresses:
|
||||
- "http://localhost:9200"
|
||||
apikey: "my-api-key"
|
||||
```
|
||||
|
||||
## Reference
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|-----------|:--------:|:------------:|--------------------------------------------|
|
||||
| type | string | true | Must be "elasticsearch". |
|
||||
| kind | string | true | Must be "elasticsearch". |
|
||||
| addresses | []string | true | List of Elasticsearch hosts to connect to. |
|
||||
| apikey | string | true | The API key to use for authentication. |
|
||||
|
||||
@@ -36,14 +36,14 @@ user][fb-users] to login to the database with.
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my_firebird_db
|
||||
type: firebird
|
||||
host: "localhost"
|
||||
port: 3050
|
||||
database: "/path/to/your/database.fdb"
|
||||
user: ${FIREBIRD_USER}
|
||||
password: ${FIREBIRD_PASS}
|
||||
sources:
|
||||
my_firebird_db:
|
||||
kind: firebird
|
||||
host: "localhost"
|
||||
port: 3050
|
||||
database: "/path/to/your/database.fdb"
|
||||
user: ${FIREBIRD_USER}
|
||||
password: ${FIREBIRD_PASS}
|
||||
```
|
||||
|
||||
{{< notice tip >}}
|
||||
@@ -55,7 +55,7 @@ instead of hardcoding your secrets into the configuration file.
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|-----------|:--------:|:------------:|------------------------------------------------------------------------------|
|
||||
| type | string | true | Must be "firebird". |
|
||||
| kind | string | true | Must be "firebird". |
|
||||
| host | string | true | IP address to connect to (e.g. "127.0.0.1") |
|
||||
| port | string | true | Port to connect to (e.g. "3050") |
|
||||
| database | string | true | Path to the Firebird database file (e.g. "/var/lib/firebird/data/test.fdb"). |
|
||||
|
||||
@@ -61,17 +61,17 @@ database named `(default)` will be used.
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-firestore-source
|
||||
type: "firestore"
|
||||
project: "my-project-id"
|
||||
# database: "my-database" # Optional, defaults to "(default)"
|
||||
sources:
|
||||
my-firestore-source:
|
||||
kind: "firestore"
|
||||
project: "my-project-id"
|
||||
# database: "my-database" # Optional, defaults to "(default)"
|
||||
```
|
||||
|
||||
## Reference
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|-----------|:--------:|:------------:|----------------------------------------------------------------------------------------------------------|
|
||||
| type | string | true | Must be "firestore". |
|
||||
| kind | string | true | Must be "firestore". |
|
||||
| project | string | true | Id of the GCP project that contains the Firestore database (e.g. "my-project-id"). |
|
||||
| database | string | false | Name of the Firestore database to connect to. Defaults to "(default)" if not specified. |
|
||||
|
||||
@@ -21,18 +21,18 @@ and other HTTP-accessible resources.
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-http-source
|
||||
type: http
|
||||
baseUrl: https://api.example.com/data
|
||||
timeout: 10s # default to 30s
|
||||
headers:
|
||||
Authorization: Bearer ${API_KEY}
|
||||
Content-Type: application/json
|
||||
queryParams:
|
||||
param1: value1
|
||||
param2: value2
|
||||
# disableSslVerification: false
|
||||
sources:
|
||||
my-http-source:
|
||||
kind: http
|
||||
baseUrl: https://api.example.com/data
|
||||
timeout: 10s # default to 30s
|
||||
headers:
|
||||
Authorization: Bearer ${API_KEY}
|
||||
Content-Type: application/json
|
||||
queryParams:
|
||||
param1: value1
|
||||
param2: value2
|
||||
# disableSslVerification: false
|
||||
```
|
||||
|
||||
{{< notice tip >}}
|
||||
@@ -44,7 +44,7 @@ instead of hardcoding your secrets into the configuration file.
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|------------------------|:-----------------:|:------------:|------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| type | string | true | Must be "http". |
|
||||
| kind | string | true | Must be "http". |
|
||||
| baseUrl | string | true | The base URL for the HTTP requests (e.g., `https://api.example.com`). |
|
||||
| timeout | string | false | The timeout for HTTP requests (e.g., "5s", "1m", refer to [ParseDuration][parse-duration-doc] for more examples). Defaults to 30s. |
|
||||
| headers | map[string]string | false | Default headers to include in the HTTP requests. |
|
||||
|
||||
@@ -56,16 +56,16 @@ To initialize the application default credential run `gcloud auth login
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-looker-source
|
||||
type: looker
|
||||
base_url: http://looker.example.com
|
||||
client_id: ${LOOKER_CLIENT_ID}
|
||||
client_secret: ${LOOKER_CLIENT_SECRET}
|
||||
project: ${LOOKER_PROJECT}
|
||||
location: ${LOOKER_LOCATION}
|
||||
verify_ssl: true
|
||||
timeout: 600s
|
||||
sources:
|
||||
my-looker-source:
|
||||
kind: looker
|
||||
base_url: http://looker.example.com
|
||||
client_id: ${LOOKER_CLIENT_ID}
|
||||
client_secret: ${LOOKER_CLIENT_SECRET}
|
||||
project: ${LOOKER_PROJECT}
|
||||
location: ${LOOKER_LOCATION}
|
||||
verify_ssl: true
|
||||
timeout: 600s
|
||||
```
|
||||
|
||||
The Looker base url will look like "https://looker.example.com", don't include
|
||||
@@ -93,7 +93,7 @@ instead of hardcoding your secrets into the configuration file.
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|----------------------|:--------:|:------------:|-----------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| type | string | true | Must be "looker". |
|
||||
| kind | string | true | Must be "looker". |
|
||||
| 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. |
|
||||
|
||||
@@ -45,18 +45,18 @@ MariaDB user][mariadb-users] to log in to the database.
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my_mariadb_db
|
||||
type: mysql
|
||||
host: 127.0.0.1
|
||||
port: 3306
|
||||
database: my_db
|
||||
user: ${MARIADB_USER}
|
||||
password: ${MARIADB_PASS}
|
||||
# Optional TLS and other driver parameters. For example, enable preferred TLS:
|
||||
# queryParams:
|
||||
# tls: preferred
|
||||
queryTimeout: 30s # Optional: query timeout duration
|
||||
sources:
|
||||
my_mariadb_db:
|
||||
kind: mysql
|
||||
host: 127.0.0.1
|
||||
port: 3306
|
||||
database: my_db
|
||||
user: ${MARIADB_USER}
|
||||
password: ${MARIADB_PASS}
|
||||
# Optional TLS and other driver parameters. For example, enable preferred TLS:
|
||||
# queryParams:
|
||||
# tls: preferred
|
||||
queryTimeout: 30s # Optional: query timeout duration
|
||||
```
|
||||
|
||||
{{< notice tip >}}
|
||||
@@ -68,7 +68,7 @@ Use environment variables instead of committing credentials to source files.
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
| ------------ | :------: | :----------: | ----------------------------------------------------------------------------------------------- |
|
||||
| type | string | true | Must be `mysql`. |
|
||||
| kind | string | true | Must be `mysql`. |
|
||||
| host | string | true | IP address to connect to (e.g. "127.0.0.1"). |
|
||||
| port | string | true | Port to connect to (e.g. "3307"). |
|
||||
| database | string | true | Name of the MariaDB database to connect to (e.g. "my_db"). |
|
||||
|
||||
@@ -125,15 +125,15 @@ can omit the password field.
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-mindsdb-source
|
||||
type: mindsdb
|
||||
host: 127.0.0.1
|
||||
port: 3306
|
||||
database: my_db
|
||||
user: ${USER_NAME}
|
||||
password: ${PASSWORD} # Optional: omit if MindsDB is configured without authentication
|
||||
queryTimeout: 30s # Optional: query timeout duration
|
||||
sources:
|
||||
my-mindsdb-source:
|
||||
kind: mindsdb
|
||||
host: 127.0.0.1
|
||||
port: 3306
|
||||
database: my_db
|
||||
user: ${USER_NAME}
|
||||
password: ${PASSWORD} # Optional: omit if MindsDB is configured without authentication
|
||||
queryTimeout: 30s # Optional: query timeout duration
|
||||
```
|
||||
|
||||
### Working Configuration Example
|
||||
@@ -141,13 +141,13 @@ queryTimeout: 30s # Optional: query timeout duration
|
||||
Here's a working configuration that has been tested:
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-pg-source
|
||||
type: mindsdb
|
||||
host: 127.0.0.1
|
||||
port: 47335
|
||||
database: files
|
||||
user: mindsdb
|
||||
sources:
|
||||
my-pg-source:
|
||||
kind: mindsdb
|
||||
host: 127.0.0.1
|
||||
port: 47335
|
||||
database: files
|
||||
user: mindsdb
|
||||
```
|
||||
|
||||
{{< notice tip >}}
|
||||
@@ -176,7 +176,7 @@ With MindsDB integration, you can:
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|--------------|:--------:|:------------:|--------------------------------------------------------------------------------------------------------------|
|
||||
| type | string | true | Must be "mindsdb". |
|
||||
| kind | string | true | Must be "mindsdb". |
|
||||
| host | string | true | IP address to connect to (e.g. "127.0.0.1"). |
|
||||
| port | string | true | Port to connect to (e.g. "3306"). |
|
||||
| database | string | true | Name of the MindsDB database to connect to (e.g. "my_db"). |
|
||||
|
||||
@@ -17,10 +17,10 @@ flexible, JSON-like documents, making it easy to develop and scale applications.
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-mongodb
|
||||
type: mongodb
|
||||
uri: "mongodb+srv://username:password@host.mongodb.net"
|
||||
sources:
|
||||
my-mongodb:
|
||||
kind: mongodb
|
||||
uri: "mongodb+srv://username:password@host.mongodb.net"
|
||||
|
||||
```
|
||||
|
||||
@@ -28,5 +28,5 @@ uri: "mongodb+srv://username:password@host.mongodb.net"
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|-----------|:--------:|:------------:|-------------------------------------------------------------------|
|
||||
| type | string | true | Must be "mongodb". |
|
||||
| kind | string | true | Must be "mongodb". |
|
||||
| uri | string | true | connection string to connect to MongoDB |
|
||||
|
||||
@@ -39,15 +39,15 @@ SQL Server user][mssql-users] to login to the database with.
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-mssql-source
|
||||
type: mssql
|
||||
host: 127.0.0.1
|
||||
port: 1433
|
||||
database: my_db
|
||||
user: ${USER_NAME}
|
||||
password: ${PASSWORD}
|
||||
# encrypt: strict
|
||||
sources:
|
||||
my-mssql-source:
|
||||
kind: mssql
|
||||
host: 127.0.0.1
|
||||
port: 1433
|
||||
database: my_db
|
||||
user: ${USER_NAME}
|
||||
password: ${PASSWORD}
|
||||
# encrypt: strict
|
||||
```
|
||||
|
||||
{{< notice tip >}}
|
||||
@@ -59,7 +59,7 @@ instead of hardcoding your secrets into the configuration file.
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|-----------|:--------:|:------------:|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| type | string | true | Must be "mssql". |
|
||||
| kind | string | true | Must be "mssql". |
|
||||
| host | string | true | IP address to connect to (e.g. "127.0.0.1"). |
|
||||
| port | string | true | Port to connect to (e.g. "1433"). |
|
||||
| database | string | true | Name of the SQL Server database to connect to (e.g. "my_db"). |
|
||||
|
||||
@@ -49,18 +49,18 @@ MySQL user][mysql-users] to login to the database with.
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-mysql-source
|
||||
type: mysql
|
||||
host: 127.0.0.1
|
||||
port: 3306
|
||||
database: my_db
|
||||
user: ${USER_NAME}
|
||||
password: ${PASSWORD}
|
||||
# Optional TLS and other driver parameters. For example, enable preferred TLS:
|
||||
# queryParams:
|
||||
# tls: preferred
|
||||
queryTimeout: 30s # Optional: query timeout duration
|
||||
sources:
|
||||
my-mysql-source:
|
||||
kind: mysql
|
||||
host: 127.0.0.1
|
||||
port: 3306
|
||||
database: my_db
|
||||
user: ${USER_NAME}
|
||||
password: ${PASSWORD}
|
||||
# Optional TLS and other driver parameters. For example, enable preferred TLS:
|
||||
# queryParams:
|
||||
# tls: preferred
|
||||
queryTimeout: 30s # Optional: query timeout duration
|
||||
```
|
||||
|
||||
{{< notice tip >}}
|
||||
@@ -72,7 +72,7 @@ instead of hardcoding your secrets into the configuration file.
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
| ------------ | :------: | :----------: | ----------------------------------------------------------------------------------------------- |
|
||||
| type | string | true | Must be "mysql". |
|
||||
| kind | string | true | Must be "mysql". |
|
||||
| host | string | true | IP address to connect to (e.g. "127.0.0.1"). |
|
||||
| port | string | true | Port to connect to (e.g. "3306"). |
|
||||
| database | string | true | Name of the MySQL database to connect to (e.g. "my_db"). |
|
||||
|
||||
@@ -33,13 +33,13 @@ user if available.
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-neo4j-source
|
||||
type: neo4j
|
||||
uri: neo4j+s://xxxx.databases.neo4j.io:7687
|
||||
user: ${USER_NAME}
|
||||
password: ${PASSWORD}
|
||||
database: "neo4j"
|
||||
sources:
|
||||
my-neo4j-source:
|
||||
kind: neo4j
|
||||
uri: neo4j+s://xxxx.databases.neo4j.io:7687
|
||||
user: ${USER_NAME}
|
||||
password: ${PASSWORD}
|
||||
database: "neo4j"
|
||||
```
|
||||
|
||||
{{< notice tip >}}
|
||||
@@ -51,7 +51,7 @@ instead of hardcoding your secrets into the configuration file.
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|-----------|:--------:|:------------:|----------------------------------------------------------------------|
|
||||
| type | string | true | Must be "neo4j". |
|
||||
| kind | string | true | Must be "neo4j". |
|
||||
| uri | string | true | Connect URI ("bolt://localhost", "neo4j+s://xxx.databases.neo4j.io") |
|
||||
| user | string | true | Name of the Neo4j user to connect as (e.g. "neo4j"). |
|
||||
| password | string | true | Password of the Neo4j user (e.g. "my-password"). |
|
||||
|
||||
@@ -33,15 +33,15 @@ with SSL).
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-oceanbase-source
|
||||
type: oceanbase
|
||||
host: 127.0.0.1
|
||||
port: 2881
|
||||
database: my_db
|
||||
user: ${USER_NAME}
|
||||
password: ${PASSWORD}
|
||||
queryTimeout: 30s # Optional: query timeout duration
|
||||
sources:
|
||||
my-oceanbase-source:
|
||||
kind: oceanbase
|
||||
host: 127.0.0.1
|
||||
port: 2881
|
||||
database: my_db
|
||||
user: ${USER_NAME}
|
||||
password: ${PASSWORD}
|
||||
queryTimeout: 30s # Optional: query timeout duration
|
||||
```
|
||||
|
||||
{{< notice tip >}}
|
||||
@@ -53,7 +53,7 @@ instead of hardcoding your secrets into the configuration file.
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
| ------------ | :------: | :----------: |-------------------------------------------------------------------------------------------------|
|
||||
| type | string | true | Must be "oceanbase". |
|
||||
| kind | string | true | Must be "oceanbase". |
|
||||
| host | string | true | IP address to connect to (e.g. "127.0.0.1"). |
|
||||
| port | string | true | Port to connect to (e.g. "2881"). |
|
||||
| database | string | true | Name of the OceanBase database to connect to (e.g. "my_db"). |
|
||||
|
||||
@@ -90,27 +90,27 @@ using a TNS (Transparent Network Substrate) alias.
|
||||
This example demonstrates the four connection methods you could choose from:
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-oracle-source
|
||||
type: oracle
|
||||
sources:
|
||||
my-oracle-source:
|
||||
kind: oracle
|
||||
|
||||
# --- Choose one connection method ---
|
||||
# 1. Host, Port, and Service Name
|
||||
host: 127.0.0.1
|
||||
port: 1521
|
||||
serviceName: XEPDB1
|
||||
|
||||
# --- Choose one connection method ---
|
||||
# 1. Host, Port, and Service Name
|
||||
host: 127.0.0.1
|
||||
port: 1521
|
||||
serviceName: XEPDB1
|
||||
# 2. Direct Connection String
|
||||
connectionString: "127.0.0.1:1521/XEPDB1"
|
||||
|
||||
# 2. Direct Connection String
|
||||
connectionString: "127.0.0.1:1521/XEPDB1"
|
||||
# 3. TNS Alias (requires tnsnames.ora)
|
||||
tnsAlias: "MY_DB_ALIAS"
|
||||
tnsAdmin: "/opt/oracle/network/admin" # Optional: overrides TNS_ADMIN env var
|
||||
|
||||
# 3. TNS Alias (requires tnsnames.ora)
|
||||
tnsAlias: "MY_DB_ALIAS"
|
||||
tnsAdmin: "/opt/oracle/network/admin" # Optional: overrides TNS_ADMIN env var
|
||||
user: ${USER_NAME}
|
||||
password: ${PASSWORD}
|
||||
|
||||
user: ${USER_NAME}
|
||||
password: ${PASSWORD}
|
||||
|
||||
# Optional: Set to true to use the OCI-based driver for advanced features (Requires Oracle Instant Client)
|
||||
# Optional: Set to true to use the OCI-based driver for advanced features (Requires Oracle Instant Client)
|
||||
```
|
||||
|
||||
### Using an Oracle Wallet
|
||||
@@ -122,15 +122,15 @@ Oracle Wallet allows you to store credentails used for database connection. Depe
|
||||
The `go-ora` driver uses the `walletLocation` field to connect to a database secured with an Oracle Wallet without standard username and password.
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: pure-go-wallet
|
||||
type: oracle
|
||||
connectionString: "127.0.0.1:1521/XEPDB1"
|
||||
user: ${USER_NAME}
|
||||
password: ${PASSWORD}
|
||||
# The TNS Alias is often required to connect to a service registered in tnsnames.ora
|
||||
tnsAlias: "SECURE_DB_ALIAS"
|
||||
walletLocation: "/path/to/my/wallet/directory"
|
||||
sources:
|
||||
pure-go-wallet:
|
||||
kind: oracle
|
||||
connectionString: "127.0.0.1:1521/XEPDB1"
|
||||
user: ${USER_NAME}
|
||||
password: ${PASSWORD}
|
||||
# The TNS Alias is often required to connect to a service registered in tnsnames.ora
|
||||
tnsAlias: "SECURE_DB_ALIAS"
|
||||
walletLocation: "/path/to/my/wallet/directory"
|
||||
```
|
||||
|
||||
#### OCI-Based Driver (`useOCI: true`) - Oracle Wallet
|
||||
@@ -138,15 +138,15 @@ walletLocation: "/path/to/my/wallet/directory"
|
||||
For the OCI-based driver, wallet authentication is triggered by setting tnsAdmin to the wallet directory and connecting via a tnsAlias.
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: oci-wallet
|
||||
type: oracle
|
||||
connectionString: "127.0.0.1:1521/XEPDB1"
|
||||
user: ${USER_NAME}
|
||||
password: ${PASSWORD}
|
||||
tnsAlias: "WALLET_DB_ALIAS"
|
||||
tnsAdmin: "/opt/oracle/wallet" # Directory containing tnsnames.ora, sqlnet.ora, and wallet files
|
||||
useOCI: true
|
||||
sources:
|
||||
oci-wallet:
|
||||
kind: oracle
|
||||
connectionString: "127.0.0.1:1521/XEPDB1"
|
||||
user: ${USER_NAME}
|
||||
password: ${PASSWORD}
|
||||
tnsAlias: "WALLET_DB_ALIAS"
|
||||
tnsAdmin: "/opt/oracle/wallet" # Directory containing tnsnames.ora, sqlnet.ora, and wallet files
|
||||
useOCI: true
|
||||
```
|
||||
|
||||
{{< notice tip >}}
|
||||
@@ -158,7 +158,7 @@ instead of hardcoding your secrets into the configuration file.
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|------------------|:--------:|:------------:|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| type | string | true | Must be "oracle". |
|
||||
| kind | string | true | Must be "oracle". |
|
||||
| user | string | true | Name of the Oracle user to connect as (e.g. "my-oracle-user"). |
|
||||
| password | string | true | Password of the Oracle user (e.g. "my-password"). |
|
||||
| host | string | false | IP address or hostname to connect to (e.g. "127.0.0.1"). Required if not using `connectionString` or `tnsAlias`. |
|
||||
|
||||
@@ -107,14 +107,14 @@ PostgreSQL user][pg-users] to login to the database with.
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-pg-source
|
||||
type: postgres
|
||||
host: 127.0.0.1
|
||||
port: 5432
|
||||
database: my_db
|
||||
user: ${USER_NAME}
|
||||
password: ${PASSWORD}
|
||||
sources:
|
||||
my-pg-source:
|
||||
kind: postgres
|
||||
host: 127.0.0.1
|
||||
port: 5432
|
||||
database: my_db
|
||||
user: ${USER_NAME}
|
||||
password: ${PASSWORD}
|
||||
```
|
||||
|
||||
{{< notice tip >}}
|
||||
@@ -126,7 +126,7 @@ instead of hardcoding your secrets into the configuration file.
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|-------------|:------------------:|:------------:|------------------------------------------------------------------------|
|
||||
| type | string | true | Must be "postgres". |
|
||||
| kind | string | true | Must be "postgres". |
|
||||
| host | string | true | IP address to connect to (e.g. "127.0.0.1") |
|
||||
| port | string | true | Port to connect to (e.g. "5432") |
|
||||
| database | string | true | Name of the Postgres database to connect to (e.g. "my_db"). |
|
||||
|
||||
@@ -34,16 +34,16 @@ connections must authenticate in order to connect.
|
||||
Specify your AUTH string in the password field:
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-redis-instance
|
||||
type: redis
|
||||
address:
|
||||
- 127.0.0.1:6379
|
||||
username: ${MY_USER_NAME}
|
||||
password: ${MY_AUTH_STRING} # Omit this field if you don't have a password.
|
||||
# database: 0
|
||||
# clusterEnabled: false
|
||||
# useGCPIAM: false
|
||||
sources:
|
||||
my-redis-instance:
|
||||
kind: redis
|
||||
address:
|
||||
- 127.0.0.1:6379
|
||||
username: ${MY_USER_NAME}
|
||||
password: ${MY_AUTH_STRING} # Omit this field if you don't have a password.
|
||||
# database: 0
|
||||
# clusterEnabled: false
|
||||
# useGCPIAM: false
|
||||
```
|
||||
|
||||
{{< notice tip >}}
|
||||
@@ -59,14 +59,14 @@ string.
|
||||
Here is an example tools.yaml config with [AUTH][auth] enabled:
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-redis-cluster-instance
|
||||
type: memorystore-redis
|
||||
address:
|
||||
- 127.0.0.1:6379
|
||||
password: ${MY_AUTH_STRING}
|
||||
# useGCPIAM: false
|
||||
# clusterEnabled: false
|
||||
sources:
|
||||
my-redis-cluster-instance:
|
||||
kind: memorystore-redis
|
||||
address:
|
||||
- 127.0.0.1:6379
|
||||
password: ${MY_AUTH_STRING}
|
||||
# useGCPIAM: false
|
||||
# clusterEnabled: false
|
||||
```
|
||||
|
||||
Memorystore Redis Cluster supports IAM authentication instead. Grant your
|
||||
@@ -76,13 +76,13 @@ Here is an example tools.yaml config for Memorystore Redis Cluster instances
|
||||
using IAM authentication:
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-redis-cluster-instance
|
||||
type: memorystore-redis
|
||||
address:
|
||||
- 127.0.0.1:6379
|
||||
useGCPIAM: true
|
||||
clusterEnabled: true
|
||||
sources:
|
||||
my-redis-cluster-instance:
|
||||
kind: memorystore-redis
|
||||
address:
|
||||
- 127.0.0.1:6379
|
||||
useGCPIAM: true
|
||||
clusterEnabled: true
|
||||
```
|
||||
|
||||
[iam]: https://cloud.google.com/memorystore/docs/cluster/about-iam-auth
|
||||
@@ -91,7 +91,7 @@ clusterEnabled: true
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|----------------|:--------:|:------------:|---------------------------------------------------------------------------------------------------------------------------------|
|
||||
| type | string | true | Must be "memorystore-redis". |
|
||||
| kind | string | true | Must be "memorystore-redis". |
|
||||
| address | string | true | Primary endpoint for the Memorystore Redis instance to connect to. |
|
||||
| username | string | false | If you are using a non-default user, specify the user name here. If you are using Memorystore for Redis, leave this field blank |
|
||||
| password | string | false | If you have [Redis AUTH][auth] enabled, specify the AUTH string here |
|
||||
|
||||
@@ -49,17 +49,17 @@ set up your ADC.
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-serverless-spark-source
|
||||
type: serverless-spark
|
||||
project: my-project-id
|
||||
location: us-central1
|
||||
sources:
|
||||
my-serverless-spark-source:
|
||||
kind: serverless-spark
|
||||
project: my-project-id
|
||||
location: us-central1
|
||||
```
|
||||
|
||||
## Reference
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
| --------- | :------: | :----------: | ----------------------------------------------------------------- |
|
||||
| type | string | true | Must be "serverless-spark". |
|
||||
| kind | string | true | Must be "serverless-spark". |
|
||||
| project | string | true | ID of the GCP project with Serverless for Apache Spark resources. |
|
||||
| location | string | true | Location containing Serverless for Apache Spark resources. |
|
||||
|
||||
@@ -39,15 +39,15 @@ database user][singlestore-user] to login to the database with.
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-singlestore-source
|
||||
type: singlestore
|
||||
host: 127.0.0.1
|
||||
port: 3306
|
||||
database: my_db
|
||||
user: ${USER_NAME}
|
||||
password: ${PASSWORD}
|
||||
queryTimeout: 30s # Optional: query timeout duration
|
||||
sources:
|
||||
my-singlestore-source:
|
||||
kind: singlestore
|
||||
host: 127.0.0.1
|
||||
port: 3306
|
||||
database: my_db
|
||||
user: ${USER_NAME}
|
||||
password: ${PASSWORD}
|
||||
queryTimeout: 30s # Optional: query timeout duration
|
||||
```
|
||||
|
||||
{{< notice tip >}}
|
||||
@@ -59,7 +59,7 @@ instead of hardcoding your secrets into the configuration file.
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|--------------|:--------:|:------------:|-------------------------------------------------------------------------------------------------|
|
||||
| type | string | true | Must be "singlestore". |
|
||||
| kind | string | true | Must be "singlestore". |
|
||||
| host | string | true | IP address to connect to (e.g. "127.0.0.1"). |
|
||||
| port | string | true | Port to connect to (e.g. "3306"). |
|
||||
| database | string | true | Name of the SingleStore database to connect to (e.g. "my_db"). |
|
||||
|
||||
@@ -31,16 +31,16 @@ Snowflake user to login to the database with.
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-sf-source
|
||||
type: snowflake
|
||||
account: ${SNOWFLAKE_ACCOUNT}
|
||||
user: ${SNOWFLAKE_USER}
|
||||
password: ${SNOWFLAKE_PASSWORD}
|
||||
database: ${SNOWFLAKE_DATABASE}
|
||||
schema: ${SNOWFLAKE_SCHEMA}
|
||||
warehouse: ${SNOWFLAKE_WAREHOUSE}
|
||||
role: ${SNOWFLAKE_ROLE}
|
||||
sources:
|
||||
my-sf-source:
|
||||
kind: snowflake
|
||||
account: ${SNOWFLAKE_ACCOUNT}
|
||||
user: ${SNOWFLAKE_USER}
|
||||
password: ${SNOWFLAKE_PASSWORD}
|
||||
database: ${SNOWFLAKE_DATABASE}
|
||||
schema: ${SNOWFLAKE_SCHEMA}
|
||||
warehouse: ${SNOWFLAKE_WAREHOUSE}
|
||||
role: ${SNOWFLAKE_ROLE}
|
||||
```
|
||||
|
||||
{{< notice tip >}}
|
||||
@@ -52,7 +52,7 @@ instead of hardcoding your secrets into the configuration file.
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|-----------|:--------:|:------------:|------------------------------------------------------------------------|
|
||||
| type | string | true | Must be "snowflake". |
|
||||
| kind | string | true | Must be "snowflake". |
|
||||
| account | string | true | Your Snowflake account identifier. |
|
||||
| user | string | true | Name of the Snowflake user to connect as (e.g. "my-sf-user"). |
|
||||
| password | string | true | Password of the Snowflake user (e.g. "my-password"). |
|
||||
|
||||
42
docs/en/resources/sources/spanner-admin.md
Normal file
42
docs/en/resources/sources/spanner-admin.md
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
title: Spanner Admin
|
||||
type: docs
|
||||
weight: 1
|
||||
description: "A \"spanner-admin\" source provides a client for the Cloud Spanner Admin API.\n"
|
||||
alias: [/resources/sources/spanner-admin]
|
||||
---
|
||||
|
||||
## About
|
||||
|
||||
The `spanner-admin` source provides a client to interact with the [Google
|
||||
Cloud Spanner Admin API](https://cloud.google.com/spanner/docs/reference/rpc/google.spanner.admin.instance.v1). This
|
||||
allows tools to perform administrative tasks on Spanner instances, such as
|
||||
creating instances.
|
||||
|
||||
Authentication can be handled in two ways:
|
||||
|
||||
1. **Application Default Credentials (ADC):** By default, the source uses ADC
|
||||
to authenticate with the API.
|
||||
2. **Client-side OAuth:** If `useClientOAuth` is set to `true`, the source will
|
||||
expect an OAuth 2.0 access token to be provided by the client (e.g., a web
|
||||
browser) for each request.
|
||||
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
sources:
|
||||
my-spanner-admin:
|
||||
kind: spanner-admin
|
||||
|
||||
my-oauth-spanner-admin:
|
||||
kind: spanner-admin
|
||||
useClientOAuth: true
|
||||
```
|
||||
|
||||
## Reference
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
| -------------- | :------: | :----------: | ---------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| kind | string | true | Must be "spanner-admin". |
|
||||
| defaultProject | string | false | The Google Cloud project ID to use for Spanner infrastructure tools. |
|
||||
| useClientOAuth | boolean | false | If true, the source will use client-side OAuth for authorization. Otherwise, it will use Application Default Credentials. Defaults to `false`. |
|
||||
@@ -64,20 +64,20 @@ applying IAM permissions and roles to an identity.
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-spanner-source
|
||||
type: "spanner"
|
||||
project: "my-project-id"
|
||||
instance: "my-instance"
|
||||
database: "my_db"
|
||||
# dialect: "googlesql"
|
||||
sources:
|
||||
my-spanner-source:
|
||||
kind: "spanner"
|
||||
project: "my-project-id"
|
||||
instance: "my-instance"
|
||||
database: "my_db"
|
||||
# dialect: "googlesql"
|
||||
```
|
||||
|
||||
## Reference
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|-----------|:--------:|:------------:|---------------------------------------------------------------------------------------------------------------------|
|
||||
| type | string | true | Must be "spanner". |
|
||||
| kind | string | true | Must be "spanner". |
|
||||
| project | string | true | Id of the GCP project that the cluster was created in (e.g. "my-project-id"). |
|
||||
| instance | string | true | Name of the Spanner instance. |
|
||||
| database | string | true | Name of the database on the Spanner instance |
|
||||
|
||||
@@ -48,19 +48,19 @@ You need a SQLite database file. This can be:
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-sqlite-db
|
||||
type: "sqlite"
|
||||
database: "/path/to/database.db"
|
||||
sources:
|
||||
my-sqlite-db:
|
||||
kind: "sqlite"
|
||||
database: "/path/to/database.db"
|
||||
```
|
||||
|
||||
For an in-memory database:
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-sqlite-memory-db
|
||||
type: "sqlite"
|
||||
database: ":memory:"
|
||||
sources:
|
||||
my-sqlite-memory-db:
|
||||
kind: "sqlite"
|
||||
database: ":memory:"
|
||||
```
|
||||
|
||||
## Reference
|
||||
@@ -69,7 +69,7 @@ database: ":memory:"
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|-----------|:--------:|:------------:|---------------------------------------------------------------------------------------------------------------------|
|
||||
| type | string | true | Must be "sqlite". |
|
||||
| kind | string | true | Must be "sqlite". |
|
||||
| database | string | true | Path to SQLite database file, or ":memory:" for an in-memory database. |
|
||||
|
||||
### Connection Properties
|
||||
|
||||
@@ -46,29 +46,29 @@ console.
|
||||
- TiDB Cloud
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-tidb-cloud-source
|
||||
type: tidb
|
||||
host: gateway01.us-west-2.prod.aws.tidbcloud.com
|
||||
port: 4000
|
||||
database: my_db
|
||||
user: ${TIDB_USERNAME}
|
||||
password: ${TIDB_PASSWORD}
|
||||
# SSL is automatically enabled for TiDB Cloud
|
||||
sources:
|
||||
my-tidb-cloud-source:
|
||||
kind: tidb
|
||||
host: gateway01.us-west-2.prod.aws.tidbcloud.com
|
||||
port: 4000
|
||||
database: my_db
|
||||
user: ${TIDB_USERNAME}
|
||||
password: ${TIDB_PASSWORD}
|
||||
# SSL is automatically enabled for TiDB Cloud
|
||||
```
|
||||
|
||||
- Self-Hosted TiDB
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-tidb-source
|
||||
type: tidb
|
||||
host: 127.0.0.1
|
||||
port: 4000
|
||||
database: my_db
|
||||
user: ${TIDB_USERNAME}
|
||||
password: ${TIDB_PASSWORD}
|
||||
# ssl: true # Optional: enable SSL for secure connections
|
||||
sources:
|
||||
my-tidb-source:
|
||||
kind: tidb
|
||||
host: 127.0.0.1
|
||||
port: 4000
|
||||
database: my_db
|
||||
user: ${TIDB_USERNAME}
|
||||
password: ${TIDB_PASSWORD}
|
||||
# ssl: true # Optional: enable SSL for secure connections
|
||||
```
|
||||
|
||||
{{< notice tip >}}
|
||||
@@ -80,7 +80,7 @@ instead of hardcoding your secrets into the configuration file.
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|-----------|:--------:|:------------:|--------------------------------------------------------------------------------------------|
|
||||
| type | string | true | Must be "tidb". |
|
||||
| kind | string | true | Must be "tidb". |
|
||||
| host | string | true | IP address or hostname to connect to (e.g. "127.0.0.1" or "gateway01.*.tidbcloud.com"). |
|
||||
| port | string | true | Port to connect to (typically "4000" for TiDB). |
|
||||
| database | string | true | Name of the TiDB database to connect to (e.g. "my_db"). |
|
||||
|
||||
@@ -32,15 +32,15 @@ the catalogs and schemas you want to query.
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-trino-source
|
||||
type: trino
|
||||
host: trino.example.com
|
||||
port: "8080"
|
||||
user: ${TRINO_USER} # Optional for anonymous access
|
||||
password: ${TRINO_PASSWORD} # Optional
|
||||
catalog: hive
|
||||
schema: default
|
||||
sources:
|
||||
my-trino-source:
|
||||
kind: trino
|
||||
host: trino.example.com
|
||||
port: "8080"
|
||||
user: ${TRINO_USER} # Optional for anonymous access
|
||||
password: ${TRINO_PASSWORD} # Optional
|
||||
catalog: hive
|
||||
schema: default
|
||||
```
|
||||
|
||||
{{< notice tip >}}
|
||||
@@ -52,7 +52,7 @@ instead of hardcoding your secrets into the configuration file.
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
| ---------------------- | :------: | :----------: | ---------------------------------------------------------------------------- |
|
||||
| type | string | true | Must be "trino". |
|
||||
| kind | string | true | Must be "trino". |
|
||||
| host | string | true | Trino coordinator hostname (e.g. "trino.example.com") |
|
||||
| port | string | true | Trino coordinator port (e.g. "8080", "8443") |
|
||||
| user | string | false | Username for authentication (e.g. "analyst"). Optional for anonymous access. |
|
||||
|
||||
@@ -27,16 +27,16 @@ the [official Valkey website](https://valkey.io/topics/quickstart/).
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-valkey-instance
|
||||
type: valkey
|
||||
address:
|
||||
- 127.0.0.1:6379
|
||||
username: ${YOUR_USERNAME}
|
||||
password: ${YOUR_PASSWORD}
|
||||
# database: 0
|
||||
# useGCPIAM: false
|
||||
# disableCache: false
|
||||
sources:
|
||||
my-valkey-instance:
|
||||
kind: valkey
|
||||
address:
|
||||
- 127.0.0.1:6379
|
||||
username: ${YOUR_USERNAME}
|
||||
password: ${YOUR_PASSWORD}
|
||||
# database: 0
|
||||
# useGCPIAM: false
|
||||
# disableCache: false
|
||||
```
|
||||
|
||||
{{< notice tip >}}
|
||||
@@ -51,12 +51,12 @@ authentication. Grant your account the required [IAM role][iam] and set
|
||||
`useGCPIAM` to `true`:
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-valkey-instance
|
||||
type: valkey
|
||||
address:
|
||||
- 127.0.0.1:6379
|
||||
useGCPIAM: true
|
||||
sources:
|
||||
my-valkey-instance:
|
||||
kind: valkey
|
||||
address:
|
||||
- 127.0.0.1:6379
|
||||
useGCPIAM: true
|
||||
```
|
||||
|
||||
[iam]: https://cloud.google.com/memorystore/docs/valkey/about-iam-auth
|
||||
@@ -65,7 +65,7 @@ useGCPIAM: true
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|--------------|:--------:|:------------:|----------------------------------------------------------------------------------------------------------------------------------|
|
||||
| type | string | true | Must be "valkey". |
|
||||
| kind | string | true | Must be "valkey". |
|
||||
| address | []string | true | Endpoints for the Valkey instance to connect to. |
|
||||
| username | string | false | If you are using a non-default user, specify the user name here. If you are using Memorystore for Valkey, leave this field blank |
|
||||
| password | string | false | Password for the Valkey instance |
|
||||
|
||||
@@ -17,23 +17,23 @@ compatibility.
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: sources
|
||||
name: my-yb-source
|
||||
type: yugabytedb
|
||||
host: 127.0.0.1
|
||||
port: 5433
|
||||
database: yugabyte
|
||||
user: ${USER_NAME}
|
||||
password: ${PASSWORD}
|
||||
loadBalance: true
|
||||
topologyKeys: cloud.region.zone1:1,cloud.region.zone2:2
|
||||
sources:
|
||||
my-yb-source:
|
||||
kind: yugabytedb
|
||||
host: 127.0.0.1
|
||||
port: 5433
|
||||
database: yugabyte
|
||||
user: ${USER_NAME}
|
||||
password: ${PASSWORD}
|
||||
loadBalance: true
|
||||
topologyKeys: cloud.region.zone1:1,cloud.region.zone2:2
|
||||
```
|
||||
|
||||
## Reference
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|------------------------------|:--------:|:------------:|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| type | string | true | Must be "yugabytedb". |
|
||||
| kind | string | true | Must be "yugabytedb". |
|
||||
| host | string | true | IP address to connect to. |
|
||||
| port | integer | true | Port to connect to. The default port is 5433. |
|
||||
| database | string | true | Name of the YugabyteDB database to connect to. The default database name is yugabyte. |
|
||||
|
||||
@@ -12,41 +12,41 @@ statement. You can define Tools as a map in the `tools` section of your
|
||||
`tools.yaml` file. Typically, a tool will require a source to act on:
|
||||
|
||||
```yaml
|
||||
kind: tools
|
||||
name: search_flights_by_number
|
||||
type: postgres-sql
|
||||
source: my-pg-instance
|
||||
statement: |
|
||||
SELECT * FROM flights
|
||||
WHERE airline = $1
|
||||
AND flight_number = $2
|
||||
LIMIT 10
|
||||
description: |
|
||||
Use this tool to get information for a specific flight.
|
||||
Takes an airline code and flight number and returns info on the flight.
|
||||
Do NOT use this tool with a flight id. Do NOT guess an airline code or flight number.
|
||||
An airline code is a code for an airline service consisting of a two-character
|
||||
airline designator and followed by a flight number, which is a 1 to 4 digit number.
|
||||
For example, if given CY 0123, the airline is "CY", and flight_number is "123".
|
||||
Another example for this is DL 1234, the airline is "DL", and flight_number is "1234".
|
||||
If the tool returns more than one option choose the date closest to today.
|
||||
Example:
|
||||
{{
|
||||
"airline": "CY",
|
||||
"flight_number": "888",
|
||||
}}
|
||||
Example:
|
||||
{{
|
||||
"airline": "DL",
|
||||
"flight_number": "1234",
|
||||
}}
|
||||
parameters:
|
||||
- name: airline
|
||||
type: string
|
||||
description: Airline unique 2 letter identifier
|
||||
- name: flight_number
|
||||
type: string
|
||||
description: 1 to 4 digit number
|
||||
tools:
|
||||
search_flights_by_number:
|
||||
kind: postgres-sql
|
||||
source: my-pg-instance
|
||||
statement: |
|
||||
SELECT * FROM flights
|
||||
WHERE airline = $1
|
||||
AND flight_number = $2
|
||||
LIMIT 10
|
||||
description: |
|
||||
Use this tool to get information for a specific flight.
|
||||
Takes an airline code and flight number and returns info on the flight.
|
||||
Do NOT use this tool with a flight id. Do NOT guess an airline code or flight number.
|
||||
An airline code is a code for an airline service consisting of a two-character
|
||||
airline designator and followed by a flight number, which is a 1 to 4 digit number.
|
||||
For example, if given CY 0123, the airline is "CY", and flight_number is "123".
|
||||
Another example for this is DL 1234, the airline is "DL", and flight_number is "1234".
|
||||
If the tool returns more than one option choose the date closest to today.
|
||||
Example:
|
||||
{{
|
||||
"airline": "CY",
|
||||
"flight_number": "888",
|
||||
}}
|
||||
Example:
|
||||
{{
|
||||
"airline": "DL",
|
||||
"flight_number": "1234",
|
||||
}}
|
||||
parameters:
|
||||
- name: airline
|
||||
type: string
|
||||
description: Airline unique 2 letter identifier
|
||||
- name: flight_number
|
||||
type: string
|
||||
description: 1 to 4 digit number
|
||||
```
|
||||
|
||||
## Specifying Parameters
|
||||
@@ -55,13 +55,13 @@ Parameters for each Tool will define what inputs the agent will need to provide
|
||||
to invoke them. Parameters should be pass as a list of Parameter objects:
|
||||
|
||||
```yaml
|
||||
parameters:
|
||||
- name: airline
|
||||
type: string
|
||||
description: Airline unique 2 letter identifier
|
||||
- name: flight_number
|
||||
type: string
|
||||
description: 1 to 4 digit number
|
||||
parameters:
|
||||
- name: airline
|
||||
type: string
|
||||
description: Airline unique 2 letter identifier
|
||||
- name: flight_number
|
||||
type: string
|
||||
description: 1 to 4 digit number
|
||||
```
|
||||
|
||||
### Basic Parameters
|
||||
@@ -71,10 +71,10 @@ most cases, the description will be provided to the LLM as context on specifying
|
||||
the parameter.
|
||||
|
||||
```yaml
|
||||
parameters:
|
||||
- name: airline
|
||||
type: string
|
||||
description: Airline unique 2 letter identifier
|
||||
parameters:
|
||||
- name: airline
|
||||
type: string
|
||||
description: Airline unique 2 letter identifier
|
||||
```
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
@@ -97,16 +97,16 @@ To use the `array` type, you must also specify what kind of items are
|
||||
in the list using the items field:
|
||||
|
||||
```yaml
|
||||
parameters:
|
||||
- name: preferred_airlines
|
||||
type: array
|
||||
description: A list of airline, ordered by preference.
|
||||
items:
|
||||
name: name
|
||||
type: string
|
||||
description: Name of the airline.
|
||||
statement: |
|
||||
SELECT * FROM airlines WHERE preferred_airlines = ANY($1);
|
||||
parameters:
|
||||
- name: preferred_airlines
|
||||
type: array
|
||||
description: A list of airline, ordered by preference.
|
||||
items:
|
||||
name: name
|
||||
type: string
|
||||
description: Name of the airline.
|
||||
statement: |
|
||||
SELECT * FROM airlines WHERE preferred_airlines = ANY($1);
|
||||
```
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
@@ -141,10 +141,10 @@ This is the default behavior when valueType is omitted. It's useful for passing
|
||||
a flexible group of settings.
|
||||
|
||||
```yaml
|
||||
parameters:
|
||||
- name: execution_context
|
||||
type: map
|
||||
description: A flexible set of key-value pairs for the execution environment.
|
||||
parameters:
|
||||
- name: execution_context
|
||||
type: map
|
||||
description: A flexible set of key-value pairs for the execution environment.
|
||||
```
|
||||
|
||||
#### Typed Map
|
||||
@@ -153,11 +153,11 @@ Specify valueType to ensure all values in the map are of the same type. An error
|
||||
will be thrown in case of value type mismatch.
|
||||
|
||||
```yaml
|
||||
parameters:
|
||||
- name: user_scores
|
||||
type: map
|
||||
description: A map of user IDs to their scores. All scores must be integers.
|
||||
valueType: integer # This enforces the value type for all entries.
|
||||
parameters:
|
||||
- name: user_scores
|
||||
type: map
|
||||
description: A map of user IDs to their scores. All scores must be integers.
|
||||
valueType: integer # This enforces the value type for all entries.
|
||||
```
|
||||
|
||||
### Authenticated Parameters
|
||||
@@ -171,21 +171,21 @@ the required [authServices](../authServices/) to specific claims within the
|
||||
user's ID token.
|
||||
|
||||
```yaml
|
||||
kind: tools
|
||||
name: search_flights_by_user_id
|
||||
type: postgres-sql
|
||||
source: my-pg-instance
|
||||
statement: |
|
||||
SELECT * FROM flights WHERE user_id = $1
|
||||
parameters:
|
||||
- name: user_id
|
||||
type: string
|
||||
description: Auto-populated from Google login
|
||||
authServices:
|
||||
# Refer to one of the `authServices` defined
|
||||
- name: my-google-auth
|
||||
# `sub` is the OIDC claim field for user ID
|
||||
field: sub
|
||||
tools:
|
||||
search_flights_by_user_id:
|
||||
kind: postgres-sql
|
||||
source: my-pg-instance
|
||||
statement: |
|
||||
SELECT * FROM flights WHERE user_id = $1
|
||||
parameters:
|
||||
- name: user_id
|
||||
type: string
|
||||
description: Auto-populated from Google login
|
||||
authServices:
|
||||
# Refer to one of the `authServices` defined
|
||||
- name: my-google-auth
|
||||
# `sub` is the OIDC claim field for user ID
|
||||
field: sub
|
||||
```
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
@@ -222,31 +222,31 @@ can use `minValue` and `maxValue` to define the allowable range.
|
||||
{{< /notice >}}
|
||||
|
||||
```yaml
|
||||
kind: tools
|
||||
name: select_columns_from_table
|
||||
type: postgres-sql
|
||||
source: my-pg-instance
|
||||
statement: |
|
||||
SELECT {{array .columnNames}} FROM {{.tableName}}
|
||||
description: |
|
||||
Use this tool to list all information from a specific table.
|
||||
Example:
|
||||
{{
|
||||
"tableName": "flights",
|
||||
"columnNames": ["id", "name"]
|
||||
}}
|
||||
templateParameters:
|
||||
- name: tableName
|
||||
type: string
|
||||
description: Table to select from
|
||||
- name: columnNames
|
||||
type: array
|
||||
description: The columns to select
|
||||
items:
|
||||
name: column
|
||||
type: string
|
||||
description: Name of a column to select
|
||||
escape: double-quotes # with this, the statement will resolve to `SELECT "id", "name" FROM flights`
|
||||
tools:
|
||||
select_columns_from_table:
|
||||
kind: postgres-sql
|
||||
source: my-pg-instance
|
||||
statement: |
|
||||
SELECT {{array .columnNames}} FROM {{.tableName}}
|
||||
description: |
|
||||
Use this tool to list all information from a specific table.
|
||||
Example:
|
||||
{{
|
||||
"tableName": "flights",
|
||||
"columnNames": ["id", "name"]
|
||||
}}
|
||||
templateParameters:
|
||||
- name: tableName
|
||||
type: string
|
||||
description: Table to select from
|
||||
- name: columnNames
|
||||
type: array
|
||||
description: The columns to select
|
||||
items:
|
||||
name: column
|
||||
type: string
|
||||
description: Name of a column to select
|
||||
escape: double-quotes # with this, the statement will resolve to `SELECT "id", "name" FROM flights`
|
||||
```
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
@@ -267,16 +267,16 @@ specifying an `authRequired` field. Specify a list of
|
||||
[authServices](../authServices/) defined in the previous section.
|
||||
|
||||
```yaml
|
||||
kind: tools
|
||||
name: search_all_flight
|
||||
type: postgres-sql
|
||||
source: my-pg-instance
|
||||
statement: |
|
||||
SELECT * FROM flights
|
||||
# A list of `authServices` defined previously
|
||||
authRequired:
|
||||
- my-google-auth
|
||||
- other-auth-service
|
||||
tools:
|
||||
search_all_flight:
|
||||
kind: postgres-sql
|
||||
source: my-pg-instance
|
||||
statement: |
|
||||
SELECT * FROM flights
|
||||
# A list of `authServices` defined previously
|
||||
authRequired:
|
||||
- my-google-auth
|
||||
- other-auth-service
|
||||
```
|
||||
|
||||
## Kinds of tools
|
||||
|
||||
@@ -40,17 +40,17 @@ The tool takes the following input parameters:
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: tools
|
||||
name: create_cluster
|
||||
type: alloydb-create-cluster
|
||||
source: alloydb-admin-source
|
||||
description: Use this tool to create a new AlloyDB cluster in a given project and location.
|
||||
tools:
|
||||
create_cluster:
|
||||
kind: alloydb-create-cluster
|
||||
source: alloydb-admin-source
|
||||
description: Use this tool to create a new AlloyDB cluster in a given project and location.
|
||||
```
|
||||
|
||||
## Reference
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|-------------|:--------:|:------------:|------------------------------------------------------|
|
||||
| type | string | true | Must be alloydb-create-cluster. |
|
||||
| kind | string | true | Must be alloydb-create-cluster. |
|
||||
| source | string | true | The name of an `alloydb-admin` source. |
|
||||
| description | string | false | Description of the tool that is passed to the agent. |
|
||||
|
||||
@@ -45,17 +45,17 @@ The tool takes the following input parameters:
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: tools
|
||||
name: create_instance
|
||||
type: alloydb-create-instance
|
||||
source: alloydb-admin-source
|
||||
description: Use this tool to create a new AlloyDB instance within a specified cluster.
|
||||
tools:
|
||||
create_instance:
|
||||
kind: alloydb-create-instance
|
||||
source: alloydb-admin-source
|
||||
description: Use this tool to create a new AlloyDB instance within a specified cluster.
|
||||
```
|
||||
|
||||
## Reference
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
| ----------- | :------: | :----------: | ---------------------------------------------------- |
|
||||
| type | string | true | Must be alloydb-create-instance. |
|
||||
| kind | string | true | Must be alloydb-create-instance. |
|
||||
| source | string | true | The name of an `alloydb-admin` source. |
|
||||
| description | string | false | Description of the tool that is passed to the agent. |
|
||||
| description | string | false | Description of the tool that is passed to the agent. |
|
||||
|
||||
@@ -39,17 +39,17 @@ The tool takes the following input parameters:
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: tools
|
||||
name: create_user
|
||||
type: alloydb-create-user
|
||||
source: alloydb-admin-source
|
||||
description: Use this tool to create a new database user for an AlloyDB cluster.
|
||||
tools:
|
||||
create_user:
|
||||
kind: alloydb-create-user
|
||||
source: alloydb-admin-source
|
||||
description: Use this tool to create a new database user for an AlloyDB cluster.
|
||||
```
|
||||
|
||||
## Reference
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
| ----------- | :------: | :----------: | ---------------------------------------------------- |
|
||||
| type | string | true | Must be alloydb-create-user. |
|
||||
| kind | string | true | Must be alloydb-create-user. |
|
||||
| source | string | true | The name of an `alloydb-admin` source. |
|
||||
| description | string | false | Description of the tool that is passed to the agent. |
|
||||
| description | string | false | Description of the tool that is passed to the agent. |
|
||||
|
||||
@@ -3,7 +3,7 @@ title: alloydb-get-cluster
|
||||
type: docs
|
||||
weight: 1
|
||||
description: "The \"alloydb-get-cluster\" tool retrieves details for a specific AlloyDB cluster.\n"
|
||||
alias: [/resources/tools/alloydb-get-cluster]
|
||||
aliases: [/resources/tools/alloydb-get-cluster]
|
||||
---
|
||||
|
||||
## About
|
||||
@@ -21,17 +21,17 @@ specified AlloyDB cluster. It is compatible with
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: tools
|
||||
name: get_specific_cluster
|
||||
type: alloydb-get-cluster
|
||||
source: my-alloydb-admin-source
|
||||
description: Use this tool to retrieve details for a specific AlloyDB cluster.
|
||||
tools:
|
||||
get_specific_cluster:
|
||||
kind: alloydb-get-cluster
|
||||
source: my-alloydb-admin-source
|
||||
description: Use this tool to retrieve details for a specific AlloyDB cluster.
|
||||
```
|
||||
|
||||
## Reference
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
| ----------- | :------: | :----------: | ---------------------------------------------------- |
|
||||
| type | string | true | Must be alloydb-get-cluster. |
|
||||
| kind | string | true | Must be alloydb-get-cluster. |
|
||||
| source | string | true | The name of an `alloydb-admin` source. |
|
||||
| description | string | false | Description of the tool that is passed to the agent. |
|
||||
| description | string | false | Description of the tool that is passed to the agent. |
|
||||
|
||||
@@ -22,17 +22,17 @@ specified AlloyDB instance. It is compatible with
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: tools
|
||||
name: get_specific_instance
|
||||
type: alloydb-get-instance
|
||||
source: my-alloydb-admin-source
|
||||
description: Use this tool to retrieve details for a specific AlloyDB instance.
|
||||
tools:
|
||||
get_specific_instance:
|
||||
kind: alloydb-get-instance
|
||||
source: my-alloydb-admin-source
|
||||
description: Use this tool to retrieve details for a specific AlloyDB instance.
|
||||
```
|
||||
|
||||
## Reference
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|-------------|:--------:|:------------:|------------------------------------------------------|
|
||||
| type | string | true | Must be alloydb-get-instance. |
|
||||
| kind | string | true | Must be alloydb-get-instance. |
|
||||
| source | string | true | The name of an `alloydb-admin` source. |
|
||||
| description | string | false | Description of the tool that is passed to the agent. |
|
||||
| description | string | false | Description of the tool that is passed to the agent. |
|
||||
|
||||
@@ -22,17 +22,17 @@ specified AlloyDB user. It is compatible with
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: tools
|
||||
name: get_specific_user
|
||||
type: alloydb-get-user
|
||||
source: my-alloydb-admin-source
|
||||
description: Use this tool to retrieve details for a specific AlloyDB user.
|
||||
tools:
|
||||
get_specific_user:
|
||||
kind: alloydb-get-user
|
||||
source: my-alloydb-admin-source
|
||||
description: Use this tool to retrieve details for a specific AlloyDB user.
|
||||
```
|
||||
|
||||
## Reference
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
| ----------- | :------: | :----------: | ---------------------------------------------------- |
|
||||
| type | string | true | Must be alloydb-get-user. |
|
||||
| kind | string | true | Must be alloydb-get-user. |
|
||||
| source | string | true | The name of an `alloydb-admin` source. |
|
||||
| description | string | false | Description of the tool that is passed to the agent. |
|
||||
| description | string | false | Description of the tool that is passed to the agent. |
|
||||
|
||||
@@ -24,17 +24,17 @@ location. The tool takes the following input parameters:
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: tools
|
||||
name: list_clusters
|
||||
type: alloydb-list-clusters
|
||||
source: alloydb-admin-source
|
||||
description: Use this tool to list all AlloyDB clusters in a given project and location.
|
||||
tools:
|
||||
list_clusters:
|
||||
kind: alloydb-list-clusters
|
||||
source: alloydb-admin-source
|
||||
description: Use this tool to list all AlloyDB clusters in a given project and location.
|
||||
```
|
||||
|
||||
## Reference
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
| ----------- | :------: | :----------: | ---------------------------------------------------- |
|
||||
| type | string | true | Must be alloydb-list-clusters. |
|
||||
| kind | string | true | Must be alloydb-list-clusters. |
|
||||
| source | string | true | The name of an `alloydb-admin` source. |
|
||||
| description | string | false | Description of the tool that is passed to the agent. |
|
||||
| description | string | false | Description of the tool that is passed to the agent. |
|
||||
|
||||
@@ -26,17 +26,17 @@ parameters:
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: tools
|
||||
name: list_instances
|
||||
type: alloydb-list-instances
|
||||
source: alloydb-admin-source
|
||||
description: Use this tool to list all AlloyDB instances for a given project, cluster and location.
|
||||
tools:
|
||||
list_instances:
|
||||
kind: alloydb-list-instances
|
||||
source: alloydb-admin-source
|
||||
description: Use this tool to list all AlloyDB instances for a given project, cluster and location.
|
||||
```
|
||||
|
||||
## Reference
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
| ----------- | :------: | :----------: | ---------------------------------------------------- |
|
||||
| type | string | true | Must be alloydb-list-instances. |
|
||||
| kind | string | true | Must be alloydb-list-instances. |
|
||||
| source | string | true | The name of an `alloydb-admin` source. |
|
||||
| description | string | false | Description of the tool that is passed to the agent. |
|
||||
|
||||
@@ -22,17 +22,17 @@ The tool takes the following input parameters:
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: tools
|
||||
name: list_users
|
||||
type: alloydb-list-users
|
||||
source: alloydb-admin-source
|
||||
description: Use this tool to list all database users within an AlloyDB cluster
|
||||
tools:
|
||||
list_users:
|
||||
kind: alloydb-list-users
|
||||
source: alloydb-admin-source
|
||||
description: Use this tool to list all database users within an AlloyDB cluster
|
||||
```
|
||||
|
||||
## Reference
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
| ----------- | :------: | :----------: | ---------------------------------------------------- |
|
||||
| type | string | true | Must be alloydb-list-users. |
|
||||
| kind | string | true | Must be alloydb-list-users. |
|
||||
| source | string | true | The name of an `alloydb-admin` source. |
|
||||
| description | string | false | Description of the tool that is passed to the agent. |
|
||||
|
||||
@@ -25,22 +25,22 @@ and shouldn't be used for production agents.
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: tools
|
||||
name: wait_for_operation
|
||||
type: alloydb-wait-for-operation
|
||||
source: my-alloydb-admin-source
|
||||
description: "This will poll on operations API until the operation is done. For checking operation status we need projectId, locationID and operationId. Once instance is created give follow up steps on how to use the variables to bring data plane MCP server up in local and remote setup."
|
||||
delay: 1s
|
||||
maxDelay: 4m
|
||||
multiplier: 2
|
||||
maxRetries: 10
|
||||
tools:
|
||||
wait_for_operation:
|
||||
kind: alloydb-wait-for-operation
|
||||
source: my-alloydb-admin-source
|
||||
description: "This will poll on operations API until the operation is done. For checking operation status we need projectId, locationID and operationId. Once instance is created give follow up steps on how to use the variables to bring data plane MCP server up in local and remote setup."
|
||||
delay: 1s
|
||||
maxDelay: 4m
|
||||
multiplier: 2
|
||||
maxRetries: 10
|
||||
```
|
||||
|
||||
## Reference
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
| ----------- | :------: | :----------: | ---------------------------------------------------------------------------------------------------------------- |
|
||||
| type | string | true | Must be "alloydb-wait-for-operation". |
|
||||
| kind | string | true | Must be "alloydb-wait-for-operation". |
|
||||
| source | string | true | The name of a `alloydb-admin` source to use for authentication. |
|
||||
| description | string | false | A description of the tool. |
|
||||
| delay | duration | false | The initial delay between polling requests (e.g., `3s`). Defaults to 3 seconds. |
|
||||
|
||||
@@ -103,29 +103,29 @@ CREATE EXTENSION IF NOT EXISTS parameterized_views;
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: tools
|
||||
name: ask_questions
|
||||
type: alloydb-ai-nl
|
||||
source: my-alloydb-source
|
||||
description: "Ask questions to check information about flights"
|
||||
nlConfig: "cymbal_air_nl_config"
|
||||
nlConfigParameters:
|
||||
- name: user_email
|
||||
type: string
|
||||
description: User ID of the logged in user.
|
||||
# note: we strongly recommend using features like Authenticated or
|
||||
# Bound parameters to prevent the LLM from seeing these params and
|
||||
# specifying values it shouldn't in the tool input
|
||||
authServices:
|
||||
- name: my_google_service
|
||||
field: email
|
||||
tools:
|
||||
ask_questions:
|
||||
kind: alloydb-ai-nl
|
||||
source: my-alloydb-source
|
||||
description: "Ask questions to check information about flights"
|
||||
nlConfig: "cymbal_air_nl_config"
|
||||
nlConfigParameters:
|
||||
- name: user_email
|
||||
type: string
|
||||
description: User ID of the logged in user.
|
||||
# note: we strongly recommend using features like Authenticated or
|
||||
# Bound parameters to prevent the LLM from seeing these params and
|
||||
# specifying values it shouldn't in the tool input
|
||||
authServices:
|
||||
- name: my_google_service
|
||||
field: email
|
||||
```
|
||||
|
||||
## Reference
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|--------------------|:---------------------------------------:|:------------:|--------------------------------------------------------------------------|
|
||||
| type | string | true | Must be "alloydb-ai-nl". |
|
||||
| kind | string | true | Must be "alloydb-ai-nl". |
|
||||
| source | string | true | Name of the AlloyDB source the natural language query should execute on. |
|
||||
| description | string | true | Description of the tool that is passed to the LLM. |
|
||||
| nlConfig | string | true | The name of the `nl_config` in AlloyDB |
|
||||
|
||||
@@ -64,11 +64,11 @@ the `bigquery` source:
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: tools
|
||||
name: contribution_analyzer
|
||||
type: bigquery-analyze-contribution
|
||||
source: my-bigquery-source
|
||||
description: Use this tool to run contribution analysis on a dataset in BigQuery.
|
||||
tools:
|
||||
contribution_analyzer:
|
||||
kind: bigquery-analyze-contribution
|
||||
source: my-bigquery-source
|
||||
description: Use this tool to run contribution analysis on a dataset in BigQuery.
|
||||
```
|
||||
|
||||
## Sample Prompt
|
||||
@@ -88,6 +88,6 @@ And use the following sample prompts to call this tool:
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|-------------|:--------:|:------------:|----------------------------------------------------|
|
||||
| type | string | true | Must be "bigquery-analyze-contribution". |
|
||||
| kind | string | true | Must be "bigquery-analyze-contribution". |
|
||||
| source | string | true | Name of the source the tool should execute on. |
|
||||
| description | string | true | Description of the tool that is passed to the LLM. |
|
||||
|
||||
@@ -53,19 +53,19 @@ dataset specified in the `table_references` parameter.
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: tools
|
||||
name: ask_data_insights
|
||||
type: bigquery-conversational-analytics
|
||||
source: my-bigquery-source
|
||||
description: |
|
||||
Use this tool to perform data analysis, get insights, or answer complex
|
||||
questions about the contents of specific BigQuery tables.
|
||||
tools:
|
||||
ask_data_insights:
|
||||
kind: bigquery-conversational-analytics
|
||||
source: my-bigquery-source
|
||||
description: |
|
||||
Use this tool to perform data analysis, get insights, or answer complex
|
||||
questions about the contents of specific BigQuery tables.
|
||||
```
|
||||
|
||||
## Reference
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|-------------|:--------:|:------------:|----------------------------------------------------|
|
||||
| type | string | true | Must be "bigquery-conversational-analytics". |
|
||||
| kind | string | true | Must be "bigquery-conversational-analytics". |
|
||||
| source | string | true | Name of the source for chat. |
|
||||
| description | string | true | Description of the tool that is passed to the LLM. |
|
||||
|
||||
@@ -54,17 +54,17 @@ layer of security by controlling which datasets can be accessed:
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: tools
|
||||
name: execute_sql_tool
|
||||
type: bigquery-execute-sql
|
||||
source: my-bigquery-source
|
||||
description: Use this tool to execute sql statement.
|
||||
tools:
|
||||
execute_sql_tool:
|
||||
kind: bigquery-execute-sql
|
||||
source: my-bigquery-source
|
||||
description: Use this tool to execute sql statement.
|
||||
```
|
||||
|
||||
## Reference
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|-------------|:--------:|:------------:|----------------------------------------------------|
|
||||
| type | string | true | Must be "bigquery-execute-sql". |
|
||||
| kind | string | true | Must be "bigquery-execute-sql". |
|
||||
| source | string | true | Name of the source the SQL should execute on. |
|
||||
| description | string | true | Description of the tool that is passed to the LLM. |
|
||||
|
||||
@@ -58,11 +58,11 @@ the `bigquery` source:
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: tools
|
||||
name: forecast_tool
|
||||
type: bigquery-forecast
|
||||
source: my-bigquery-source
|
||||
description: Use this tool to forecast time series data in BigQuery.
|
||||
tools:
|
||||
forecast_tool:
|
||||
kind: bigquery-forecast
|
||||
source: my-bigquery-source
|
||||
description: Use this tool to forecast time series data in BigQuery.
|
||||
```
|
||||
|
||||
## Sample Prompt
|
||||
@@ -78,6 +78,6 @@ You can use the following sample prompts to call this tool:
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|-------------|:--------:|:------------:|---------------------------------------------------------|
|
||||
| type | string | true | Must be "bigquery-forecast". |
|
||||
| kind | string | true | Must be "bigquery-forecast". |
|
||||
| source | string | true | Name of the source the forecast tool should execute on. |
|
||||
| description | string | true | Description of the tool that is passed to the LLM. |
|
||||
|
||||
@@ -34,17 +34,17 @@ The tool's behavior regarding these parameters is influenced by the
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: tools
|
||||
name: bigquery_get_dataset_info
|
||||
type: bigquery-get-dataset-info
|
||||
source: my-bigquery-source
|
||||
description: Use this tool to get dataset metadata.
|
||||
tools:
|
||||
bigquery_get_dataset_info:
|
||||
kind: bigquery-get-dataset-info
|
||||
source: my-bigquery-source
|
||||
description: Use this tool to get dataset metadata.
|
||||
```
|
||||
|
||||
## Reference
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|-------------|:------------------------------------------:|:------------:|--------------------------------------------------------------------------------------------------|
|
||||
| type | string | true | Must be "bigquery-get-dataset-info". |
|
||||
| kind | string | true | Must be "bigquery-get-dataset-info". |
|
||||
| source | string | true | Name of the source the SQL should execute on. |
|
||||
| description | string | true | Description of the tool that is passed to the LLM. |
|
||||
|
||||
@@ -35,17 +35,17 @@ The tool's behavior regarding these parameters is influenced by the
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: tools
|
||||
name: bigquery_get_table_info
|
||||
type: bigquery-get-table-info
|
||||
source: my-bigquery-source
|
||||
description: Use this tool to get table metadata.
|
||||
tools:
|
||||
bigquery_get_table_info:
|
||||
kind: bigquery-get-table-info
|
||||
source: my-bigquery-source
|
||||
description: Use this tool to get table metadata.
|
||||
```
|
||||
|
||||
## Reference
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|-------------|:------------------------------------------:|:------------:|--------------------------------------------------------------------------------------------------|
|
||||
| type | string | true | Must be "bigquery-get-table-info". |
|
||||
| kind | string | true | Must be "bigquery-get-table-info". |
|
||||
| source | string | true | Name of the source the SQL should execute on. |
|
||||
| description | string | true | Description of the tool that is passed to the LLM. |
|
||||
|
||||
@@ -32,17 +32,17 @@ The tool's behavior regarding this parameter is influenced by the
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: tools
|
||||
name: bigquery_list_dataset_ids
|
||||
type: bigquery-list-dataset-ids
|
||||
source: my-bigquery-source
|
||||
description: Use this tool to get dataset metadata.
|
||||
tools:
|
||||
bigquery_list_dataset_ids:
|
||||
kind: bigquery-list-dataset-ids
|
||||
source: my-bigquery-source
|
||||
description: Use this tool to get dataset metadata.
|
||||
```
|
||||
|
||||
## Reference
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|-------------|:------------------------------------------:|:------------:|--------------------------------------------------------------------------------------------------|
|
||||
| type | string | true | Must be "bigquery-list-dataset-ids". |
|
||||
| kind | string | true | Must be "bigquery-list-dataset-ids". |
|
||||
| source | string | true | Name of the source the SQL should execute on. |
|
||||
| description | string | true | Description of the tool that is passed to the LLM. |
|
||||
|
||||
@@ -34,17 +34,17 @@ will be used as the default value for the `dataset` parameter.
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
kind: tools
|
||||
name: bigquery_list_table_ids
|
||||
type: bigquery-list-table-ids
|
||||
source: my-bigquery-source
|
||||
description: Use this tool to get table metadata.
|
||||
tools:
|
||||
bigquery_list_table_ids:
|
||||
kind: bigquery-list-table-ids
|
||||
source: my-bigquery-source
|
||||
description: Use this tool to get table metadata.
|
||||
```
|
||||
|
||||
## Reference
|
||||
|
||||
| **field** | **type** | **required** | **description** |
|
||||
|-------------|:------------------------------------------:|:------------:|--------------------------------------------------------------------------------------------------|
|
||||
| type | string | true | Must be "bigquery-list-table-ids". |
|
||||
| kind | string | true | Must be "bigquery-list-table-ids". |
|
||||
| source | string | true | Name of the source the SQL should execute on. |
|
||||
| description | string | true | Description of the tool that is passed to the LLM. |
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user