This is page 5 of 76. Use http://codebase.md/googleapis/genai-toolbox?lines=true&page={x} to view the full context.
# Directory Structure
```
├── .ci
│ ├── continuous.release.cloudbuild.yaml
│ ├── generate_release_table.sh
│ ├── integration.cloudbuild.yaml
│ ├── quickstart_test
│ │ ├── go.integration.cloudbuild.yaml
│ │ ├── js.integration.cloudbuild.yaml
│ │ ├── py.integration.cloudbuild.yaml
│ │ ├── run_go_tests.sh
│ │ ├── run_js_tests.sh
│ │ ├── run_py_tests.sh
│ │ └── setup_hotels_sample.sql
│ ├── test_prompts_with_coverage.sh
│ ├── test_with_coverage.sh
│ └── versioned.release.cloudbuild.yaml
├── .gemini
│ └── config.yaml
├── .github
│ ├── auto-label.yaml
│ ├── blunderbuss.yml
│ ├── CODEOWNERS
│ ├── header-checker-lint.yml
│ ├── ISSUE_TEMPLATE
│ │ ├── bug_report.yml
│ │ ├── config.yml
│ │ ├── feature_request.yml
│ │ └── question.yml
│ ├── label-sync.yml
│ ├── labels.yaml
│ ├── PULL_REQUEST_TEMPLATE.md
│ ├── release-please.yml
│ ├── renovate.json5
│ ├── sync-repo-settings.yaml
│ ├── trusted-contribution.yml
│ └── workflows
│ ├── cloud_build_failure_reporter.yml
│ ├── deploy_dev_docs.yaml
│ ├── deploy_previous_version_docs.yaml
│ ├── deploy_versioned_docs.yaml
│ ├── docs_preview_clean.yaml
│ ├── docs_preview_deploy.yaml
│ ├── link_checker_workflow.yaml
│ ├── lint.yaml
│ ├── publish-mcp.yml
│ ├── schedule_reporter.yml
│ ├── sync-labels.yaml
│ └── tests.yaml
├── .gitignore
├── .gitmodules
├── .golangci.yaml
├── .hugo
│ ├── archetypes
│ │ └── default.md
│ ├── assets
│ │ ├── icons
│ │ │ └── logo.svg
│ │ └── scss
│ │ ├── _styles_project.scss
│ │ └── _variables_project.scss
│ ├── go.mod
│ ├── go.sum
│ ├── hugo.toml
│ ├── layouts
│ │ ├── _default
│ │ │ └── home.releases.releases
│ │ ├── index.llms-full.txt
│ │ ├── index.llms.txt
│ │ ├── partials
│ │ │ ├── hooks
│ │ │ │ └── head-end.html
│ │ │ ├── navbar-version-selector.html
│ │ │ ├── page-meta-links.html
│ │ │ └── td
│ │ │ └── render-heading.html
│ │ ├── robot.txt
│ │ └── shortcodes
│ │ ├── include.html
│ │ ├── ipynb.html
│ │ └── regionInclude.html
│ ├── package-lock.json
│ ├── package.json
│ └── static
│ ├── favicons
│ │ ├── android-chrome-192x192.png
│ │ ├── android-chrome-512x512.png
│ │ ├── apple-touch-icon.png
│ │ ├── favicon-16x16.png
│ │ ├── favicon-32x32.png
│ │ └── favicon.ico
│ └── js
│ └── w3.js
├── .lycheeignore
├── CHANGELOG.md
├── cmd
│ ├── options_test.go
│ ├── options.go
│ ├── root_test.go
│ ├── root.go
│ └── version.txt
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── DEVELOPER.md
├── Dockerfile
├── docs
│ ├── ALLOYDBADMIN_README.md
│ ├── ALLOYDBPG_README.md
│ ├── BIGQUERY_README.md
│ ├── CLOUDSQLMSSQL_README.md
│ ├── CLOUDSQLMSSQLADMIN_README.md
│ ├── CLOUDSQLMYSQL_README.md
│ ├── CLOUDSQLMYSQLADMIN_README.md
│ ├── CLOUDSQLPG_README.md
│ ├── CLOUDSQLPGADMIN_README.md
│ ├── DATAPLEX_README.md
│ ├── en
│ │ ├── _index.md
│ │ ├── about
│ │ │ ├── _index.md
│ │ │ └── faq.md
│ │ ├── blogs
│ │ │ └── _index.md
│ │ ├── concepts
│ │ │ ├── _index.md
│ │ │ └── telemetry
│ │ │ ├── index.md
│ │ │ ├── telemetry_flow.png
│ │ │ └── telemetry_traces.png
│ │ ├── getting-started
│ │ │ ├── _index.md
│ │ │ ├── colab_quickstart.ipynb
│ │ │ ├── configure.md
│ │ │ ├── introduction
│ │ │ │ ├── _index.md
│ │ │ │ └── architecture.png
│ │ │ ├── local_quickstart_go.md
│ │ │ ├── local_quickstart_js.md
│ │ │ ├── local_quickstart.md
│ │ │ ├── mcp_quickstart
│ │ │ │ ├── _index.md
│ │ │ │ ├── inspector_tools.png
│ │ │ │ └── inspector.png
│ │ │ ├── prompts_quickstart_gemini_cli.md
│ │ │ └── quickstart
│ │ │ ├── go
│ │ │ │ ├── adkgo
│ │ │ │ │ ├── go.mod
│ │ │ │ │ ├── go.sum
│ │ │ │ │ └── quickstart.go
│ │ │ │ ├── genAI
│ │ │ │ │ ├── go.mod
│ │ │ │ │ ├── go.sum
│ │ │ │ │ └── quickstart.go
│ │ │ │ ├── genkit
│ │ │ │ │ ├── go.mod
│ │ │ │ │ ├── go.sum
│ │ │ │ │ └── quickstart.go
│ │ │ │ ├── langchain
│ │ │ │ │ ├── go.mod
│ │ │ │ │ ├── go.sum
│ │ │ │ │ └── quickstart.go
│ │ │ │ ├── openAI
│ │ │ │ │ ├── go.mod
│ │ │ │ │ ├── go.sum
│ │ │ │ │ └── quickstart.go
│ │ │ │ └── quickstart_test.go
│ │ │ ├── golden.txt
│ │ │ ├── js
│ │ │ │ ├── adk
│ │ │ │ │ ├── package-lock.json
│ │ │ │ │ ├── package.json
│ │ │ │ │ └── quickstart.js
│ │ │ │ ├── genAI
│ │ │ │ │ ├── package-lock.json
│ │ │ │ │ ├── package.json
│ │ │ │ │ └── quickstart.js
│ │ │ │ ├── genkit
│ │ │ │ │ ├── package-lock.json
│ │ │ │ │ ├── package.json
│ │ │ │ │ └── quickstart.js
│ │ │ │ ├── langchain
│ │ │ │ │ ├── package-lock.json
│ │ │ │ │ ├── package.json
│ │ │ │ │ └── quickstart.js
│ │ │ │ ├── llamaindex
│ │ │ │ │ ├── package-lock.json
│ │ │ │ │ ├── package.json
│ │ │ │ │ └── quickstart.js
│ │ │ │ └── quickstart.test.js
│ │ │ ├── python
│ │ │ │ ├── __init__.py
│ │ │ │ ├── adk
│ │ │ │ │ ├── quickstart.py
│ │ │ │ │ └── requirements.txt
│ │ │ │ ├── core
│ │ │ │ │ ├── quickstart.py
│ │ │ │ │ └── requirements.txt
│ │ │ │ ├── langchain
│ │ │ │ │ ├── quickstart.py
│ │ │ │ │ └── requirements.txt
│ │ │ │ ├── llamaindex
│ │ │ │ │ ├── quickstart.py
│ │ │ │ │ └── requirements.txt
│ │ │ │ └── quickstart_test.py
│ │ │ └── shared
│ │ │ ├── cloud_setup.md
│ │ │ ├── configure_toolbox.md
│ │ │ └── database_setup.md
│ │ ├── how-to
│ │ │ ├── _index.md
│ │ │ ├── connect_via_geminicli.md
│ │ │ ├── connect_via_mcp.md
│ │ │ ├── connect-ide
│ │ │ │ ├── _index.md
│ │ │ │ ├── alloydb_pg_admin_mcp.md
│ │ │ │ ├── alloydb_pg_mcp.md
│ │ │ │ ├── bigquery_mcp.md
│ │ │ │ ├── cloud_sql_mssql_admin_mcp.md
│ │ │ │ ├── cloud_sql_mssql_mcp.md
│ │ │ │ ├── cloud_sql_mysql_admin_mcp.md
│ │ │ │ ├── cloud_sql_mysql_mcp.md
│ │ │ │ ├── cloud_sql_pg_admin_mcp.md
│ │ │ │ ├── cloud_sql_pg_mcp.md
│ │ │ │ ├── firestore_mcp.md
│ │ │ │ ├── looker_mcp.md
│ │ │ │ ├── mssql_mcp.md
│ │ │ │ ├── mysql_mcp.md
│ │ │ │ ├── neo4j_mcp.md
│ │ │ │ ├── postgres_mcp.md
│ │ │ │ ├── spanner_mcp.md
│ │ │ │ └── sqlite_mcp.md
│ │ │ ├── deploy_adk_agent.md
│ │ │ ├── deploy_docker.md
│ │ │ ├── deploy_gke.md
│ │ │ ├── deploy_toolbox.md
│ │ │ ├── export_telemetry.md
│ │ │ └── toolbox-ui
│ │ │ ├── edit-headers.gif
│ │ │ ├── edit-headers.png
│ │ │ ├── index.md
│ │ │ ├── optional-param-checked.png
│ │ │ ├── optional-param-unchecked.png
│ │ │ ├── run-tool.gif
│ │ │ ├── tools.png
│ │ │ └── toolsets.png
│ │ ├── reference
│ │ │ ├── _index.md
│ │ │ ├── cli.md
│ │ │ └── prebuilt-tools.md
│ │ ├── resources
│ │ │ ├── _index.md
│ │ │ ├── authServices
│ │ │ │ ├── _index.md
│ │ │ │ └── google.md
│ │ │ ├── embeddingModels
│ │ │ │ ├── _index.md
│ │ │ │ └── gemini.md
│ │ │ ├── prompts
│ │ │ │ ├── _index.md
│ │ │ │ └── custom
│ │ │ │ └── _index.md
│ │ │ ├── sources
│ │ │ │ ├── _index.md
│ │ │ │ ├── alloydb-admin.md
│ │ │ │ ├── alloydb-pg.md
│ │ │ │ ├── bigquery.md
│ │ │ │ ├── bigtable.md
│ │ │ │ ├── cassandra.md
│ │ │ │ ├── clickhouse.md
│ │ │ │ ├── cloud-gda.md
│ │ │ │ ├── cloud-healthcare.md
│ │ │ │ ├── cloud-monitoring.md
│ │ │ │ ├── cloud-sql-admin.md
│ │ │ │ ├── cloud-sql-mssql.md
│ │ │ │ ├── cloud-sql-mysql.md
│ │ │ │ ├── cloud-sql-pg.md
│ │ │ │ ├── couchbase.md
│ │ │ │ ├── dataplex.md
│ │ │ │ ├── dgraph.md
│ │ │ │ ├── elasticsearch.md
│ │ │ │ ├── firebird.md
│ │ │ │ ├── firestore.md
│ │ │ │ ├── http.md
│ │ │ │ ├── looker.md
│ │ │ │ ├── mariadb.md
│ │ │ │ ├── mindsdb.md
│ │ │ │ ├── mongodb.md
│ │ │ │ ├── mssql.md
│ │ │ │ ├── mysql.md
│ │ │ │ ├── neo4j.md
│ │ │ │ ├── oceanbase.md
│ │ │ │ ├── oracle.md
│ │ │ │ ├── postgres.md
│ │ │ │ ├── redis.md
│ │ │ │ ├── serverless-spark.md
│ │ │ │ ├── singlestore.md
│ │ │ │ ├── snowflake.md
│ │ │ │ ├── spanner.md
│ │ │ │ ├── sqlite.md
│ │ │ │ ├── tidb.md
│ │ │ │ ├── trino.md
│ │ │ │ ├── valkey.md
│ │ │ │ └── yugabytedb.md
│ │ │ └── tools
│ │ │ ├── _index.md
│ │ │ ├── alloydb
│ │ │ │ ├── _index.md
│ │ │ │ ├── alloydb-create-cluster.md
│ │ │ │ ├── alloydb-create-instance.md
│ │ │ │ ├── alloydb-create-user.md
│ │ │ │ ├── alloydb-get-cluster.md
│ │ │ │ ├── alloydb-get-instance.md
│ │ │ │ ├── alloydb-get-user.md
│ │ │ │ ├── alloydb-list-clusters.md
│ │ │ │ ├── alloydb-list-instances.md
│ │ │ │ ├── alloydb-list-users.md
│ │ │ │ └── alloydb-wait-for-operation.md
│ │ │ ├── alloydbainl
│ │ │ │ ├── _index.md
│ │ │ │ └── alloydb-ai-nl.md
│ │ │ ├── bigquery
│ │ │ │ ├── _index.md
│ │ │ │ ├── bigquery-analyze-contribution.md
│ │ │ │ ├── bigquery-conversational-analytics.md
│ │ │ │ ├── bigquery-execute-sql.md
│ │ │ │ ├── bigquery-forecast.md
│ │ │ │ ├── bigquery-get-dataset-info.md
│ │ │ │ ├── bigquery-get-table-info.md
│ │ │ │ ├── bigquery-list-dataset-ids.md
│ │ │ │ ├── bigquery-list-table-ids.md
│ │ │ │ ├── bigquery-search-catalog.md
│ │ │ │ └── bigquery-sql.md
│ │ │ ├── bigtable
│ │ │ │ ├── _index.md
│ │ │ │ └── bigtable-sql.md
│ │ │ ├── cassandra
│ │ │ │ ├── _index.md
│ │ │ │ └── cassandra-cql.md
│ │ │ ├── clickhouse
│ │ │ │ ├── _index.md
│ │ │ │ ├── clickhouse-execute-sql.md
│ │ │ │ ├── clickhouse-list-databases.md
│ │ │ │ ├── clickhouse-list-tables.md
│ │ │ │ └── clickhouse-sql.md
│ │ │ ├── cloudgda
│ │ │ │ ├── _index.md
│ │ │ │ └── cloud-gda-query.md
│ │ │ ├── cloudhealthcare
│ │ │ │ ├── _index.md
│ │ │ │ ├── cloud-healthcare-fhir-fetch-page.md
│ │ │ │ ├── cloud-healthcare-fhir-patient-everything.md
│ │ │ │ ├── cloud-healthcare-fhir-patient-search.md
│ │ │ │ ├── cloud-healthcare-get-dataset.md
│ │ │ │ ├── cloud-healthcare-get-dicom-store-metrics.md
│ │ │ │ ├── cloud-healthcare-get-dicom-store.md
│ │ │ │ ├── cloud-healthcare-get-fhir-resource.md
│ │ │ │ ├── cloud-healthcare-get-fhir-store-metrics.md
│ │ │ │ ├── cloud-healthcare-get-fhir-store.md
│ │ │ │ ├── cloud-healthcare-list-dicom-stores.md
│ │ │ │ ├── cloud-healthcare-list-fhir-stores.md
│ │ │ │ ├── cloud-healthcare-retrieve-rendered-dicom-instance.md
│ │ │ │ ├── cloud-healthcare-search-dicom-instances.md
│ │ │ │ ├── cloud-healthcare-search-dicom-series.md
│ │ │ │ └── cloud-healthcare-search-dicom-studies.md
│ │ │ ├── cloudmonitoring
│ │ │ │ ├── _index.md
│ │ │ │ └── cloud-monitoring-query-prometheus.md
│ │ │ ├── cloudsql
│ │ │ │ ├── _index.md
│ │ │ │ ├── cloudsqlcloneinstance.md
│ │ │ │ ├── cloudsqlcreatedatabase.md
│ │ │ │ ├── cloudsqlcreateusers.md
│ │ │ │ ├── cloudsqlgetinstances.md
│ │ │ │ ├── cloudsqllistdatabases.md
│ │ │ │ ├── cloudsqllistinstances.md
│ │ │ │ ├── cloudsqlmssqlcreateinstance.md
│ │ │ │ ├── cloudsqlmysqlcreateinstance.md
│ │ │ │ ├── cloudsqlpgcreateinstances.md
│ │ │ │ ├── cloudsqlpgupgradeprecheck.md
│ │ │ │ └── cloudsqlwaitforoperation.md
│ │ │ ├── couchbase
│ │ │ │ ├── _index.md
│ │ │ │ └── couchbase-sql.md
│ │ │ ├── dataform
│ │ │ │ ├── _index.md
│ │ │ │ └── dataform-compile-local.md
│ │ │ ├── dataplex
│ │ │ │ ├── _index.md
│ │ │ │ ├── dataplex-lookup-entry.md
│ │ │ │ ├── dataplex-search-aspect-types.md
│ │ │ │ └── dataplex-search-entries.md
│ │ │ ├── dgraph
│ │ │ │ ├── _index.md
│ │ │ │ └── dgraph-dql.md
│ │ │ ├── elasticsearch
│ │ │ │ ├── _index.md
│ │ │ │ └── elasticsearch-esql.md
│ │ │ ├── firebird
│ │ │ │ ├── _index.md
│ │ │ │ ├── firebird-execute-sql.md
│ │ │ │ └── firebird-sql.md
│ │ │ ├── firestore
│ │ │ │ ├── _index.md
│ │ │ │ ├── firestore-add-documents.md
│ │ │ │ ├── firestore-delete-documents.md
│ │ │ │ ├── firestore-get-documents.md
│ │ │ │ ├── firestore-get-rules.md
│ │ │ │ ├── firestore-list-collections.md
│ │ │ │ ├── firestore-query-collection.md
│ │ │ │ ├── firestore-query.md
│ │ │ │ ├── firestore-update-document.md
│ │ │ │ └── firestore-validate-rules.md
│ │ │ ├── http
│ │ │ │ ├── _index.md
│ │ │ │ └── http.md
│ │ │ ├── looker
│ │ │ │ ├── _index.md
│ │ │ │ ├── looker-add-dashboard-element.md
│ │ │ │ ├── looker-add-dashboard-filter.md
│ │ │ │ ├── looker-conversational-analytics.md
│ │ │ │ ├── looker-create-project-file.md
│ │ │ │ ├── looker-delete-project-file.md
│ │ │ │ ├── looker-dev-mode.md
│ │ │ │ ├── looker-generate-embed-url.md
│ │ │ │ ├── looker-get-connection-databases.md
│ │ │ │ ├── looker-get-connection-schemas.md
│ │ │ │ ├── looker-get-connection-table-columns.md
│ │ │ │ ├── looker-get-connection-tables.md
│ │ │ │ ├── looker-get-connections.md
│ │ │ │ ├── looker-get-dashboards.md
│ │ │ │ ├── looker-get-dimensions.md
│ │ │ │ ├── looker-get-explores.md
│ │ │ │ ├── looker-get-filters.md
│ │ │ │ ├── looker-get-looks.md
│ │ │ │ ├── looker-get-measures.md
│ │ │ │ ├── looker-get-models.md
│ │ │ │ ├── looker-get-parameters.md
│ │ │ │ ├── looker-get-project-file.md
│ │ │ │ ├── looker-get-project-files.md
│ │ │ │ ├── looker-get-projects.md
│ │ │ │ ├── looker-health-analyze.md
│ │ │ │ ├── looker-health-pulse.md
│ │ │ │ ├── looker-health-vacuum.md
│ │ │ │ ├── looker-make-dashboard.md
│ │ │ │ ├── looker-make-look.md
│ │ │ │ ├── looker-query-sql.md
│ │ │ │ ├── looker-query-url.md
│ │ │ │ ├── looker-query.md
│ │ │ │ ├── looker-run-dashboard.md
│ │ │ │ ├── looker-run-look.md
│ │ │ │ └── looker-update-project-file.md
│ │ │ ├── mindsdb
│ │ │ │ ├── _index.md
│ │ │ │ ├── mindsdb-execute-sql.md
│ │ │ │ └── mindsdb-sql.md
│ │ │ ├── mongodb
│ │ │ │ ├── _index.md
│ │ │ │ ├── mongodb-aggregate.md
│ │ │ │ ├── mongodb-delete-many.md
│ │ │ │ ├── mongodb-delete-one.md
│ │ │ │ ├── mongodb-find-one.md
│ │ │ │ ├── mongodb-find.md
│ │ │ │ ├── mongodb-insert-many.md
│ │ │ │ ├── mongodb-insert-one.md
│ │ │ │ ├── mongodb-update-many.md
│ │ │ │ └── mongodb-update-one.md
│ │ │ ├── mssql
│ │ │ │ ├── _index.md
│ │ │ │ ├── mssql-execute-sql.md
│ │ │ │ ├── mssql-list-tables.md
│ │ │ │ └── mssql-sql.md
│ │ │ ├── mysql
│ │ │ │ ├── _index.md
│ │ │ │ ├── mysql-execute-sql.md
│ │ │ │ ├── mysql-get-query-plan.md
│ │ │ │ ├── mysql-list-active-queries.md
│ │ │ │ ├── mysql-list-table-fragmentation.md
│ │ │ │ ├── mysql-list-tables-missing-unique-indexes.md
│ │ │ │ ├── mysql-list-tables.md
│ │ │ │ └── mysql-sql.md
│ │ │ ├── neo4j
│ │ │ │ ├── _index.md
│ │ │ │ ├── neo4j-cypher.md
│ │ │ │ ├── neo4j-execute-cypher.md
│ │ │ │ └── neo4j-schema.md
│ │ │ ├── oceanbase
│ │ │ │ ├── _index.md
│ │ │ │ ├── oceanbase-execute-sql.md
│ │ │ │ └── oceanbase-sql.md
│ │ │ ├── oracle
│ │ │ │ ├── _index.md
│ │ │ │ ├── oracle-execute-sql.md
│ │ │ │ └── oracle-sql.md
│ │ │ ├── postgres
│ │ │ │ ├── _index.md
│ │ │ │ ├── postgres-database-overview.md
│ │ │ │ ├── postgres-execute-sql.md
│ │ │ │ ├── postgres-get-column-cardinality.md
│ │ │ │ ├── postgres-list-active-queries.md
│ │ │ │ ├── postgres-list-available-extensions.md
│ │ │ │ ├── postgres-list-database-stats.md
│ │ │ │ ├── postgres-list-indexes.md
│ │ │ │ ├── postgres-list-installed-extensions.md
│ │ │ │ ├── postgres-list-locks.md
│ │ │ │ ├── postgres-list-pg-settings.md
│ │ │ │ ├── postgres-list-publication-tables.md
│ │ │ │ ├── postgres-list-query-stats.md
│ │ │ │ ├── postgres-list-roles.md
│ │ │ │ ├── postgres-list-schemas.md
│ │ │ │ ├── postgres-list-sequences.md
│ │ │ │ ├── postgres-list-stored-procedure.md
│ │ │ │ ├── postgres-list-table-stats.md
│ │ │ │ ├── postgres-list-tables.md
│ │ │ │ ├── postgres-list-tablespaces.md
│ │ │ │ ├── postgres-list-triggers.md
│ │ │ │ ├── postgres-list-views.md
│ │ │ │ ├── postgres-long-running-transactions.md
│ │ │ │ ├── postgres-replication-stats.md
│ │ │ │ └── postgres-sql.md
│ │ │ ├── redis
│ │ │ │ ├── _index.md
│ │ │ │ └── redis.md
│ │ │ ├── serverless-spark
│ │ │ │ ├── _index.md
│ │ │ │ ├── serverless-spark-cancel-batch.md
│ │ │ │ ├── serverless-spark-create-pyspark-batch.md
│ │ │ │ ├── serverless-spark-create-spark-batch.md
│ │ │ │ ├── serverless-spark-get-batch.md
│ │ │ │ └── serverless-spark-list-batches.md
│ │ │ ├── singlestore
│ │ │ │ ├── _index.md
│ │ │ │ ├── singlestore-execute-sql.md
│ │ │ │ └── singlestore-sql.md
│ │ │ ├── snowflake
│ │ │ │ ├── _index.md
│ │ │ │ ├── snowflake-execute-sql.md
│ │ │ │ └── snowflake-sql.md
│ │ │ ├── spanner
│ │ │ │ ├── _index.md
│ │ │ │ ├── spanner-execute-sql.md
│ │ │ │ ├── spanner-list-graphs.md
│ │ │ │ ├── spanner-list-tables.md
│ │ │ │ └── spanner-sql.md
│ │ │ ├── sqlite
│ │ │ │ ├── _index.md
│ │ │ │ ├── sqlite-execute-sql.md
│ │ │ │ └── sqlite-sql.md
│ │ │ ├── tidb
│ │ │ │ ├── _index.md
│ │ │ │ ├── tidb-execute-sql.md
│ │ │ │ └── tidb-sql.md
│ │ │ ├── trino
│ │ │ │ ├── _index.md
│ │ │ │ ├── trino-execute-sql.md
│ │ │ │ └── trino-sql.md
│ │ │ ├── utility
│ │ │ │ ├── _index.md
│ │ │ │ └── wait.md
│ │ │ ├── valkey
│ │ │ │ ├── _index.md
│ │ │ │ └── valkey.md
│ │ │ └── yuagbytedb
│ │ │ ├── _index.md
│ │ │ └── yugabytedb-sql.md
│ │ ├── samples
│ │ │ ├── _index.md
│ │ │ ├── alloydb
│ │ │ │ ├── _index.md
│ │ │ │ ├── ai-nl
│ │ │ │ │ ├── alloydb_ai_nl.ipynb
│ │ │ │ │ └── index.md
│ │ │ │ └── mcp_quickstart.md
│ │ │ ├── bigquery
│ │ │ │ ├── _index.md
│ │ │ │ ├── colab_quickstart_bigquery.ipynb
│ │ │ │ ├── local_quickstart.md
│ │ │ │ └── mcp_quickstart
│ │ │ │ ├── _index.md
│ │ │ │ ├── inspector_tools.png
│ │ │ │ └── inspector.png
│ │ │ ├── looker
│ │ │ │ ├── _index.md
│ │ │ │ ├── looker_gemini_oauth
│ │ │ │ │ ├── _index.md
│ │ │ │ │ ├── authenticated.png
│ │ │ │ │ ├── authorize.png
│ │ │ │ │ └── registration.png
│ │ │ │ ├── looker_gemini.md
│ │ │ │ └── looker_mcp_inspector
│ │ │ │ ├── _index.md
│ │ │ │ ├── inspector_tools.png
│ │ │ │ └── inspector.png
│ │ │ └── snowflake
│ │ │ ├── _index.md
│ │ │ ├── runme.py
│ │ │ ├── snowflake-config.yaml
│ │ │ ├── snowflake-env.sh
│ │ │ └── test-snowflake.sh
│ │ └── sdks
│ │ ├── _index.md
│ │ ├── go-sdk.md
│ │ ├── js-sdk.md
│ │ └── python-sdk.md
│ ├── LOOKER_README.md
│ ├── SPANNER_README.md
│ └── TOOLBOX_README.md
├── gemini-extension.json
├── go.mod
├── go.sum
├── internal
│ ├── auth
│ │ ├── auth.go
│ │ └── google
│ │ └── google.go
│ ├── embeddingmodels
│ │ ├── embeddingmodels.go
│ │ └── gemini
│ │ ├── gemini_test.go
│ │ └── gemini.go
│ ├── log
│ │ ├── handler.go
│ │ ├── log_test.go
│ │ ├── log.go
│ │ └── logger.go
│ ├── prebuiltconfigs
│ │ ├── prebuiltconfigs_test.go
│ │ ├── prebuiltconfigs.go
│ │ └── tools
│ │ ├── alloydb-postgres-admin.yaml
│ │ ├── alloydb-postgres-observability.yaml
│ │ ├── alloydb-postgres.yaml
│ │ ├── bigquery.yaml
│ │ ├── clickhouse.yaml
│ │ ├── cloud-healthcare.yaml
│ │ ├── cloud-sql-mssql-admin.yaml
│ │ ├── cloud-sql-mssql-observability.yaml
│ │ ├── cloud-sql-mssql.yaml
│ │ ├── cloud-sql-mysql-admin.yaml
│ │ ├── cloud-sql-mysql-observability.yaml
│ │ ├── cloud-sql-mysql.yaml
│ │ ├── cloud-sql-postgres-admin.yaml
│ │ ├── cloud-sql-postgres-observability.yaml
│ │ ├── cloud-sql-postgres.yaml
│ │ ├── dataplex.yaml
│ │ ├── elasticsearch.yaml
│ │ ├── firestore.yaml
│ │ ├── looker-conversational-analytics.yaml
│ │ ├── looker.yaml
│ │ ├── mindsdb.yaml
│ │ ├── mssql.yaml
│ │ ├── mysql.yaml
│ │ ├── neo4j.yaml
│ │ ├── oceanbase.yaml
│ │ ├── postgres.yaml
│ │ ├── serverless-spark.yaml
│ │ ├── singlestore.yaml
│ │ ├── snowflake.yaml
│ │ ├── spanner-postgres.yaml
│ │ ├── spanner.yaml
│ │ └── sqlite.yaml
│ ├── prompts
│ │ ├── arguments_test.go
│ │ ├── arguments.go
│ │ ├── custom
│ │ │ ├── custom_test.go
│ │ │ └── custom.go
│ │ ├── messages_test.go
│ │ ├── messages.go
│ │ ├── prompts_test.go
│ │ ├── prompts.go
│ │ ├── promptsets_test.go
│ │ └── promptsets.go
│ ├── server
│ │ ├── api_test.go
│ │ ├── api.go
│ │ ├── common_test.go
│ │ ├── config.go
│ │ ├── mcp
│ │ │ ├── jsonrpc
│ │ │ │ ├── jsonrpc_test.go
│ │ │ │ └── jsonrpc.go
│ │ │ ├── mcp.go
│ │ │ ├── util
│ │ │ │ └── lifecycle.go
│ │ │ ├── v20241105
│ │ │ │ ├── method.go
│ │ │ │ └── types.go
│ │ │ ├── v20250326
│ │ │ │ ├── method.go
│ │ │ │ └── types.go
│ │ │ └── v20250618
│ │ │ ├── method.go
│ │ │ └── types.go
│ │ ├── mcp_test.go
│ │ ├── mcp.go
│ │ ├── resources
│ │ │ ├── resources_test.go
│ │ │ └── resources.go
│ │ ├── server_test.go
│ │ ├── server.go
│ │ ├── static
│ │ │ ├── assets
│ │ │ │ └── mcptoolboxlogo.png
│ │ │ ├── css
│ │ │ │ └── style.css
│ │ │ ├── index.html
│ │ │ ├── js
│ │ │ │ ├── auth.js
│ │ │ │ ├── loadTools.js
│ │ │ │ ├── mainContent.js
│ │ │ │ ├── navbar.js
│ │ │ │ ├── runTool.js
│ │ │ │ ├── toolDisplay.js
│ │ │ │ ├── tools.js
│ │ │ │ └── toolsets.js
│ │ │ ├── tools.html
│ │ │ └── toolsets.html
│ │ ├── web_test.go
│ │ └── web.go
│ ├── sources
│ │ ├── alloydbadmin
│ │ │ ├── alloydbadmin_test.go
│ │ │ └── alloydbadmin.go
│ │ ├── alloydbpg
│ │ │ ├── alloydb_pg_test.go
│ │ │ └── alloydb_pg.go
│ │ ├── bigquery
│ │ │ ├── bigquery_test.go
│ │ │ ├── bigquery.go
│ │ │ └── cache.go
│ │ ├── bigtable
│ │ │ ├── bigtable_test.go
│ │ │ └── bigtable.go
│ │ ├── cassandra
│ │ │ ├── cassandra_test.go
│ │ │ └── cassandra.go
│ │ ├── clickhouse
│ │ │ ├── clickhouse_test.go
│ │ │ └── clickhouse.go
│ │ ├── cloudgda
│ │ │ ├── cloud_gda_test.go
│ │ │ └── cloud_gda.go
│ │ ├── cloudhealthcare
│ │ │ ├── cloud_healthcare_test.go
│ │ │ └── cloud_healthcare.go
│ │ ├── cloudmonitoring
│ │ │ ├── cloud_monitoring_test.go
│ │ │ └── cloud_monitoring.go
│ │ ├── cloudsqladmin
│ │ │ ├── cloud_sql_admin_test.go
│ │ │ └── cloud_sql_admin.go
│ │ ├── cloudsqlmssql
│ │ │ ├── cloud_sql_mssql_test.go
│ │ │ └── cloud_sql_mssql.go
│ │ ├── cloudsqlmysql
│ │ │ ├── cloud_sql_mysql_test.go
│ │ │ └── cloud_sql_mysql.go
│ │ ├── cloudsqlpg
│ │ │ ├── cloud_sql_pg_test.go
│ │ │ └── cloud_sql_pg.go
│ │ ├── couchbase
│ │ │ ├── couchbase_test.go
│ │ │ └── couchbase.go
│ │ ├── dataplex
│ │ │ ├── dataplex_test.go
│ │ │ └── dataplex.go
│ │ ├── dgraph
│ │ │ ├── dgraph_test.go
│ │ │ └── dgraph.go
│ │ ├── dialect.go
│ │ ├── elasticsearch
│ │ │ ├── elasticsearch_test.go
│ │ │ └── elasticsearch.go
│ │ ├── firebird
│ │ │ ├── firebird_test.go
│ │ │ └── firebird.go
│ │ ├── firestore
│ │ │ ├── firestore_test.go
│ │ │ └── firestore.go
│ │ ├── http
│ │ │ ├── http_test.go
│ │ │ └── http.go
│ │ ├── ip_type.go
│ │ ├── looker
│ │ │ ├── looker_test.go
│ │ │ └── looker.go
│ │ ├── mindsdb
│ │ │ ├── mindsdb_test.go
│ │ │ └── mindsdb.go
│ │ ├── mongodb
│ │ │ ├── mongodb_test.go
│ │ │ └── mongodb.go
│ │ ├── mssql
│ │ │ ├── mssql_test.go
│ │ │ └── mssql.go
│ │ ├── mysql
│ │ │ ├── mysql_test.go
│ │ │ └── mysql.go
│ │ ├── neo4j
│ │ │ ├── neo4j_test.go
│ │ │ └── neo4j.go
│ │ ├── oceanbase
│ │ │ ├── oceanbase_test.go
│ │ │ └── oceanbase.go
│ │ ├── oracle
│ │ │ ├── oracle_test.go
│ │ │ └── oracle.go
│ │ ├── postgres
│ │ │ ├── postgres_test.go
│ │ │ └── postgres.go
│ │ ├── redis
│ │ │ ├── redis_test.go
│ │ │ └── redis.go
│ │ ├── serverlessspark
│ │ │ ├── serverlessspark_test.go
│ │ │ ├── serverlessspark.go
│ │ │ ├── url_test.go
│ │ │ └── url.go
│ │ ├── singlestore
│ │ │ ├── singlestore_test.go
│ │ │ └── singlestore.go
│ │ ├── snowflake
│ │ │ ├── snowflake_test.go
│ │ │ └── snowflake.go
│ │ ├── sources.go
│ │ ├── spanner
│ │ │ ├── spanner_test.go
│ │ │ └── spanner.go
│ │ ├── sqlite
│ │ │ ├── sqlite_test.go
│ │ │ └── sqlite.go
│ │ ├── tidb
│ │ │ ├── tidb_test.go
│ │ │ └── tidb.go
│ │ ├── trino
│ │ │ ├── trino_test.go
│ │ │ └── trino.go
│ │ ├── util.go
│ │ ├── valkey
│ │ │ ├── valkey_test.go
│ │ │ └── valkey.go
│ │ └── yugabytedb
│ │ ├── yugabytedb_test.go
│ │ └── yugabytedb.go
│ ├── telemetry
│ │ ├── instrumentation.go
│ │ └── telemetry.go
│ ├── testutils
│ │ └── testutils.go
│ ├── tools
│ │ ├── alloydb
│ │ │ ├── alloydbcreatecluster
│ │ │ │ ├── alloydbcreatecluster_test.go
│ │ │ │ └── alloydbcreatecluster.go
│ │ │ ├── alloydbcreateinstance
│ │ │ │ ├── alloydbcreateinstance_test.go
│ │ │ │ └── alloydbcreateinstance.go
│ │ │ ├── alloydbcreateuser
│ │ │ │ ├── alloydbcreateuser_test.go
│ │ │ │ └── alloydbcreateuser.go
│ │ │ ├── alloydbgetcluster
│ │ │ │ ├── alloydbgetcluster_test.go
│ │ │ │ └── alloydbgetcluster.go
│ │ │ ├── alloydbgetinstance
│ │ │ │ ├── alloydbgetinstance_test.go
│ │ │ │ └── alloydbgetinstance.go
│ │ │ ├── alloydbgetuser
│ │ │ │ ├── alloydbgetuser_test.go
│ │ │ │ └── alloydbgetuser.go
│ │ │ ├── alloydblistclusters
│ │ │ │ ├── alloydblistclusters_test.go
│ │ │ │ └── alloydblistclusters.go
│ │ │ ├── alloydblistinstances
│ │ │ │ ├── alloydblistinstances_test.go
│ │ │ │ └── alloydblistinstances.go
│ │ │ ├── alloydblistusers
│ │ │ │ ├── alloydblistusers_test.go
│ │ │ │ └── alloydblistusers.go
│ │ │ └── alloydbwaitforoperation
│ │ │ ├── alloydbwaitforoperation_test.go
│ │ │ └── alloydbwaitforoperation.go
│ │ ├── alloydbainl
│ │ │ ├── alloydbainl_test.go
│ │ │ └── alloydbainl.go
│ │ ├── bigquery
│ │ │ ├── bigqueryanalyzecontribution
│ │ │ │ ├── bigqueryanalyzecontribution_test.go
│ │ │ │ └── bigqueryanalyzecontribution.go
│ │ │ ├── bigquerycommon
│ │ │ │ ├── table_name_parser_test.go
│ │ │ │ ├── table_name_parser.go
│ │ │ │ └── util.go
│ │ │ ├── bigqueryconversationalanalytics
│ │ │ │ ├── bigqueryconversationalanalytics_test.go
│ │ │ │ └── bigqueryconversationalanalytics.go
│ │ │ ├── bigqueryexecutesql
│ │ │ │ ├── bigqueryexecutesql_test.go
│ │ │ │ └── bigqueryexecutesql.go
│ │ │ ├── bigqueryforecast
│ │ │ │ ├── bigqueryforecast_test.go
│ │ │ │ └── bigqueryforecast.go
│ │ │ ├── bigquerygetdatasetinfo
│ │ │ │ ├── bigquerygetdatasetinfo_test.go
│ │ │ │ └── bigquerygetdatasetinfo.go
│ │ │ ├── bigquerygettableinfo
│ │ │ │ ├── bigquerygettableinfo_test.go
│ │ │ │ └── bigquerygettableinfo.go
│ │ │ ├── bigquerylistdatasetids
│ │ │ │ ├── bigquerylistdatasetids_test.go
│ │ │ │ └── bigquerylistdatasetids.go
│ │ │ ├── bigquerylisttableids
│ │ │ │ ├── bigquerylisttableids_test.go
│ │ │ │ └── bigquerylisttableids.go
│ │ │ ├── bigquerysearchcatalog
│ │ │ │ ├── bigquerysearchcatalog_test.go
│ │ │ │ └── bigquerysearchcatalog.go
│ │ │ └── bigquerysql
│ │ │ ├── bigquerysql_test.go
│ │ │ └── bigquerysql.go
│ │ ├── bigtable
│ │ │ ├── bigtable_test.go
│ │ │ └── bigtable.go
│ │ ├── cassandra
│ │ │ └── cassandracql
│ │ │ ├── cassandracql_test.go
│ │ │ └── cassandracql.go
│ │ ├── clickhouse
│ │ │ ├── clickhouseexecutesql
│ │ │ │ ├── clickhouseexecutesql_test.go
│ │ │ │ └── clickhouseexecutesql.go
│ │ │ ├── clickhouselistdatabases
│ │ │ │ ├── clickhouselistdatabases_test.go
│ │ │ │ └── clickhouselistdatabases.go
│ │ │ ├── clickhouselisttables
│ │ │ │ ├── clickhouselisttables_test.go
│ │ │ │ └── clickhouselisttables.go
│ │ │ └── clickhousesql
│ │ │ ├── clickhousesql_test.go
│ │ │ └── clickhousesql.go
│ │ ├── cloudgda
│ │ │ ├── cloudgda_test.go
│ │ │ ├── cloudgda.go
│ │ │ └── types.go
│ │ ├── cloudhealthcare
│ │ │ ├── cloudhealthcarefhirfetchpage
│ │ │ │ ├── cloudhealthcarefhirfetchpage_test.go
│ │ │ │ └── cloudhealthcarefhirfetchpage.go
│ │ │ ├── cloudhealthcarefhirpatienteverything
│ │ │ │ ├── cloudhealthcarefhirpatienteverything_test.go
│ │ │ │ └── cloudhealthcarefhirpatienteverything.go
│ │ │ ├── cloudhealthcarefhirpatientsearch
│ │ │ │ ├── cloudhealthcarefhirpatientsearch_test.go
│ │ │ │ └── cloudhealthcarefhirpatientsearch.go
│ │ │ ├── cloudhealthcaregetdataset
│ │ │ │ ├── cloudhealthcaregetdataset_test.go
│ │ │ │ └── cloudhealthcaregetdataset.go
│ │ │ ├── cloudhealthcaregetdicomstore
│ │ │ │ ├── cloudhealthcaregetdicomstore_test.go
│ │ │ │ └── cloudhealthcaregetdicomstore.go
│ │ │ ├── cloudhealthcaregetdicomstoremetrics
│ │ │ │ ├── cloudhealthcaregetdicomstoremetrics_test.go
│ │ │ │ └── cloudhealthcaregetdicomstoremetrics.go
│ │ │ ├── cloudhealthcaregetfhirresource
│ │ │ │ ├── cloudhealthcaregetfhirresource_test.go
│ │ │ │ └── cloudhealthcaregetfhirresource.go
│ │ │ ├── cloudhealthcaregetfhirstore
│ │ │ │ ├── cloudhealthcaregetfhirstore_test.go
│ │ │ │ └── cloudhealthcaregetfhirstore.go
│ │ │ ├── cloudhealthcaregetfhirstoremetrics
│ │ │ │ ├── cloudhealthcaregetfhirstoremetrics_test.go
│ │ │ │ └── cloudhealthcaregetfhirstoremetrics.go
│ │ │ ├── cloudhealthcarelistdicomstores
│ │ │ │ ├── cloudhealthcarelistdicomstores_test.go
│ │ │ │ └── cloudhealthcarelistdicomstores.go
│ │ │ ├── cloudhealthcarelistfhirstores
│ │ │ │ ├── cloudhealthcarelistfhirstores_test.go
│ │ │ │ └── cloudhealthcarelistfhirstores.go
│ │ │ ├── cloudhealthcareretrieverendereddicominstance
│ │ │ │ ├── cloudhealthcareretrieverendereddicominstance_test.go
│ │ │ │ └── cloudhealthcareretrieverendereddicominstance.go
│ │ │ ├── cloudhealthcaresearchdicominstances
│ │ │ │ ├── cloudhealthcaresearchdicominstances_test.go
│ │ │ │ └── cloudhealthcaresearchdicominstances.go
│ │ │ ├── cloudhealthcaresearchdicomseries
│ │ │ │ ├── cloudhealthcaresearchdicomseries_test.go
│ │ │ │ └── cloudhealthcaresearchdicomseries.go
│ │ │ ├── cloudhealthcaresearchdicomstudies
│ │ │ │ ├── cloudhealthcaresearchdicomstudies_test.go
│ │ │ │ └── cloudhealthcaresearchdicomstudies.go
│ │ │ └── common
│ │ │ └── util.go
│ │ ├── cloudmonitoring
│ │ │ ├── cloudmonitoring_test.go
│ │ │ └── cloudmonitoring.go
│ │ ├── cloudsql
│ │ │ ├── cloudsqlcloneinstance
│ │ │ │ ├── cloudsqlcloneinstance_test.go
│ │ │ │ └── cloudsqlcloneinstance.go
│ │ │ ├── cloudsqlcreatedatabase
│ │ │ │ ├── cloudsqlcreatedatabase_test.go
│ │ │ │ └── cloudsqlcreatedatabase.go
│ │ │ ├── cloudsqlcreateusers
│ │ │ │ ├── cloudsqlcreateusers_test.go
│ │ │ │ └── cloudsqlcreateusers.go
│ │ │ ├── cloudsqlgetinstances
│ │ │ │ ├── cloudsqlgetinstances_test.go
│ │ │ │ └── cloudsqlgetinstances.go
│ │ │ ├── cloudsqllistdatabases
│ │ │ │ ├── cloudsqllistdatabases_test.go
│ │ │ │ └── cloudsqllistdatabases.go
│ │ │ ├── cloudsqllistinstances
│ │ │ │ ├── cloudsqllistinstances_test.go
│ │ │ │ └── cloudsqllistinstances.go
│ │ │ └── cloudsqlwaitforoperation
│ │ │ ├── cloudsqlwaitforoperation_test.go
│ │ │ └── cloudsqlwaitforoperation.go
│ │ ├── cloudsqlmssql
│ │ │ └── cloudsqlmssqlcreateinstance
│ │ │ ├── cloudsqlmssqlcreateinstance_test.go
│ │ │ └── cloudsqlmssqlcreateinstance.go
│ │ ├── cloudsqlmysql
│ │ │ └── cloudsqlmysqlcreateinstance
│ │ │ ├── cloudsqlmysqlcreateinstance_test.go
│ │ │ └── cloudsqlmysqlcreateinstance.go
│ │ ├── cloudsqlpg
│ │ │ ├── cloudsqlpgcreateinstances
│ │ │ │ ├── cloudsqlpgcreateinstances_test.go
│ │ │ │ └── cloudsqlpgcreateinstances.go
│ │ │ └── cloudsqlpgupgradeprecheck
│ │ │ ├── cloudsqlpgupgradeprecheck_test.go
│ │ │ └── cloudsqlpgupgradeprecheck.go
│ │ ├── couchbase
│ │ │ ├── couchbase_test.go
│ │ │ └── couchbase.go
│ │ ├── dataform
│ │ │ └── dataformcompilelocal
│ │ │ ├── dataformcompilelocal_test.go
│ │ │ └── dataformcompilelocal.go
│ │ ├── dataplex
│ │ │ ├── dataplexlookupentry
│ │ │ │ ├── dataplexlookupentry_test.go
│ │ │ │ └── dataplexlookupentry.go
│ │ │ ├── dataplexsearchaspecttypes
│ │ │ │ ├── dataplexsearchaspecttypes_test.go
│ │ │ │ └── dataplexsearchaspecttypes.go
│ │ │ └── dataplexsearchentries
│ │ │ ├── dataplexsearchentries_test.go
│ │ │ └── dataplexsearchentries.go
│ │ ├── dgraph
│ │ │ ├── dgraph_test.go
│ │ │ └── dgraph.go
│ │ ├── elasticsearch
│ │ │ └── elasticsearchesql
│ │ │ ├── elasticsearchesql_test.go
│ │ │ └── elasticsearchesql.go
│ │ ├── firebird
│ │ │ ├── firebirdexecutesql
│ │ │ │ ├── firebirdexecutesql_test.go
│ │ │ │ └── firebirdexecutesql.go
│ │ │ └── firebirdsql
│ │ │ ├── firebirdsql_test.go
│ │ │ └── firebirdsql.go
│ │ ├── firestore
│ │ │ ├── firestoreadddocuments
│ │ │ │ ├── firestoreadddocuments_test.go
│ │ │ │ └── firestoreadddocuments.go
│ │ │ ├── firestoredeletedocuments
│ │ │ │ ├── firestoredeletedocuments_test.go
│ │ │ │ └── firestoredeletedocuments.go
│ │ │ ├── firestoregetdocuments
│ │ │ │ ├── firestoregetdocuments_test.go
│ │ │ │ └── firestoregetdocuments.go
│ │ │ ├── firestoregetrules
│ │ │ │ ├── firestoregetrules_test.go
│ │ │ │ └── firestoregetrules.go
│ │ │ ├── firestorelistcollections
│ │ │ │ ├── firestorelistcollections_test.go
│ │ │ │ └── firestorelistcollections.go
│ │ │ ├── firestorequery
│ │ │ │ ├── firestorequery_test.go
│ │ │ │ └── firestorequery.go
│ │ │ ├── firestorequerycollection
│ │ │ │ ├── firestorequerycollection_test.go
│ │ │ │ └── firestorequerycollection.go
│ │ │ ├── firestoreupdatedocument
│ │ │ │ ├── firestoreupdatedocument_test.go
│ │ │ │ └── firestoreupdatedocument.go
│ │ │ ├── firestorevalidaterules
│ │ │ │ ├── firestorevalidaterules_test.go
│ │ │ │ └── firestorevalidaterules.go
│ │ │ └── util
│ │ │ ├── converter_test.go
│ │ │ ├── converter.go
│ │ │ ├── validator_test.go
│ │ │ └── validator.go
│ │ ├── http
│ │ │ ├── http_test.go
│ │ │ └── http.go
│ │ ├── http_method.go
│ │ ├── looker
│ │ │ ├── lookeradddashboardelement
│ │ │ │ ├── lookeradddashboardelement_test.go
│ │ │ │ └── lookeradddashboardelement.go
│ │ │ ├── lookeradddashboardfilter
│ │ │ │ ├── lookeradddashboardfilter_test.go
│ │ │ │ └── lookeradddashboardfilter.go
│ │ │ ├── lookercommon
│ │ │ │ ├── lookercommon_test.go
│ │ │ │ └── lookercommon.go
│ │ │ ├── lookerconversationalanalytics
│ │ │ │ ├── lookerconversationalanalytics_test.go
│ │ │ │ └── lookerconversationalanalytics.go
│ │ │ ├── lookercreateprojectfile
│ │ │ │ ├── lookercreateprojectfile_test.go
│ │ │ │ └── lookercreateprojectfile.go
│ │ │ ├── lookerdeleteprojectfile
│ │ │ │ ├── lookerdeleteprojectfile_test.go
│ │ │ │ └── lookerdeleteprojectfile.go
│ │ │ ├── lookerdevmode
│ │ │ │ ├── lookerdevmode_test.go
│ │ │ │ └── lookerdevmode.go
│ │ │ ├── lookergenerateembedurl
│ │ │ │ ├── lookergenerateembedurl_test.go
│ │ │ │ └── lookergenerateembedurl.go
│ │ │ ├── lookergetconnectiondatabases
│ │ │ │ ├── lookergetconnectiondatabases_test.go
│ │ │ │ └── lookergetconnectiondatabases.go
│ │ │ ├── lookergetconnections
│ │ │ │ ├── lookergetconnections_test.go
│ │ │ │ └── lookergetconnections.go
│ │ │ ├── lookergetconnectionschemas
│ │ │ │ ├── lookergetconnectionschemas_test.go
│ │ │ │ └── lookergetconnectionschemas.go
│ │ │ ├── lookergetconnectiontablecolumns
│ │ │ │ ├── lookergetconnectiontablecolumns_test.go
│ │ │ │ └── lookergetconnectiontablecolumns.go
│ │ │ ├── lookergetconnectiontables
│ │ │ │ ├── lookergetconnectiontables_test.go
│ │ │ │ └── lookergetconnectiontables.go
│ │ │ ├── lookergetdashboards
│ │ │ │ ├── lookergetdashboards_test.go
│ │ │ │ └── lookergetdashboards.go
│ │ │ ├── lookergetdimensions
│ │ │ │ ├── lookergetdimensions_test.go
│ │ │ │ └── lookergetdimensions.go
│ │ │ ├── lookergetexplores
│ │ │ │ ├── lookergetexplores_test.go
│ │ │ │ └── lookergetexplores.go
│ │ │ ├── lookergetfilters
│ │ │ │ ├── lookergetfilters_test.go
│ │ │ │ └── lookergetfilters.go
│ │ │ ├── lookergetlooks
│ │ │ │ ├── lookergetlooks_test.go
│ │ │ │ └── lookergetlooks.go
│ │ │ ├── lookergetmeasures
│ │ │ │ ├── lookergetmeasures_test.go
│ │ │ │ └── lookergetmeasures.go
│ │ │ ├── lookergetmodels
│ │ │ │ ├── lookergetmodels_test.go
│ │ │ │ └── lookergetmodels.go
│ │ │ ├── lookergetparameters
│ │ │ │ ├── lookergetparameters_test.go
│ │ │ │ └── lookergetparameters.go
│ │ │ ├── lookergetprojectfile
│ │ │ │ ├── lookergetprojectfile_test.go
│ │ │ │ └── lookergetprojectfile.go
│ │ │ ├── lookergetprojectfiles
│ │ │ │ ├── lookergetprojectfiles_test.go
│ │ │ │ └── lookergetprojectfiles.go
│ │ │ ├── lookergetprojects
│ │ │ │ ├── lookergetprojects_test.go
│ │ │ │ └── lookergetprojects.go
│ │ │ ├── lookerhealthanalyze
│ │ │ │ ├── lookerhealthanalyze_test.go
│ │ │ │ └── lookerhealthanalyze.go
│ │ │ ├── lookerhealthpulse
│ │ │ │ ├── lookerhealthpulse_test.go
│ │ │ │ └── lookerhealthpulse.go
│ │ │ ├── lookerhealthvacuum
│ │ │ │ ├── lookerhealthvacuum_test.go
│ │ │ │ └── lookerhealthvacuum.go
│ │ │ ├── lookermakedashboard
│ │ │ │ ├── lookermakedashboard_test.go
│ │ │ │ └── lookermakedashboard.go
│ │ │ ├── lookermakelook
│ │ │ │ ├── lookermakelook_test.go
│ │ │ │ └── lookermakelook.go
│ │ │ ├── lookerquery
│ │ │ │ ├── lookerquery_test.go
│ │ │ │ └── lookerquery.go
│ │ │ ├── lookerquerysql
│ │ │ │ ├── lookerquerysql_test.go
│ │ │ │ └── lookerquerysql.go
│ │ │ ├── lookerqueryurl
│ │ │ │ ├── lookerqueryurl_test.go
│ │ │ │ └── lookerqueryurl.go
│ │ │ ├── lookerrundashboard
│ │ │ │ ├── lookerrundashboard_test.go
│ │ │ │ └── lookerrundashboard.go
│ │ │ ├── lookerrunlook
│ │ │ │ ├── lookerrunlook_test.go
│ │ │ │ └── lookerrunlook.go
│ │ │ └── lookerupdateprojectfile
│ │ │ ├── lookerupdateprojectfile_test.go
│ │ │ └── lookerupdateprojectfile.go
│ │ ├── mindsdb
│ │ │ ├── mindsdbexecutesql
│ │ │ │ ├── mindsdbexecutesql_test.go
│ │ │ │ └── mindsdbexecutesql.go
│ │ │ └── mindsdbsql
│ │ │ ├── mindsdbsql_test.go
│ │ │ └── mindsdbsql.go
│ │ ├── mongodb
│ │ │ ├── mongodbaggregate
│ │ │ │ ├── mongodbaggregate_test.go
│ │ │ │ └── mongodbaggregate.go
│ │ │ ├── mongodbdeletemany
│ │ │ │ ├── mongodbdeletemany_test.go
│ │ │ │ └── mongodbdeletemany.go
│ │ │ ├── mongodbdeleteone
│ │ │ │ ├── mongodbdeleteone_test.go
│ │ │ │ └── mongodbdeleteone.go
│ │ │ ├── mongodbfind
│ │ │ │ ├── mongodbfind_test.go
│ │ │ │ └── mongodbfind.go
│ │ │ ├── mongodbfindone
│ │ │ │ ├── mongodbfindone_test.go
│ │ │ │ └── mongodbfindone.go
│ │ │ ├── mongodbinsertmany
│ │ │ │ ├── mongodbinsertmany_test.go
│ │ │ │ └── mongodbinsertmany.go
│ │ │ ├── mongodbinsertone
│ │ │ │ ├── mongodbinsertone_test.go
│ │ │ │ └── mongodbinsertone.go
│ │ │ ├── mongodbupdatemany
│ │ │ │ ├── mongodbupdatemany_test.go
│ │ │ │ └── mongodbupdatemany.go
│ │ │ └── mongodbupdateone
│ │ │ ├── mongodbupdateone_test.go
│ │ │ └── mongodbupdateone.go
│ │ ├── mssql
│ │ │ ├── mssqlexecutesql
│ │ │ │ ├── mssqlexecutesql_test.go
│ │ │ │ └── mssqlexecutesql.go
│ │ │ ├── mssqllisttables
│ │ │ │ ├── mssqllisttables_test.go
│ │ │ │ └── mssqllisttables.go
│ │ │ └── mssqlsql
│ │ │ ├── mssqlsql_test.go
│ │ │ └── mssqlsql.go
│ │ ├── mysql
│ │ │ ├── mysqlcommon
│ │ │ │ └── mysqlcommon.go
│ │ │ ├── mysqlexecutesql
│ │ │ │ ├── mysqlexecutesql_test.go
│ │ │ │ └── mysqlexecutesql.go
│ │ │ ├── mysqlgetqueryplan
│ │ │ │ ├── mysqlgetqueryplan_test.go
│ │ │ │ └── mysqlgetqueryplan.go
│ │ │ ├── mysqllistactivequeries
│ │ │ │ ├── mysqllistactivequeries_test.go
│ │ │ │ └── mysqllistactivequeries.go
│ │ │ ├── mysqllisttablefragmentation
│ │ │ │ ├── mysqllisttablefragmentation_test.go
│ │ │ │ └── mysqllisttablefragmentation.go
│ │ │ ├── mysqllisttables
│ │ │ │ ├── mysqllisttables_test.go
│ │ │ │ └── mysqllisttables.go
│ │ │ ├── mysqllisttablesmissinguniqueindexes
│ │ │ │ ├── mysqllisttablesmissinguniqueindexes_test.go
│ │ │ │ └── mysqllisttablesmissinguniqueindexes.go
│ │ │ └── mysqlsql
│ │ │ ├── mysqlsql_test.go
│ │ │ └── mysqlsql.go
│ │ ├── neo4j
│ │ │ ├── neo4jcypher
│ │ │ │ ├── neo4jcypher_test.go
│ │ │ │ └── neo4jcypher.go
│ │ │ ├── neo4jexecutecypher
│ │ │ │ ├── classifier
│ │ │ │ │ ├── classifier_test.go
│ │ │ │ │ └── classifier.go
│ │ │ │ ├── neo4jexecutecypher_test.go
│ │ │ │ └── neo4jexecutecypher.go
│ │ │ └── neo4jschema
│ │ │ ├── cache
│ │ │ │ ├── cache_test.go
│ │ │ │ └── cache.go
│ │ │ ├── helpers
│ │ │ │ ├── helpers_test.go
│ │ │ │ └── helpers.go
│ │ │ ├── neo4jschema_test.go
│ │ │ ├── neo4jschema.go
│ │ │ └── types
│ │ │ └── types.go
│ │ ├── oceanbase
│ │ │ ├── oceanbaseexecutesql
│ │ │ │ ├── oceanbaseexecutesql_test.go
│ │ │ │ └── oceanbaseexecutesql.go
│ │ │ └── oceanbasesql
│ │ │ ├── oceanbasesql_test.go
│ │ │ └── oceanbasesql.go
│ │ ├── oracle
│ │ │ ├── oracleexecutesql
│ │ │ │ ├── oracleexecutesql_test.go
│ │ │ │ └── oracleexecutesql.go
│ │ │ └── oraclesql
│ │ │ ├── oraclesql_test.go
│ │ │ └── oraclesql.go
│ │ ├── postgres
│ │ │ ├── postgresdatabaseoverview
│ │ │ │ ├── postgresdatabaseoverview_test.go
│ │ │ │ └── postgresdatabaseoverview.go
│ │ │ ├── postgresexecutesql
│ │ │ │ ├── postgresexecutesql_test.go
│ │ │ │ └── postgresexecutesql.go
│ │ │ ├── postgresgetcolumncardinality
│ │ │ │ ├── postgresgetcolumncardinality_test.go
│ │ │ │ └── postgresgetcolumncardinality.go
│ │ │ ├── postgreslistactivequeries
│ │ │ │ ├── postgreslistactivequeries_test.go
│ │ │ │ └── postgreslistactivequeries.go
│ │ │ ├── postgreslistavailableextensions
│ │ │ │ ├── postgreslistavailableextensions_test.go
│ │ │ │ └── postgreslistavailableextensions.go
│ │ │ ├── postgreslistdatabasestats
│ │ │ │ ├── postgreslistdatabasestats_test.go
│ │ │ │ └── postgreslistdatabasestats.go
│ │ │ ├── postgreslistindexes
│ │ │ │ ├── postgreslistindexes_test.go
│ │ │ │ └── postgreslistindexes.go
│ │ │ ├── postgreslistinstalledextensions
│ │ │ │ ├── postgreslistinstalledextensions_test.go
│ │ │ │ └── postgreslistinstalledextensions.go
│ │ │ ├── postgreslistlocks
│ │ │ │ ├── postgreslistlocks_test.go
│ │ │ │ └── postgreslistlocks.go
│ │ │ ├── postgreslistpgsettings
│ │ │ │ ├── postgreslistpgsettings_test.go
│ │ │ │ └── postgreslistpgsettings.go
│ │ │ ├── postgreslistpublicationtables
│ │ │ │ ├── postgreslistpublicationtables_test.go
│ │ │ │ └── postgreslistpublicationtables.go
│ │ │ ├── postgreslistquerystats
│ │ │ │ ├── postgreslistquerystats_test.go
│ │ │ │ └── postgreslistquerystats.go
│ │ │ ├── postgreslistroles
│ │ │ │ ├── postgreslistroles_test.go
│ │ │ │ └── postgreslistroles.go
│ │ │ ├── postgreslistschemas
│ │ │ │ ├── postgreslistschemas_test.go
│ │ │ │ └── postgreslistschemas.go
│ │ │ ├── postgreslistsequences
│ │ │ │ ├── postgreslistsequences_test.go
│ │ │ │ └── postgreslistsequences.go
│ │ │ ├── postgresliststoredprocedure
│ │ │ │ ├── postgresliststoredprocedure_test.go
│ │ │ │ └── postgresliststoredprocedure.go
│ │ │ ├── postgreslisttables
│ │ │ │ ├── postgreslisttables_test.go
│ │ │ │ └── postgreslisttables.go
│ │ │ ├── postgreslisttablespaces
│ │ │ │ ├── postgreslisttablespaces_test.go
│ │ │ │ └── postgreslisttablespaces.go
│ │ │ ├── postgreslisttablestats
│ │ │ │ ├── postgreslisttablestats_test.go
│ │ │ │ └── postgreslisttablestats.go
│ │ │ ├── postgreslisttriggers
│ │ │ │ ├── postgreslisttriggers_test.go
│ │ │ │ └── postgreslisttriggers.go
│ │ │ ├── postgreslistviews
│ │ │ │ ├── postgreslistviews_test.go
│ │ │ │ └── postgreslistviews.go
│ │ │ ├── postgreslongrunningtransactions
│ │ │ │ ├── postgreslongrunningtransactions_test.go
│ │ │ │ └── postgreslongrunningtransactions.go
│ │ │ ├── postgresreplicationstats
│ │ │ │ ├── postgresreplicationstats_test.go
│ │ │ │ └── postgresreplicationstats.go
│ │ │ └── postgressql
│ │ │ ├── postgressql_test.go
│ │ │ └── postgressql.go
│ │ ├── redis
│ │ │ ├── redis_test.go
│ │ │ └── redis.go
│ │ ├── serverlessspark
│ │ │ ├── createbatch
│ │ │ │ ├── config.go
│ │ │ │ └── tool.go
│ │ │ ├── serverlesssparkcancelbatch
│ │ │ │ ├── serverlesssparkcancelbatch_test.go
│ │ │ │ └── serverlesssparkcancelbatch.go
│ │ │ ├── serverlesssparkcreatepysparkbatch
│ │ │ │ ├── serverlesssparkcreatepysparkbatch_test.go
│ │ │ │ └── serverlesssparkcreatepysparkbatch.go
│ │ │ ├── serverlesssparkcreatesparkbatch
│ │ │ │ ├── serverlesssparkcreatesparkbatch_test.go
│ │ │ │ └── serverlesssparkcreatesparkbatch.go
│ │ │ ├── serverlesssparkgetbatch
│ │ │ │ ├── serverlesssparkgetbatch_test.go
│ │ │ │ └── serverlesssparkgetbatch.go
│ │ │ ├── serverlesssparklistbatches
│ │ │ │ ├── serverlesssparklistbatches_test.go
│ │ │ │ └── serverlesssparklistbatches.go
│ │ │ └── testutils
│ │ │ └── testutils.go
│ │ ├── singlestore
│ │ │ ├── singlestoreexecutesql
│ │ │ │ ├── singlestoreexecutesql_test.go
│ │ │ │ └── singlestoreexecutesql.go
│ │ │ └── singlestoresql
│ │ │ ├── singlestoresql_test.go
│ │ │ └── singlestoresql.go
│ │ ├── snowflake
│ │ │ ├── snowflakeexecutesql
│ │ │ │ ├── snowflakeexecutesql_test.go
│ │ │ │ └── snowflakeexecutesql.go
│ │ │ └── snowflakesql
│ │ │ ├── snowflakesql_test.go
│ │ │ └── snowflakesql.go
│ │ ├── spanner
│ │ │ ├── spannerexecutesql
│ │ │ │ ├── spannerexecutesql_test.go
│ │ │ │ └── spannerexecutesql.go
│ │ │ ├── spannerlistgraphs
│ │ │ │ ├── spannerlistgraphs_test.go
│ │ │ │ └── spannerlistgraphs.go
│ │ │ ├── spannerlisttables
│ │ │ │ ├── spannerlisttables_test.go
│ │ │ │ └── spannerlisttables.go
│ │ │ └── spannersql
│ │ │ ├── spanner_test.go
│ │ │ └── spannersql.go
│ │ ├── sqlite
│ │ │ ├── sqliteexecutesql
│ │ │ │ ├── sqliteexecutesql_test.go
│ │ │ │ └── sqliteexecutesql.go
│ │ │ └── sqlitesql
│ │ │ ├── sqlitesql_test.go
│ │ │ └── sqlitesql.go
│ │ ├── tidb
│ │ │ ├── tidbexecutesql
│ │ │ │ ├── tidbexecutesql_test.go
│ │ │ │ └── tidbexecutesql.go
│ │ │ └── tidbsql
│ │ │ ├── tidbsql_test.go
│ │ │ └── tidbsql.go
│ │ ├── tools_test.go
│ │ ├── tools.go
│ │ ├── toolsets.go
│ │ ├── trino
│ │ │ ├── trinoexecutesql
│ │ │ │ ├── trinoexecutesql_test.go
│ │ │ │ └── trinoexecutesql.go
│ │ │ └── trinosql
│ │ │ ├── trinosql_test.go
│ │ │ └── trinosql.go
│ │ ├── utility
│ │ │ └── wait
│ │ │ ├── wait_test.go
│ │ │ └── wait.go
│ │ ├── valkey
│ │ │ ├── valkey_test.go
│ │ │ └── valkey.go
│ │ └── yugabytedbsql
│ │ ├── yugabytedbsql_test.go
│ │ └── yugabytedbsql.go
│ └── util
│ ├── orderedmap
│ │ ├── orderedmap_test.go
│ │ └── orderedmap.go
│ ├── parameters
│ │ ├── common_test.go
│ │ ├── common.go
│ │ ├── parameters_test.go
│ │ └── parameters.go
│ └── util.go
├── LICENSE
├── logo.png
├── main.go
├── MCP-TOOLBOX-EXTENSION.md
├── README.md
├── server.json
└── tests
├── alloydb
│ ├── alloydb_integration_test.go
│ └── alloydb_wait_for_operation_test.go
├── alloydbainl
│ └── alloydb_ai_nl_integration_test.go
├── alloydbpg
│ └── alloydb_pg_integration_test.go
├── auth.go
├── bigquery
│ └── bigquery_integration_test.go
├── bigtable
│ └── bigtable_integration_test.go
├── cassandra
│ └── cassandra_integration_test.go
├── clickhouse
│ └── clickhouse_integration_test.go
├── cloudgda
│ └── cloud_gda_integration_test.go
├── cloudhealthcare
│ └── cloud_healthcare_integration_test.go
├── cloudmonitoring
│ └── cloud_monitoring_integration_test.go
├── cloudsql
│ ├── cloud_sql_clone_instance_test.go
│ ├── cloud_sql_create_database_test.go
│ ├── cloud_sql_create_users_test.go
│ ├── cloud_sql_get_instances_test.go
│ ├── cloud_sql_list_databases_test.go
│ ├── cloudsql_list_instances_test.go
│ └── cloudsql_wait_for_operation_test.go
├── cloudsqlmssql
│ ├── cloud_sql_mssql_create_instance_integration_test.go
│ └── cloud_sql_mssql_integration_test.go
├── cloudsqlmysql
│ ├── cloud_sql_mysql_create_instance_integration_test.go
│ └── cloud_sql_mysql_integration_test.go
├── cloudsqlpg
│ ├── cloud_sql_pg_create_instances_test.go
│ ├── cloud_sql_pg_integration_test.go
│ └── cloud_sql_pg_upgrade_precheck_test.go
├── common.go
├── couchbase
│ └── couchbase_integration_test.go
├── dataform
│ └── dataform_integration_test.go
├── dataplex
│ └── dataplex_integration_test.go
├── dgraph
│ └── dgraph_integration_test.go
├── elasticsearch
│ └── elasticsearch_integration_test.go
├── firebird
│ └── firebird_integration_test.go
├── firestore
│ └── firestore_integration_test.go
├── http
│ └── http_integration_test.go
├── looker
│ └── looker_integration_test.go
├── mariadb
│ └── mariadb_integration_test.go
├── mindsdb
│ └── mindsdb_integration_test.go
├── mongodb
│ └── mongodb_integration_test.go
├── mssql
│ └── mssql_integration_test.go
├── mysql
│ └── mysql_integration_test.go
├── neo4j
│ └── neo4j_integration_test.go
├── oceanbase
│ └── oceanbase_integration_test.go
├── option.go
├── oracle
│ └── oracle_integration_test.go
├── postgres
│ └── postgres_integration_test.go
├── prompts
│ └── custom
│ └── prompts_integration_test.go
├── redis
│ └── redis_test.go
├── server.go
├── serverlessspark
│ └── serverless_spark_integration_test.go
├── singlestore
│ └── singlestore_integration_test.go
├── snowflake
│ └── snowflake_integration_test.go
├── source.go
├── spanner
│ └── spanner_integration_test.go
├── sqlite
│ └── sqlite_integration_test.go
├── tidb
│ └── tidb_integration_test.go
├── tool.go
├── trino
│ └── trino_integration_test.go
├── utility
│ └── wait_integration_test.go
├── valkey
│ └── valkey_test.go
└── yugabytedb
└── yugabytedb_integration_test.go
```
# Files
--------------------------------------------------------------------------------
/.github/workflows/link_checker_workflow.yaml:
--------------------------------------------------------------------------------
```yaml
1 | # Copyright 2025 Google LLC
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | name: Link Checker
15 |
16 | on:
17 | pull_request:
18 |
19 |
20 | jobs:
21 | link-check:
22 | runs-on: ubuntu-latest
23 | steps:
24 | - name: Checkout Repository
25 | uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
26 |
27 | - name: Restore lychee cache
28 | uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5
29 | with:
30 | path: .lycheecache
31 | key: cache-lychee-${{ github.sha }}
32 | restore-keys: cache-lychee-
33 |
34 | - name: Link Checker
35 | uses: lycheeverse/lychee-action@a8c4c7cb88f0c7386610c35eb25108e448569cb0 # v2
36 | with:
37 | args: >
38 | --verbose
39 | --no-progress
40 | --cache
41 | --max-cache-age 1d
42 | README.md
43 | docs/
44 | output: /tmp/foo.txt
45 | fail: true
46 | jobSummary: true
47 | debug: true
48 | env:
49 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50 | # This step only runs if the 'lychee_check' step fails, ensuring the
51 | # context note only appears when the developer needs to troubleshoot.
52 | - name: Display Link Context Note on Failure
53 | if: ${{ failure() }}
54 | run: |
55 | echo "## Link Resolution Note" >> $GITHUB_STEP_SUMMARY
56 | echo "Local links and directory changes work differently on GitHub than on the docsite." >> $GITHUB_STEP_SUMMARY
57 | echo "You must ensure fixes pass the **GitHub check** and also work with **\`hugo server\`**." >> $GITHUB_STEP_SUMMARY
58 | echo "---" >> $GITHUB_STEP_SUMMARY
59 |
60 |
```
--------------------------------------------------------------------------------
/internal/prebuiltconfigs/tools/spanner.yaml:
--------------------------------------------------------------------------------
```yaml
1 | # Copyright 2025 Google LLC
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | sources:
16 | spanner-source:
17 | kind: spanner
18 | project: ${SPANNER_PROJECT}
19 | instance: ${SPANNER_INSTANCE}
20 | database: ${SPANNER_DATABASE}
21 | dialect: ${SPANNER_DIALECT:googlesql}
22 |
23 | tools:
24 | execute_sql:
25 | kind: spanner-execute-sql
26 | source: spanner-source
27 | description: Use this tool to execute DML SQL. Please use the ${SPANNER_DIALECT:googlesql} interface for Spanner.
28 |
29 | execute_sql_dql:
30 | kind: spanner-execute-sql
31 | source: spanner-source
32 | description: Use this tool to execute DQL SQL. Please use the ${SPANNER_DIALECT:googlesql} interface for Spanner.
33 | readOnly: true
34 |
35 | list_tables:
36 | kind: spanner-list-tables
37 | source: spanner-source
38 | description: "Lists detailed schema information (object type, columns, constraints, indexes) as JSON for user-created tables (ordinary or partitioned). Filters by a comma-separated list of names. If names are omitted, lists all tables in user schemas. The output can be 'simple' (table names only) or 'detailed' (full schema)."
39 |
40 | list_graphs:
41 | kind: spanner-list-graphs
42 | source: spanner-source
43 | description: "Lists detailed graph schema information (node tables, edge tables, labels and property declarations) as JSON for user-created graphs. Filters by a comma-separated list of graph names. If names are omitted, lists all graphs. The output can be 'simple' (graph names only) or 'detailed' (full schema)."
44 |
45 | toolsets:
46 | spanner-database-tools:
47 | - execute_sql
48 | - execute_sql_dql
49 | - list_tables
50 | - list_graphs
51 |
```
--------------------------------------------------------------------------------
/docs/en/resources/tools/bigquery/bigquery-list-dataset-ids.md:
--------------------------------------------------------------------------------
```markdown
1 | ---
2 | title: "bigquery-list-dataset-ids"
3 | type: docs
4 | weight: 1
5 | description: >
6 | A "bigquery-list-dataset-ids" tool returns all dataset IDs from the source.
7 | aliases:
8 | - /resources/tools/bigquery-list-dataset-ids
9 | ---
10 |
11 | ## About
12 |
13 | A `bigquery-list-dataset-ids` tool returns all dataset IDs from the source.
14 | It's compatible with the following sources:
15 |
16 | - [bigquery](../../sources/bigquery.md)
17 |
18 | `bigquery-list-dataset-ids` accepts the following parameter:
19 |
20 | - **`project`** (optional): Defines the Google Cloud project ID. If not provided,
21 | the tool defaults to the project from the source configuration.
22 |
23 | The tool's behavior regarding this parameter is influenced by the
24 | `allowedDatasets` restriction on the `bigquery` source:
25 |
26 | - **Without `allowedDatasets` restriction:** The tool can list datasets from any
27 | project specified by the `project` parameter.
28 | - **With `allowedDatasets` restriction:** The tool directly returns the
29 | pre-configured list of dataset IDs from the source, and the `project`
30 | parameter is ignored.
31 |
32 | ## Example
33 |
34 | ```yaml
35 | tools:
36 | bigquery_list_dataset_ids:
37 | kind: bigquery-list-dataset-ids
38 | source: my-bigquery-source
39 | description: Use this tool to get dataset metadata.
40 | ```
41 |
42 | ## Reference
43 |
44 | | **field** | **type** | **required** | **description** |
45 | |-------------|:------------------------------------------:|:------------:|--------------------------------------------------------------------------------------------------|
46 | | kind | string | true | Must be "bigquery-list-dataset-ids". |
47 | | source | string | true | Name of the source the SQL should execute on. |
48 | | description | string | true | Description of the tool that is passed to the LLM. |
49 |
```
--------------------------------------------------------------------------------
/internal/tools/cloudhealthcare/cloudhealthcaresearchdicomstudies/cloudhealthcaresearchdicomstudies_test.go:
--------------------------------------------------------------------------------
```go
1 | // Copyright 2025 Google LLC
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package searchdicomstudies_test
16 |
17 | import (
18 | "testing"
19 |
20 | yaml "github.com/goccy/go-yaml"
21 | "github.com/google/go-cmp/cmp"
22 | "github.com/googleapis/genai-toolbox/internal/server"
23 | "github.com/googleapis/genai-toolbox/internal/testutils"
24 | searchdicomstudies "github.com/googleapis/genai-toolbox/internal/tools/cloudhealthcare/cloudhealthcaresearchdicomstudies"
25 | )
26 |
27 | func TestParseFromYamlHealthcareSearchDICOMStudies(t *testing.T) {
28 | ctx, err := testutils.ContextWithNewLogger()
29 | if err != nil {
30 | t.Fatalf("unexpected error: %s", err)
31 | }
32 | tcs := []struct {
33 | desc string
34 | in string
35 | want server.ToolConfigs
36 | }{
37 | {
38 | desc: "basic example",
39 | in: `
40 | tools:
41 | example_tool:
42 | kind: cloud-healthcare-search-dicom-studies
43 | source: my-instance
44 | description: some description
45 | `,
46 | want: server.ToolConfigs{
47 | "example_tool": searchdicomstudies.Config{
48 | Name: "example_tool",
49 | Kind: "cloud-healthcare-search-dicom-studies",
50 | Source: "my-instance",
51 | Description: "some description",
52 | AuthRequired: []string{},
53 | },
54 | },
55 | },
56 | }
57 | for _, tc := range tcs {
58 | t.Run(tc.desc, func(t *testing.T) {
59 | got := struct {
60 | Tools server.ToolConfigs `yaml:"tools"`
61 | }{}
62 | // Parse contents
63 | err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got)
64 | if err != nil {
65 | t.Fatalf("unable to unmarshal: %s", err)
66 | }
67 | if diff := cmp.Diff(tc.want, got.Tools); diff != "" {
68 | t.Fatalf("incorrect parse: diff %v", diff)
69 | }
70 | })
71 | }
72 | }
73 |
```
--------------------------------------------------------------------------------
/docs/en/resources/tools/postgres/postgres-database-overview.md:
--------------------------------------------------------------------------------
```markdown
1 | ---
2 | title: "postgres-database-overview"
3 | type: docs
4 | weight: 1
5 | description: >
6 | The "postgres-database-overview" fetches the current state of the PostgreSQL server.
7 | aliases:
8 | - /resources/tools/postgres-database-overview
9 | ---
10 |
11 | ## About
12 |
13 | The `postgres-database-overview` fetches the current state of the PostgreSQL
14 | server. It's compatible with any of the following sources:
15 |
16 | - [alloydb-postgres](../../sources/alloydb-pg.md)
17 | - [cloud-sql-postgres](../../sources/cloud-sql-pg.md)
18 | - [postgres](../../sources/postgres.md)
19 |
20 | `postgres-database-overview` fetches the current state of the PostgreSQL server
21 | This tool does not take any input parameters.
22 |
23 | ## Example
24 |
25 | ```yaml
26 | tools:
27 | database_overview:
28 | kind: postgres-database-overview
29 | source: cloudsql-pg-source
30 | description: |
31 | fetches the current state of the PostgreSQL server. It returns the postgres version, whether it's a replica, uptime duration, maximum connection limit, number of current connections, number of active connections and the percentage of connections in use.
32 | ```
33 |
34 | The response is a JSON object with the following elements:
35 |
36 | ```json
37 | {
38 | "pg_version": "PostgreSQL server version string",
39 | "is_replica": "boolean indicating if the instance is in recovery mode",
40 | "uptime": "interval string representing the total server uptime",
41 | "max_connections": "integer maximum number of allowed connections",
42 | "current_connections": "integer number of current connections",
43 | "active_connections": "integer number of currently active connections",
44 | "pct_connections_used": "float percentage of max_connections currently in use"
45 | }
46 | ```
47 |
48 | ## Reference
49 |
50 | | **field** | **type** | **required** | **description** |
51 | |-------------|:--------:|:------------:|------------------------------------------------------|
52 | | kind | string | true | Must be "postgres-database-overview". |
53 | | source | string | true | Name of the source the SQL should execute on. |
54 | | description | string | false | Description of the tool that is passed to the agent. |
55 |
```
--------------------------------------------------------------------------------
/internal/tools/tidb/tidbexecutesql/tidbexecutesql_test.go:
--------------------------------------------------------------------------------
```go
1 | // Copyright 2025 Google LLC
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package tidbexecutesql_test
16 |
17 | import (
18 | "testing"
19 |
20 | yaml "github.com/goccy/go-yaml"
21 | "github.com/google/go-cmp/cmp"
22 | "github.com/googleapis/genai-toolbox/internal/server"
23 | "github.com/googleapis/genai-toolbox/internal/testutils"
24 | "github.com/googleapis/genai-toolbox/internal/tools/tidb/tidbexecutesql"
25 | )
26 |
27 | func TestParseFromYamlExecuteSql(t *testing.T) {
28 | ctx, err := testutils.ContextWithNewLogger()
29 | if err != nil {
30 | t.Fatalf("unexpected error: %s", err)
31 | }
32 | tcs := []struct {
33 | desc string
34 | in string
35 | want server.ToolConfigs
36 | }{
37 | {
38 | desc: "basic example",
39 | in: `
40 | tools:
41 | example_tool:
42 | kind: tidb-execute-sql
43 | source: my-instance
44 | description: some description
45 | authRequired:
46 | - my-google-auth-service
47 | - other-auth-service
48 | `,
49 | want: server.ToolConfigs{
50 | "example_tool": tidbexecutesql.Config{
51 | Name: "example_tool",
52 | Kind: "tidb-execute-sql",
53 | Source: "my-instance",
54 | Description: "some description",
55 | AuthRequired: []string{"my-google-auth-service", "other-auth-service"},
56 | },
57 | },
58 | },
59 | }
60 | for _, tc := range tcs {
61 | t.Run(tc.desc, func(t *testing.T) {
62 | got := struct {
63 | Tools server.ToolConfigs `yaml:"tools"`
64 | }{}
65 | // Parse contents
66 | err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got)
67 | if err != nil {
68 | t.Fatalf("unable to unmarshal: %s", err)
69 | }
70 | if diff := cmp.Diff(tc.want, got.Tools); diff != "" {
71 | t.Fatalf("incorrect parse: diff %v", diff)
72 | }
73 | })
74 | }
75 |
76 | }
77 |
```
--------------------------------------------------------------------------------
/internal/tools/cloudhealthcare/cloudhealthcaregetfhirstoremetrics/cloudhealthcaregetfhirstoremetrics_test.go:
--------------------------------------------------------------------------------
```go
1 | // Copyright 2025 Google LLC
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package getfhirstoremetrics_test
16 |
17 | import (
18 | "testing"
19 |
20 | yaml "github.com/goccy/go-yaml"
21 | "github.com/google/go-cmp/cmp"
22 | "github.com/googleapis/genai-toolbox/internal/server"
23 | "github.com/googleapis/genai-toolbox/internal/testutils"
24 | getfhirstoremetrics "github.com/googleapis/genai-toolbox/internal/tools/cloudhealthcare/cloudhealthcaregetfhirstoremetrics"
25 | )
26 |
27 | func TestParseFromYamlHealthcareGetFHIRStoreMetrics(t *testing.T) {
28 | ctx, err := testutils.ContextWithNewLogger()
29 | if err != nil {
30 | t.Fatalf("unexpected error: %s", err)
31 | }
32 | tcs := []struct {
33 | desc string
34 | in string
35 | want server.ToolConfigs
36 | }{
37 | {
38 | desc: "basic example",
39 | in: `
40 | tools:
41 | example_tool:
42 | kind: cloud-healthcare-get-fhir-store-metrics
43 | source: my-instance
44 | description: some description
45 | `,
46 | want: server.ToolConfigs{
47 | "example_tool": getfhirstoremetrics.Config{
48 | Name: "example_tool",
49 | Kind: "cloud-healthcare-get-fhir-store-metrics",
50 | Source: "my-instance",
51 | Description: "some description",
52 | AuthRequired: []string{},
53 | },
54 | },
55 | },
56 | }
57 | for _, tc := range tcs {
58 | t.Run(tc.desc, func(t *testing.T) {
59 | got := struct {
60 | Tools server.ToolConfigs `yaml:"tools"`
61 | }{}
62 | // Parse contents
63 | err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got)
64 | if err != nil {
65 | t.Fatalf("unable to unmarshal: %s", err)
66 | }
67 | if diff := cmp.Diff(tc.want, got.Tools); diff != "" {
68 | t.Fatalf("incorrect parse: diff %v", diff)
69 | }
70 | })
71 | }
72 | }
73 |
```
--------------------------------------------------------------------------------
/internal/tools/toolsets.go:
--------------------------------------------------------------------------------
```go
1 | // Copyright 2024 Google LLC
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package tools
16 |
17 | import (
18 | "fmt"
19 | "regexp"
20 | )
21 |
22 | type ToolsetConfig struct {
23 | Name string `yaml:"name"`
24 | ToolNames []string `yaml:",inline"`
25 | }
26 |
27 | type Toolset struct {
28 | ToolsetConfig
29 | Tools []*Tool `yaml:",inline"`
30 | Manifest ToolsetManifest `yaml:",inline"`
31 | McpManifest []McpManifest `yaml:",inline"`
32 | }
33 |
34 | func (t Toolset) ToConfig() ToolsetConfig {
35 | return t.ToolsetConfig
36 | }
37 |
38 | type ToolsetManifest struct {
39 | ServerVersion string `json:"serverVersion"`
40 | ToolsManifest map[string]Manifest `json:"tools"`
41 | }
42 |
43 | func (t ToolsetConfig) Initialize(serverVersion string, toolsMap map[string]Tool) (Toolset, error) {
44 | // finish toolset setup
45 | // Check each declared tool name exists
46 | var toolset Toolset
47 | toolset.Name = t.Name
48 | if !IsValidName(toolset.Name) {
49 | return toolset, fmt.Errorf("invalid toolset name: %s", toolset.Name)
50 | }
51 | toolset.Tools = make([]*Tool, 0, len(t.ToolNames))
52 | toolset.Manifest = ToolsetManifest{
53 | ServerVersion: serverVersion,
54 | ToolsManifest: make(map[string]Manifest),
55 | }
56 | for _, toolName := range t.ToolNames {
57 | tool, ok := toolsMap[toolName]
58 | if !ok {
59 | return toolset, fmt.Errorf("tool does not exist: %s", toolName)
60 | }
61 | toolset.Tools = append(toolset.Tools, &tool)
62 | toolset.Manifest.ToolsManifest[toolName] = tool.Manifest()
63 | toolset.McpManifest = append(toolset.McpManifest, tool.McpManifest())
64 | }
65 |
66 | return toolset, nil
67 | }
68 |
69 | var validName = regexp.MustCompile(`^[a-zA-Z0-9_-]*$`)
70 |
71 | func IsValidName(s string) bool {
72 | return validName.MatchString(s)
73 | }
74 |
```
--------------------------------------------------------------------------------
/internal/tools/mssql/mssqlexecutesql/mssqlexecutesql_test.go:
--------------------------------------------------------------------------------
```go
1 | // Copyright 2025 Google LLC
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package mssqlexecutesql_test
16 |
17 | import (
18 | "testing"
19 |
20 | yaml "github.com/goccy/go-yaml"
21 | "github.com/google/go-cmp/cmp"
22 | "github.com/googleapis/genai-toolbox/internal/server"
23 | "github.com/googleapis/genai-toolbox/internal/testutils"
24 | "github.com/googleapis/genai-toolbox/internal/tools/mssql/mssqlexecutesql"
25 | )
26 |
27 | func TestParseFromYamlExecuteSql(t *testing.T) {
28 | ctx, err := testutils.ContextWithNewLogger()
29 | if err != nil {
30 | t.Fatalf("unexpected error: %s", err)
31 | }
32 | tcs := []struct {
33 | desc string
34 | in string
35 | want server.ToolConfigs
36 | }{
37 | {
38 | desc: "basic example",
39 | in: `
40 | tools:
41 | example_tool:
42 | kind: mssql-execute-sql
43 | source: my-instance
44 | description: some description
45 | authRequired:
46 | - my-google-auth-service
47 | - other-auth-service
48 | `,
49 | want: server.ToolConfigs{
50 | "example_tool": mssqlexecutesql.Config{
51 | Name: "example_tool",
52 | Kind: "mssql-execute-sql",
53 | Source: "my-instance",
54 | Description: "some description",
55 | AuthRequired: []string{"my-google-auth-service", "other-auth-service"},
56 | },
57 | },
58 | },
59 | }
60 | for _, tc := range tcs {
61 | t.Run(tc.desc, func(t *testing.T) {
62 | got := struct {
63 | Tools server.ToolConfigs `yaml:"tools"`
64 | }{}
65 | // Parse contents
66 | err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got)
67 | if err != nil {
68 | t.Fatalf("unable to unmarshal: %s", err)
69 | }
70 | if diff := cmp.Diff(tc.want, got.Tools); diff != "" {
71 | t.Fatalf("incorrect parse: diff %v", diff)
72 | }
73 | })
74 | }
75 |
76 | }
77 |
```
--------------------------------------------------------------------------------
/internal/tools/mysql/mysqlexecutesql/mysqlexecutesql_test.go:
--------------------------------------------------------------------------------
```go
1 | // Copyright 2025 Google LLC
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package mysqlexecutesql_test
16 |
17 | import (
18 | "testing"
19 |
20 | yaml "github.com/goccy/go-yaml"
21 | "github.com/google/go-cmp/cmp"
22 | "github.com/googleapis/genai-toolbox/internal/server"
23 | "github.com/googleapis/genai-toolbox/internal/testutils"
24 | "github.com/googleapis/genai-toolbox/internal/tools/mysql/mysqlexecutesql"
25 | )
26 |
27 | func TestParseFromYamlExecuteSql(t *testing.T) {
28 | ctx, err := testutils.ContextWithNewLogger()
29 | if err != nil {
30 | t.Fatalf("unexpected error: %s", err)
31 | }
32 | tcs := []struct {
33 | desc string
34 | in string
35 | want server.ToolConfigs
36 | }{
37 | {
38 | desc: "basic example",
39 | in: `
40 | tools:
41 | example_tool:
42 | kind: mysql-execute-sql
43 | source: my-instance
44 | description: some description
45 | authRequired:
46 | - my-google-auth-service
47 | - other-auth-service
48 | `,
49 | want: server.ToolConfigs{
50 | "example_tool": mysqlexecutesql.Config{
51 | Name: "example_tool",
52 | Kind: "mysql-execute-sql",
53 | Source: "my-instance",
54 | Description: "some description",
55 | AuthRequired: []string{"my-google-auth-service", "other-auth-service"},
56 | },
57 | },
58 | },
59 | }
60 | for _, tc := range tcs {
61 | t.Run(tc.desc, func(t *testing.T) {
62 | got := struct {
63 | Tools server.ToolConfigs `yaml:"tools"`
64 | }{}
65 | // Parse contents
66 | err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got)
67 | if err != nil {
68 | t.Fatalf("unable to unmarshal: %s", err)
69 | }
70 | if diff := cmp.Diff(tc.want, got.Tools); diff != "" {
71 | t.Fatalf("incorrect parse: diff %v", diff)
72 | }
73 | })
74 | }
75 |
76 | }
77 |
```
--------------------------------------------------------------------------------
/internal/tools/cloudhealthcare/cloudhealthcaresearchdicominstances/cloudhealthcaresearchdicominstances_test.go:
--------------------------------------------------------------------------------
```go
1 | // Copyright 2025 Google LLC
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package searchdicominstances_test
16 |
17 | import (
18 | "testing"
19 |
20 | yaml "github.com/goccy/go-yaml"
21 | "github.com/google/go-cmp/cmp"
22 | "github.com/googleapis/genai-toolbox/internal/server"
23 | "github.com/googleapis/genai-toolbox/internal/testutils"
24 | searchdicominstances "github.com/googleapis/genai-toolbox/internal/tools/cloudhealthcare/cloudhealthcaresearchdicominstances"
25 | )
26 |
27 | func TestParseFromYamlHealthcareSearchDICOMInstances(t *testing.T) {
28 | ctx, err := testutils.ContextWithNewLogger()
29 | if err != nil {
30 | t.Fatalf("unexpected error: %s", err)
31 | }
32 | tcs := []struct {
33 | desc string
34 | in string
35 | want server.ToolConfigs
36 | }{
37 | {
38 | desc: "basic example",
39 | in: `
40 | tools:
41 | example_tool:
42 | kind: cloud-healthcare-search-dicom-instances
43 | source: my-instance
44 | description: some description
45 | `,
46 | want: server.ToolConfigs{
47 | "example_tool": searchdicominstances.Config{
48 | Name: "example_tool",
49 | Kind: "cloud-healthcare-search-dicom-instances",
50 | Source: "my-instance",
51 | Description: "some description",
52 | AuthRequired: []string{},
53 | },
54 | },
55 | },
56 | }
57 | for _, tc := range tcs {
58 | t.Run(tc.desc, func(t *testing.T) {
59 | got := struct {
60 | Tools server.ToolConfigs `yaml:"tools"`
61 | }{}
62 | // Parse contents
63 | err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got)
64 | if err != nil {
65 | t.Fatalf("unable to unmarshal: %s", err)
66 | }
67 | if diff := cmp.Diff(tc.want, got.Tools); diff != "" {
68 | t.Fatalf("incorrect parse: diff %v", diff)
69 | }
70 | })
71 | }
72 | }
73 |
```
--------------------------------------------------------------------------------
/docs/en/resources/tools/cloudhealthcare/cloud-healthcare-fhir-fetch-page.md:
--------------------------------------------------------------------------------
```markdown
1 | ---
2 | title: "cloud-healthcare-fhir-fetch-page"
3 | type: docs
4 | weight: 1
5 | description: >
6 | A "cloud-healthcare-fhir-fetch-page" tool fetches a page of FHIR resources from a given URL.
7 | aliases:
8 | - /resources/tools/cloud-healthcare-fhir-fetch-page
9 | ---
10 |
11 | ## About
12 |
13 | A `cloud-healthcare-fhir-fetch-page` tool fetches a page of FHIR resources from
14 | a given URL. It's compatible with the following sources:
15 |
16 | - [cloud-healthcare](../../sources/cloud-healthcare.md)
17 |
18 | `cloud-healthcare-fhir-fetch-page` can be used for pagination when a previous
19 | tool call (like `cloud-healthcare-fhir-patient-search` or
20 | `cloud-healthcare-fhir-patient-everything`) returns a 'next' link in the
21 | response bundle.
22 |
23 | ## Example
24 |
25 | ```yaml
26 | tools:
27 | get_fhir_store:
28 | kind: cloud-healthcare-fhir-fetch-page
29 | source: my-healthcare-source
30 | description: Use this tool to fetch a page of FHIR resources from a FHIR Bundle's entry.link.url
31 | ```
32 |
33 | ## Reference
34 |
35 | | **field** | **type** | **required** | **description** |
36 | |-------------|:--------:|:------------:|----------------------------------------------------|
37 | | kind | string | true | Must be "cloud-healthcare-fhir-fetch-page". |
38 | | source | string | true | Name of the healthcare source. |
39 | | description | string | true | Description of the tool that is passed to the LLM. |
40 |
41 | ### Parameters
42 |
43 | | **field** | **type** | **required** | **description** |
44 | |-----------|:--------:|:------------:|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
45 | | pageURL | string | true | The full URL of the FHIR page to fetch. This would usually be the value of `Bundle.entry.link.url` field within the response returned from FHIR search or FHIR patient everything operations. |
46 |
```
--------------------------------------------------------------------------------
/internal/tools/cloudhealthcare/cloudhealthcaregetdicomstoremetrics/cloudhealthcaregetdicomstoremetrics_test.go:
--------------------------------------------------------------------------------
```go
1 | // Copyright 2025 Google LLC
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package getdicomstoremetrics_test
16 |
17 | import (
18 | "testing"
19 |
20 | yaml "github.com/goccy/go-yaml"
21 | "github.com/google/go-cmp/cmp"
22 | "github.com/googleapis/genai-toolbox/internal/server"
23 | "github.com/googleapis/genai-toolbox/internal/testutils"
24 | getdicomstoremetrics "github.com/googleapis/genai-toolbox/internal/tools/cloudhealthcare/cloudhealthcaregetdicomstoremetrics"
25 | )
26 |
27 | func TestParseFromYamlHealthcareGetDICOMStoreMetrics(t *testing.T) {
28 | ctx, err := testutils.ContextWithNewLogger()
29 | if err != nil {
30 | t.Fatalf("unexpected error: %s", err)
31 | }
32 | tcs := []struct {
33 | desc string
34 | in string
35 | want server.ToolConfigs
36 | }{
37 | {
38 | desc: "basic example",
39 | in: `
40 | tools:
41 | example_tool:
42 | kind: cloud-healthcare-get-dicom-store-metrics
43 | source: my-instance
44 | description: some description
45 | `,
46 | want: server.ToolConfigs{
47 | "example_tool": getdicomstoremetrics.Config{
48 | Name: "example_tool",
49 | Kind: "cloud-healthcare-get-dicom-store-metrics",
50 | Source: "my-instance",
51 | Description: "some description",
52 | AuthRequired: []string{},
53 | },
54 | },
55 | },
56 | }
57 | for _, tc := range tcs {
58 | t.Run(tc.desc, func(t *testing.T) {
59 | got := struct {
60 | Tools server.ToolConfigs `yaml:"tools"`
61 | }{}
62 | // Parse contents
63 | err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got)
64 | if err != nil {
65 | t.Fatalf("unable to unmarshal: %s", err)
66 | }
67 | if diff := cmp.Diff(tc.want, got.Tools); diff != "" {
68 | t.Fatalf("incorrect parse: diff %v", diff)
69 | }
70 | })
71 | }
72 | }
73 |
```
--------------------------------------------------------------------------------
/docs/en/resources/tools/postgres/postgres-list-available-extensions.md:
--------------------------------------------------------------------------------
```markdown
1 | ---
2 | title: "postgres-list-available-extensions"
3 | type: docs
4 | weight: 1
5 | description: >
6 | The "postgres-list-available-extensions" tool retrieves all PostgreSQL
7 | extensions available for installation on a Postgres database.
8 | aliases:
9 | - /resources/tools/postgres-list-available-extensions
10 | ---
11 |
12 | ## About
13 |
14 | The `postgres-list-available-extensions` tool retrieves all PostgreSQL
15 | extensions available for installation on a Postgres database. It's compatible
16 | with any of the following sources:
17 |
18 | - [alloydb-postgres](../../sources/alloydb-pg.md)
19 | - [cloud-sql-postgres](../../sources/cloud-sql-pg.md)
20 | - [postgres](../../sources/postgres.md)
21 |
22 | `postgres-list-available-extensions` lists all PostgreSQL extensions available
23 | for installation (extension name, default version description) as JSON. The does
24 | not support any input parameter.
25 |
26 | ## Example
27 |
28 | ```yaml
29 | tools:
30 | list_available_extensions:
31 | kind: postgres-list-available-extensions
32 | source: postgres-source
33 | description: Discover all PostgreSQL extensions available for installation on this server, returning name, default_version, and description.
34 | ```
35 |
36 | ## Reference
37 |
38 | | **name** | **default_version** | **description** |
39 | |----------------------|---------------------|---------------------------------------------------------------------------------------------------------------------|
40 | | address_standardizer | 3.5.2 | Used to parse an address into constituent elements. Generally used to support geocoding address normalization step. |
41 | | amcheck | 1.4 | functions for verifying relation integrity |
42 | | anon | 1.0.0 | Data anonymization tools |
43 | | autoinc | 1.0 | functions for autoincrementing fields |
44 |
```
--------------------------------------------------------------------------------
/.ci/test_with_coverage.sh:
--------------------------------------------------------------------------------
```bash
1 | #!/bin/bash
2 |
3 | # Arguments:
4 | # $1: Display name for logs (e.g., "Cloud SQL Postgres")
5 | # $2: Integration test's package name (e.g., cloudsqlpg)
6 | # $3, $4, ...: Tool package names for grep (e.g., postgressql), if the
7 | # integration test specifically check a separate package inside a folder, please
8 | # specify the full path instead (e.g., postgressql/postgresexecutesql)
9 |
10 | DISPLAY_NAME="$1"
11 | SOURCE_PACKAGE_NAME="$2"
12 |
13 | # Construct the test binary name
14 | TEST_BINARY="${SOURCE_PACKAGE_NAME}.test"
15 |
16 | # Construct the full source path
17 | SOURCE_PATH="sources/${SOURCE_PACKAGE_NAME}/"
18 |
19 | # Shift arguments so that $3 and onwards become the list of tool package names
20 | shift 2
21 | TOOL_PACKAGE_NAMES=("$@")
22 |
23 | COVERAGE_FILE="${TEST_BINARY%.test}_coverage.out"
24 | FILTERED_COVERAGE_FILE="${TEST_BINARY%.test}_filtered_coverage.out"
25 |
26 | export path="github.com/googleapis/genai-toolbox/internal/"
27 |
28 | GREP_PATTERN="^mode:|${path}${SOURCE_PATH}"
29 | # Add each tool package path to the grep pattern
30 | for tool_name in "${TOOL_PACKAGE_NAMES[@]}"; do
31 | if [ -n "$tool_name" ]; then
32 | full_tool_path="tools/${tool_name}/"
33 | GREP_PATTERN="${GREP_PATTERN}|${path}${full_tool_path}"
34 | fi
35 | done
36 |
37 | # Run integration test
38 | if ! ./"${TEST_BINARY}" -test.v -test.coverprofile="${COVERAGE_FILE}"; then
39 | echo "Error: Tests for ${DISPLAY_NAME} failed. Exiting."
40 | exit 1
41 | fi
42 |
43 | # Filter source/tool packages
44 | if ! grep -E "${GREP_PATTERN}" "${COVERAGE_FILE}" > "${FILTERED_COVERAGE_FILE}"; then
45 | echo "Warning: Could not filter coverage for ${DISPLAY_NAME}. Filtered file might be empty or invalid."
46 | fi
47 |
48 | # Calculate coverage
49 | echo "Calculating coverage for ${DISPLAY_NAME}..."
50 | total_coverage=$(go tool cover -func="${FILTERED_COVERAGE_FILE}" 2>/dev/null | grep "total:" | awk '{print $3}')
51 |
52 |
53 | echo "${DISPLAY_NAME} total coverage: $total_coverage"
54 | coverage_numeric=$(echo "$total_coverage" | sed 's/%//')
55 |
56 | # Check coverage threshold
57 | if awk -v coverage="$coverage_numeric" 'BEGIN {exit !(coverage < 50)}'; then
58 | echo "Coverage failure: ${DISPLAY_NAME} total coverage($total_coverage) is below 50%."
59 | exit 1
60 | else
61 | echo "Coverage for ${DISPLAY_NAME} is sufficient."
62 | fi
63 |
```
--------------------------------------------------------------------------------
/internal/tools/cloudhealthcare/cloudhealthcarefhirpatienteverything/cloudhealthcarefhirpatienteverything_test.go:
--------------------------------------------------------------------------------
```go
1 | // Copyright 2025 Google LLC
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package fhirpatienteverything_test
16 |
17 | import (
18 | "testing"
19 |
20 | yaml "github.com/goccy/go-yaml"
21 | "github.com/google/go-cmp/cmp"
22 | "github.com/googleapis/genai-toolbox/internal/server"
23 | "github.com/googleapis/genai-toolbox/internal/testutils"
24 | fhirpatienteverything "github.com/googleapis/genai-toolbox/internal/tools/cloudhealthcare/cloudhealthcarefhirpatienteverything"
25 | )
26 |
27 | func TestParseFromYamlHealthcareFHIRPatientEverything(t *testing.T) {
28 | ctx, err := testutils.ContextWithNewLogger()
29 | if err != nil {
30 | t.Fatalf("unexpected error: %s", err)
31 | }
32 | tcs := []struct {
33 | desc string
34 | in string
35 | want server.ToolConfigs
36 | }{
37 | {
38 | desc: "basic example",
39 | in: `
40 | tools:
41 | example_tool:
42 | kind: cloud-healthcare-fhir-patient-everything
43 | source: my-instance
44 | description: some description
45 | `,
46 | want: server.ToolConfigs{
47 | "example_tool": fhirpatienteverything.Config{
48 | Name: "example_tool",
49 | Kind: "cloud-healthcare-fhir-patient-everything",
50 | Source: "my-instance",
51 | Description: "some description",
52 | AuthRequired: []string{},
53 | },
54 | },
55 | },
56 | }
57 | for _, tc := range tcs {
58 | t.Run(tc.desc, func(t *testing.T) {
59 | got := struct {
60 | Tools server.ToolConfigs `yaml:"tools"`
61 | }{}
62 | // Parse contents
63 | err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got)
64 | if err != nil {
65 | t.Fatalf("unable to unmarshal: %s", err)
66 | }
67 | if diff := cmp.Diff(tc.want, got.Tools); diff != "" {
68 | t.Fatalf("incorrect parse: diff %v", diff)
69 | }
70 | })
71 | }
72 | }
73 |
```
--------------------------------------------------------------------------------
/internal/tools/mindsdb/mindsdbexecutesql/mindsdbexecutesql_test.go:
--------------------------------------------------------------------------------
```go
1 | // Copyright 2025 Google LLC
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package mindsdbexecutesql_test
16 |
17 | import (
18 | "testing"
19 |
20 | yaml "github.com/goccy/go-yaml"
21 | "github.com/google/go-cmp/cmp"
22 | "github.com/googleapis/genai-toolbox/internal/server"
23 | "github.com/googleapis/genai-toolbox/internal/testutils"
24 | "github.com/googleapis/genai-toolbox/internal/tools/mindsdb/mindsdbexecutesql"
25 | )
26 |
27 | func TestParseFromYamlExecuteSql(t *testing.T) {
28 | ctx, err := testutils.ContextWithNewLogger()
29 | if err != nil {
30 | t.Fatalf("unexpected error: %s", err)
31 | }
32 | tcs := []struct {
33 | desc string
34 | in string
35 | want server.ToolConfigs
36 | }{
37 | {
38 | desc: "basic example",
39 | in: `
40 | tools:
41 | example_tool:
42 | kind: mindsdb-execute-sql
43 | source: my-instance
44 | description: some description
45 | authRequired:
46 | - my-google-auth-service
47 | - other-auth-service
48 | `,
49 | want: server.ToolConfigs{
50 | "example_tool": mindsdbexecutesql.Config{
51 | Name: "example_tool",
52 | Kind: "mindsdb-execute-sql",
53 | Source: "my-instance",
54 | Description: "some description",
55 | AuthRequired: []string{"my-google-auth-service", "other-auth-service"},
56 | },
57 | },
58 | },
59 | }
60 | for _, tc := range tcs {
61 | t.Run(tc.desc, func(t *testing.T) {
62 | got := struct {
63 | Tools server.ToolConfigs `yaml:"tools"`
64 | }{}
65 | // Parse contents
66 | err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got)
67 | if err != nil {
68 | t.Fatalf("unable to unmarshal: %s", err)
69 | }
70 | if diff := cmp.Diff(tc.want, got.Tools); diff != "" {
71 | t.Fatalf("incorrect parse: diff %v", diff)
72 | }
73 | })
74 | }
75 |
76 | }
77 |
```
--------------------------------------------------------------------------------
/internal/tools/mysql/mysqlgetqueryplan/mysqlgetqueryplan_test.go:
--------------------------------------------------------------------------------
```go
1 | // Copyright 2025 Google LLC
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package mysqlgetqueryplan_test
16 |
17 | import (
18 | "testing"
19 |
20 | yaml "github.com/goccy/go-yaml"
21 | "github.com/google/go-cmp/cmp"
22 | "github.com/googleapis/genai-toolbox/internal/server"
23 | "github.com/googleapis/genai-toolbox/internal/testutils"
24 | "github.com/googleapis/genai-toolbox/internal/tools/mysql/mysqlgetqueryplan"
25 | )
26 |
27 | func TestParseFromYamlGetQueryPlan(t *testing.T) {
28 | ctx, err := testutils.ContextWithNewLogger()
29 | if err != nil {
30 | t.Fatalf("unexpected error: %s", err)
31 | }
32 | tcs := []struct {
33 | desc string
34 | in string
35 | want server.ToolConfigs
36 | }{
37 | {
38 | desc: "basic example",
39 | in: `
40 | tools:
41 | example_tool:
42 | kind: mysql-get-query-plan
43 | source: my-instance
44 | description: some description
45 | authRequired:
46 | - my-google-auth-service
47 | - other-auth-service
48 | `,
49 | want: server.ToolConfigs{
50 | "example_tool": mysqlgetqueryplan.Config{
51 | Name: "example_tool",
52 | Kind: "mysql-get-query-plan",
53 | Source: "my-instance",
54 | Description: "some description",
55 | AuthRequired: []string{"my-google-auth-service", "other-auth-service"},
56 | },
57 | },
58 | },
59 | }
60 | for _, tc := range tcs {
61 | t.Run(tc.desc, func(t *testing.T) {
62 | got := struct {
63 | Tools server.ToolConfigs `yaml:"tools"`
64 | }{}
65 | // Parse contents
66 | err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got)
67 | if err != nil {
68 | t.Fatalf("unable to unmarshal: %s", err)
69 | }
70 | if diff := cmp.Diff(tc.want, got.Tools); diff != "" {
71 | t.Fatalf("incorrect parse: diff %v", diff)
72 | }
73 | })
74 | }
75 |
76 | }
77 |
```
--------------------------------------------------------------------------------
/internal/tools/trino/trinoexecutesql/trinoexecutesql_test.go:
--------------------------------------------------------------------------------
```go
1 | // Copyright 2025 Google LLC
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package trinoexecutesql_test
16 |
17 | import (
18 | "testing"
19 |
20 | yaml "github.com/goccy/go-yaml"
21 | "github.com/google/go-cmp/cmp"
22 | "github.com/googleapis/genai-toolbox/internal/server"
23 | "github.com/googleapis/genai-toolbox/internal/testutils"
24 | "github.com/googleapis/genai-toolbox/internal/tools/trino/trinoexecutesql"
25 | )
26 |
27 | func TestParseFromYamlTrinoExecuteSQL(t *testing.T) {
28 | ctx, err := testutils.ContextWithNewLogger()
29 | if err != nil {
30 | t.Fatalf("unexpected error: %s", err)
31 | }
32 | tcs := []struct {
33 | desc string
34 | in string
35 | want server.ToolConfigs
36 | }{
37 | {
38 | desc: "basic example",
39 | in: `
40 | tools:
41 | example_tool:
42 | kind: trino-execute-sql
43 | source: my-trino-instance
44 | description: some description
45 | authRequired:
46 | - my-google-auth-service
47 | - other-auth-service
48 | `,
49 | want: server.ToolConfigs{
50 | "example_tool": trinoexecutesql.Config{
51 | Name: "example_tool",
52 | Kind: "trino-execute-sql",
53 | Source: "my-trino-instance",
54 | Description: "some description",
55 | AuthRequired: []string{"my-google-auth-service", "other-auth-service"},
56 | },
57 | },
58 | },
59 | }
60 | for _, tc := range tcs {
61 | t.Run(tc.desc, func(t *testing.T) {
62 | got := struct {
63 | Tools server.ToolConfigs `yaml:"tools"`
64 | }{}
65 | // Parse contents
66 | err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got)
67 | if err != nil {
68 | t.Fatalf("unable to unmarshal: %s", err)
69 | }
70 | if diff := cmp.Diff(tc.want, got.Tools); diff != "" {
71 | t.Fatalf("incorrect parse: diff %v", diff)
72 | }
73 | })
74 | }
75 | }
76 |
```
--------------------------------------------------------------------------------
/internal/tools/firebird/firebirdexecutesql/firebirdexecutesql_test.go:
--------------------------------------------------------------------------------
```go
1 | // Copyright 2025 Google LLC
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package firebirdexecutesql_test
16 |
17 | import (
18 | "testing"
19 |
20 | yaml "github.com/goccy/go-yaml"
21 | "github.com/google/go-cmp/cmp"
22 | "github.com/googleapis/genai-toolbox/internal/server"
23 | "github.com/googleapis/genai-toolbox/internal/testutils"
24 | "github.com/googleapis/genai-toolbox/internal/tools/firebird/firebirdexecutesql"
25 | )
26 |
27 | func TestParseFromYamlExecuteSql(t *testing.T) {
28 | ctx, err := testutils.ContextWithNewLogger()
29 | if err != nil {
30 | t.Fatalf("unexpected error: %s", err)
31 | }
32 | tcs := []struct {
33 | desc string
34 | in string
35 | want server.ToolConfigs
36 | }{
37 | {
38 | desc: "basic example",
39 | in: `
40 | tools:
41 | example_tool:
42 | kind: firebird-execute-sql
43 | source: my-instance
44 | description: some description
45 | authRequired:
46 | - my-google-auth-service
47 | - other-auth-service
48 | `,
49 | want: server.ToolConfigs{
50 | "example_tool": firebirdexecutesql.Config{
51 | Name: "example_tool",
52 | Kind: "firebird-execute-sql",
53 | Source: "my-instance",
54 | Description: "some description",
55 | AuthRequired: []string{"my-google-auth-service", "other-auth-service"},
56 | },
57 | },
58 | },
59 | }
60 | for _, tc := range tcs {
61 | t.Run(tc.desc, func(t *testing.T) {
62 | got := struct {
63 | Tools server.ToolConfigs `yaml:"tools"`
64 | }{}
65 | // Parse contents
66 | err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got)
67 | if err != nil {
68 | t.Fatalf("unable to unmarshal: %s", err)
69 | }
70 | if diff := cmp.Diff(tc.want, got.Tools); diff != "" {
71 | t.Fatalf("incorrect parse: diff %v", diff)
72 | }
73 | })
74 | }
75 |
76 | }
77 |
```
--------------------------------------------------------------------------------
/internal/tools/postgres/postgresexecutesql/postgresexecutesql_test.go:
--------------------------------------------------------------------------------
```go
1 | // Copyright 2025 Google LLC
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package postgresexecutesql_test
16 |
17 | import (
18 | "testing"
19 |
20 | yaml "github.com/goccy/go-yaml"
21 | "github.com/google/go-cmp/cmp"
22 | "github.com/googleapis/genai-toolbox/internal/server"
23 | "github.com/googleapis/genai-toolbox/internal/testutils"
24 | "github.com/googleapis/genai-toolbox/internal/tools/postgres/postgresexecutesql"
25 | )
26 |
27 | func TestParseFromYamlExecuteSql(t *testing.T) {
28 | ctx, err := testutils.ContextWithNewLogger()
29 | if err != nil {
30 | t.Fatalf("unexpected error: %s", err)
31 | }
32 | tcs := []struct {
33 | desc string
34 | in string
35 | want server.ToolConfigs
36 | }{
37 | {
38 | desc: "basic example",
39 | in: `
40 | tools:
41 | example_tool:
42 | kind: postgres-execute-sql
43 | source: my-instance
44 | description: some description
45 | authRequired:
46 | - my-google-auth-service
47 | - other-auth-service
48 | `,
49 | want: server.ToolConfigs{
50 | "example_tool": postgresexecutesql.Config{
51 | Name: "example_tool",
52 | Kind: "postgres-execute-sql",
53 | Source: "my-instance",
54 | Description: "some description",
55 | AuthRequired: []string{"my-google-auth-service", "other-auth-service"},
56 | },
57 | },
58 | },
59 | }
60 | for _, tc := range tcs {
61 | t.Run(tc.desc, func(t *testing.T) {
62 | got := struct {
63 | Tools server.ToolConfigs `yaml:"tools"`
64 | }{}
65 | // Parse contents
66 | err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got)
67 | if err != nil {
68 | t.Fatalf("unable to unmarshal: %s", err)
69 | }
70 | if diff := cmp.Diff(tc.want, got.Tools); diff != "" {
71 | t.Fatalf("incorrect parse: diff %v", diff)
72 | }
73 | })
74 | }
75 |
76 | }
77 |
```
--------------------------------------------------------------------------------
/docs/en/getting-started/quickstart/js/adk/quickstart.js:
--------------------------------------------------------------------------------
```javascript
1 | import { InMemoryRunner, LlmAgent, LogLevel } from '@google/adk';
2 | import { ToolboxClient } from '@toolbox-sdk/adk';
3 |
4 | const prompt = `
5 | You're a helpful hotel assistant. You handle hotel searching, booking, and
6 | cancellations. When the user searches for a hotel, mention its name, id,
7 | location and price tier. Always mention hotel ids while performing any
8 | searches. This is very important for any operations. For any bookings or
9 | cancellations, please provide the appropriate confirmation. Be sure to
10 | update checkin or checkout dates if mentioned by the user.
11 | Don't ask for confirmations from the user.
12 | `;
13 |
14 | const queries = [
15 | "Find hotels with Basel in its name.",
16 | "Can you book the Hilton Basel for me?",
17 | "Oh wait, this is too expensive. Please cancel it and book the Hyatt Regency instead.",
18 | "My check in dates would be from April 10, 2024 to April 19, 2024.",
19 | ];
20 |
21 | process.env.GOOGLE_GENAI_API_KEY = process.env.GOOGLE_API_KEY || 'your-api-key'; // Replace it with your API key
22 |
23 | export async function main() {
24 | const userId = 'test_user';
25 | const client = new ToolboxClient('http://127.0.0.1:5000');
26 | const tools = await client.loadToolset("my-toolset");
27 |
28 | const rootAgent = new LlmAgent({
29 | name: 'hotel_agent',
30 | model: 'gemini-2.5-flash',
31 | description: 'Agent for hotel bookings and administration.',
32 | instruction: prompt,
33 | tools: tools,
34 | });
35 |
36 | const appName = rootAgent.name;
37 | const runner = new InMemoryRunner({ agent: rootAgent, appName, logLevel: LogLevel.ERROR, });
38 | const session = await runner.sessionService.createSession({ appName, userId });
39 |
40 | for (const query of queries) {
41 | await runPrompt(runner, userId, session.id, query);
42 | }
43 | }
44 |
45 | async function runPrompt(runner, userId, sessionId, prompt) {
46 | const content = { role: 'user', parts: [{ text: prompt }] };
47 | const stream = runner.runAsync({ userId, sessionId, newMessage: content });
48 | const responses = await Array.fromAsync(stream);
49 | const accumulatedResponse = responses
50 | .flatMap((e) => e.content?.parts?.map((p) => p.text) ?? [])
51 | .join('');
52 |
53 | console.log(`\nMODEL RESPONSE: ${accumulatedResponse}\n`);
54 | }
55 |
56 | main();
```
--------------------------------------------------------------------------------
/internal/tools/sqlite/sqliteexecutesql/sqliteexecutesql_test.go:
--------------------------------------------------------------------------------
```go
1 | // Copyright 2025 Google LLC
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package sqliteexecutesql_test
16 |
17 | import (
18 | "testing"
19 |
20 | yaml "github.com/goccy/go-yaml"
21 | "github.com/google/go-cmp/cmp"
22 | "github.com/googleapis/genai-toolbox/internal/server"
23 | "github.com/googleapis/genai-toolbox/internal/testutils"
24 | "github.com/googleapis/genai-toolbox/internal/tools/sqlite/sqliteexecutesql"
25 | _ "modernc.org/sqlite"
26 | )
27 |
28 | func TestParseFromYamlExecuteSql(t *testing.T) {
29 | ctx, err := testutils.ContextWithNewLogger()
30 | if err != nil {
31 | t.Fatalf("unexpected error: %s", err)
32 | }
33 | tcs := []struct {
34 | desc string
35 | in string
36 | want server.ToolConfigs
37 | }{
38 | {
39 | desc: "basic example",
40 | in: `
41 | tools:
42 | example_tool:
43 | kind: sqlite-execute-sql
44 | source: my-instance
45 | description: some description
46 | authRequired:
47 | - my-google-auth-service
48 | - other-auth-service
49 | `,
50 | want: server.ToolConfigs{
51 | "example_tool": sqliteexecutesql.Config{
52 | Name: "example_tool",
53 | Kind: "sqlite-execute-sql",
54 | Source: "my-instance",
55 | Description: "some description",
56 | AuthRequired: []string{"my-google-auth-service", "other-auth-service"},
57 | },
58 | },
59 | },
60 | }
61 | for _, tc := range tcs {
62 | t.Run(tc.desc, func(t *testing.T) {
63 | got := struct {
64 | Tools server.ToolConfigs `yaml:"tools"`
65 | }{}
66 | // Parse contents
67 | err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got)
68 | if err != nil {
69 | t.Fatalf("unable to unmarshal: %s", err)
70 | }
71 | if diff := cmp.Diff(tc.want, got.Tools); diff != "" {
72 | t.Fatalf("incorrect parse: diff %v", diff)
73 | }
74 | })
75 | }
76 |
77 | }
78 |
```
--------------------------------------------------------------------------------
/docs/en/resources/tools/neo4j/neo4j-schema.md:
--------------------------------------------------------------------------------
```markdown
1 | ---
2 | title: "neo4j-schema"
3 | type: "docs"
4 | weight: 1
5 | description: >
6 | A "neo4j-schema" tool extracts a comprehensive schema from a Neo4j
7 | database.
8 | aliases:
9 | - /resources/tools/neo4j-schema
10 | ---
11 |
12 | ## About
13 |
14 | A `neo4j-schema` tool connects to a Neo4j database and extracts its complete
15 | schema information. It runs multiple queries concurrently to efficiently gather
16 | details about node labels, relationships, properties, constraints, and indexes.
17 |
18 | The tool automatically detects if the APOC (Awesome Procedures on Cypher)
19 | library is available. If so, it uses APOC procedures like `apoc.meta.schema` for
20 | a highly detailed overview of the database structure; otherwise, it falls back
21 | to using native Cypher queries.
22 |
23 | The extracted schema is **cached** to improve performance for subsequent
24 | requests. The output is a structured JSON object containing all the schema
25 | details, which can be invaluable for providing database context to an LLM. This
26 | tool is compatible with a `neo4j` source and takes no parameters.
27 |
28 | ## Example
29 |
30 | ```yaml
31 | tools:
32 | get_movie_db_schema:
33 | kind: neo4j-schema
34 | source: my-neo4j-movies-instance
35 | description: |
36 | Use this tool to get the full schema of the movie database.
37 | This provides information on all available node labels (like Movie, Person),
38 | relationships (like ACTED_IN), and the properties on each.
39 | This tool takes no parameters.
40 | # Optional configuration to cache the schema for 2 hours
41 | cacheExpireMinutes: 120
42 | ```
43 |
44 | ## Reference
45 |
46 | | **field** | **type** | **required** | **description** |
47 | |--------------------|:--------:|:------------:|---------------------------------------------------------|
48 | | kind | string | true | Must be `neo4j-schema`. |
49 | | source | string | true | Name of the source the schema should be extracted from. |
50 | | description | string | true | Description of the tool that is passed to the LLM. |
51 | | cacheExpireMinutes | integer | false | Cache expiration time in minutes. Defaults to 60. |
52 |
```
--------------------------------------------------------------------------------
/internal/tools/mysql/mysqllisttables/mysqllisttables_test.go:
--------------------------------------------------------------------------------
```go
1 | // Copyright 2025 Google LLC
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package mysqllisttables_test
16 |
17 | import (
18 | "testing"
19 |
20 | yaml "github.com/goccy/go-yaml"
21 | "github.com/google/go-cmp/cmp"
22 | "github.com/googleapis/genai-toolbox/internal/server"
23 | "github.com/googleapis/genai-toolbox/internal/testutils"
24 | mysqllisttables "github.com/googleapis/genai-toolbox/internal/tools/mysql/mysqllisttables"
25 | )
26 |
27 | func TestParseFromYamlMySQLListTables(t *testing.T) {
28 | ctx, err := testutils.ContextWithNewLogger()
29 | if err != nil {
30 | t.Fatalf("unexpected error: %s", err)
31 | }
32 | tcs := []struct {
33 | desc string
34 | in string
35 | want server.ToolConfigs
36 | }{
37 | {
38 | desc: "basic example",
39 | in: `
40 | tools:
41 | example_tool:
42 | kind: mysql-list-tables
43 | source: my-mysql-instance
44 | description: some description
45 | authRequired:
46 | - my-google-auth-service
47 | - other-auth-service
48 | `,
49 | want: server.ToolConfigs{
50 | "example_tool": mysqllisttables.Config{
51 | Name: "example_tool",
52 | Kind: "mysql-list-tables",
53 | Source: "my-mysql-instance",
54 | Description: "some description",
55 | AuthRequired: []string{"my-google-auth-service", "other-auth-service"},
56 | },
57 | },
58 | },
59 | }
60 | for _, tc := range tcs {
61 | t.Run(tc.desc, func(t *testing.T) {
62 | got := struct {
63 | Tools server.ToolConfigs `yaml:"tools"`
64 | }{}
65 | // Parse contents
66 | err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got)
67 | if err != nil {
68 | t.Fatalf("unable to unmarshal: %s", err)
69 | }
70 | if diff := cmp.Diff(tc.want, got.Tools); diff != "" {
71 | t.Fatalf("incorrect parse: diff %v", diff)
72 | }
73 | })
74 | }
75 | }
76 |
```
--------------------------------------------------------------------------------
/docs/en/resources/tools/alloydb/alloydb-list-instances.md:
--------------------------------------------------------------------------------
```markdown
1 | ---
2 | title: alloydb-list-instances
3 | type: docs
4 | weight: 1
5 | description: "The \"alloydb-list-instances\" tool lists the AlloyDB instances for a given project, cluster and location.\n"
6 | aliases: [/resources/tools/alloydb-list-instances]
7 | ---
8 |
9 | ## About
10 |
11 | The `alloydb-list-instances` tool retrieves AlloyDB instance information for all
12 | or specified clusters and locations in a given project. It is compatible with
13 | [alloydb-admin](../../sources/alloydb-admin.md) source.
14 |
15 | `alloydb-list-instances` tool lists the detailed information of AlloyDB
16 | instances (instance name, type, IP address, state, configuration, etc) for a
17 | given project, cluster and location. The tool takes the following input
18 | parameters:
19 |
20 | | Parameter | Type | Description | Required |
21 | | :--------- | :----- | :--------------------------------------------------------------------------------------------------------- | :------- |
22 | | `project` | string | The GCP project ID to list instances for. | Yes |
23 | | `cluster` | string | The ID of the cluster to list instances from. Use '-' to get results for all clusters. Default: `-`. | No |
24 | | `location` | string | The location of the cluster (e.g., 'us-central1'). Use '-' to get results for all locations. Default: `-`. | No |
25 |
26 | ## Example
27 |
28 | ```yaml
29 | tools:
30 | list_instances:
31 | kind: alloydb-list-instances
32 | source: alloydb-admin-source
33 | description: Use this tool to list all AlloyDB instances for a given project, cluster and location.
34 | ```
35 |
36 | ## Reference
37 |
38 | | **field** | **type** | **required** | **description** |
39 | | ----------- | :------: | :----------: | ---------------------------------------------------- |
40 | | kind | string | true | Must be alloydb-list-instances. |
41 | | source | string | true | The name of an `alloydb-admin` source. |
42 | | description | string | false | Description of the tool that is passed to the agent. |
43 |
```
--------------------------------------------------------------------------------
/internal/tools/mssql/mssqllisttables/mssqllisttables_test.go:
--------------------------------------------------------------------------------
```go
1 | // Copyright 2025 Google LLC
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package mssqllisttables_test
16 |
17 | import (
18 | "testing"
19 |
20 | yaml "github.com/goccy/go-yaml"
21 | "github.com/google/go-cmp/cmp"
22 | "github.com/googleapis/genai-toolbox/internal/server"
23 | "github.com/googleapis/genai-toolbox/internal/testutils"
24 | mssqllisttables "github.com/googleapis/genai-toolbox/internal/tools/mssql/mssqllisttables"
25 | )
26 |
27 | func TestParseFromYamlmssqlListTables(t *testing.T) {
28 | ctx, err := testutils.ContextWithNewLogger()
29 | if err != nil {
30 | t.Fatalf("unexpected error: %s", err)
31 | }
32 | tcs := []struct {
33 | desc string
34 | in string
35 | want server.ToolConfigs
36 | }{
37 | {
38 | desc: "basic example",
39 | in: `
40 | tools:
41 | example_tool:
42 | kind: mssql-list-tables
43 | source: my-mssql-instance
44 | description: some description
45 | authRequired:
46 | - my-google-auth-service
47 | - other-auth-service
48 | `,
49 | want: server.ToolConfigs{
50 | "example_tool": mssqllisttables.Config{
51 | Name: "example_tool",
52 | Kind: "mssql-list-tables",
53 | Source: "my-mssql-instance",
54 | Description: "some description",
55 | AuthRequired: []string{"my-google-auth-service", "other-auth-service"},
56 | },
57 | },
58 | },
59 | }
60 | for _, tc := range tcs {
61 | t.Run(tc.desc, func(t *testing.T) {
62 | got := struct {
63 | Tools server.ToolConfigs `yaml:"tools"`
64 | }{}
65 | // Parse contents
66 | err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got)
67 | if err != nil {
68 | t.Fatalf("unable to unmarshal: %s", err)
69 | }
70 | if diff := cmp.Diff(tc.want, got.Tools); diff != "" {
71 | t.Fatalf("incorrect parse: diff %v", diff)
72 | }
73 | })
74 | }
75 |
76 | }
77 |
```
--------------------------------------------------------------------------------
/internal/auth/google/google.go:
--------------------------------------------------------------------------------
```go
1 | // Copyright 2024 Google LLC
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package google
16 |
17 | import (
18 | "context"
19 | "fmt"
20 | "net/http"
21 |
22 | "github.com/googleapis/genai-toolbox/internal/auth"
23 | "google.golang.org/api/idtoken"
24 | )
25 |
26 | const AuthServiceKind string = "google"
27 |
28 | // validate interface
29 | var _ auth.AuthServiceConfig = Config{}
30 |
31 | // Auth service configuration
32 | type Config struct {
33 | Name string `yaml:"name" validate:"required"`
34 | Kind string `yaml:"kind" validate:"required"`
35 | ClientID string `yaml:"clientId" validate:"required"`
36 | }
37 |
38 | // Returns the auth service kind
39 | func (cfg Config) AuthServiceConfigKind() string {
40 | return AuthServiceKind
41 | }
42 |
43 | // Initialize a Google auth service
44 | func (cfg Config) Initialize() (auth.AuthService, error) {
45 | a := &AuthService{
46 | Config: cfg,
47 | }
48 | return a, nil
49 | }
50 |
51 | var _ auth.AuthService = AuthService{}
52 |
53 | // struct used to store auth service info
54 | type AuthService struct {
55 | Config
56 | }
57 |
58 | // Returns the auth service kind
59 | func (a AuthService) AuthServiceKind() string {
60 | return AuthServiceKind
61 | }
62 |
63 | func (a AuthService) ToConfig() auth.AuthServiceConfig {
64 | return a.Config
65 | }
66 |
67 | // Returns the name of the auth service
68 | func (a AuthService) GetName() string {
69 | return a.Name
70 | }
71 |
72 | // Verifies Google ID token and return claims
73 | func (a AuthService) GetClaimsFromHeader(ctx context.Context, h http.Header) (map[string]any, error) {
74 | if token := h.Get(a.Name + "_token"); token != "" {
75 | payload, err := idtoken.Validate(ctx, token, a.ClientID)
76 | if err != nil {
77 | return nil, fmt.Errorf("Google ID token verification failure: %w", err) //nolint:staticcheck
78 | }
79 | return payload.Claims, nil
80 | }
81 | return nil, nil
82 | }
83 |
```
--------------------------------------------------------------------------------
/internal/tools/singlestore/singlestoreexecutesql/singlestoreexecutesql_test.go:
--------------------------------------------------------------------------------
```go
1 | // Copyright 2025 Google LLC
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package singlestoreexecutesql_test
16 |
17 | import (
18 | "testing"
19 |
20 | yaml "github.com/goccy/go-yaml"
21 | "github.com/google/go-cmp/cmp"
22 | "github.com/googleapis/genai-toolbox/internal/server"
23 | "github.com/googleapis/genai-toolbox/internal/testutils"
24 | "github.com/googleapis/genai-toolbox/internal/tools/singlestore/singlestoreexecutesql"
25 | )
26 |
27 | func TestParseFromYamlExecuteSql(t *testing.T) {
28 | ctx, err := testutils.ContextWithNewLogger()
29 | if err != nil {
30 | t.Fatalf("unexpected error: %s", err)
31 | }
32 | tcs := []struct {
33 | desc string
34 | in string
35 | want server.ToolConfigs
36 | }{
37 | {
38 | desc: "basic example",
39 | in: `
40 | tools:
41 | example_tool:
42 | kind: singlestore-execute-sql
43 | source: my-instance
44 | description: some description
45 | authRequired:
46 | - my-google-auth-service
47 | - other-auth-service
48 | `,
49 | want: server.ToolConfigs{
50 | "example_tool": singlestoreexecutesql.Config{
51 | Name: "example_tool",
52 | Kind: "singlestore-execute-sql",
53 | Source: "my-instance",
54 | Description: "some description",
55 | AuthRequired: []string{"my-google-auth-service", "other-auth-service"},
56 | },
57 | },
58 | },
59 | }
60 | for _, tc := range tcs {
61 | t.Run(tc.desc, func(t *testing.T) {
62 | got := struct {
63 | Tools server.ToolConfigs `yaml:"tools"`
64 | }{}
65 | // Parse contents
66 | err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got)
67 | if err != nil {
68 | t.Fatalf("unable to unmarshal: %s", err)
69 | }
70 | if diff := cmp.Diff(tc.want, got.Tools); diff != "" {
71 | t.Fatalf("incorrect parse: diff %v", diff)
72 | }
73 | })
74 | }
75 |
76 | }
77 |
```
--------------------------------------------------------------------------------
/internal/tools/mysql/mysqllistactivequeries/mysqllistactivequeries_test.go:
--------------------------------------------------------------------------------
```go
1 | // Copyright 2025 Google LLC
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package mysqllistactivequeries_test
16 |
17 | import (
18 | "testing"
19 |
20 | yaml "github.com/goccy/go-yaml"
21 | "github.com/google/go-cmp/cmp"
22 | "github.com/googleapis/genai-toolbox/internal/server"
23 | "github.com/googleapis/genai-toolbox/internal/testutils"
24 | "github.com/googleapis/genai-toolbox/internal/tools/mysql/mysqllistactivequeries"
25 | )
26 |
27 | func TestParseFromYamlExecuteSql(t *testing.T) {
28 | ctx, err := testutils.ContextWithNewLogger()
29 | if err != nil {
30 | t.Fatalf("unexpected error: %s", err)
31 | }
32 | tcs := []struct {
33 | desc string
34 | in string
35 | want server.ToolConfigs
36 | }{
37 | {
38 | desc: "basic example",
39 | in: `
40 | tools:
41 | example_tool:
42 | kind: mysql-list-active-queries
43 | source: my-instance
44 | description: some description
45 | authRequired:
46 | - my-google-auth-service
47 | - other-auth-service
48 | `,
49 | want: server.ToolConfigs{
50 | "example_tool": mysqllistactivequeries.Config{
51 | Name: "example_tool",
52 | Kind: "mysql-list-active-queries",
53 | Source: "my-instance",
54 | Description: "some description",
55 | AuthRequired: []string{"my-google-auth-service", "other-auth-service"},
56 | },
57 | },
58 | },
59 | }
60 | for _, tc := range tcs {
61 | t.Run(tc.desc, func(t *testing.T) {
62 | got := struct {
63 | Tools server.ToolConfigs `yaml:"tools"`
64 | }{}
65 | // Parse contents
66 | err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got)
67 | if err != nil {
68 | t.Fatalf("unable to unmarshal: %s", err)
69 | }
70 | if diff := cmp.Diff(tc.want, got.Tools); diff != "" {
71 | t.Fatalf("incorrect parse: diff %v", diff)
72 | }
73 | })
74 | }
75 |
76 | }
77 |
```
--------------------------------------------------------------------------------
/docs/en/resources/tools/elasticsearch/elasticsearch-esql.md:
--------------------------------------------------------------------------------
```markdown
1 | ---
2 | title: "elasticsearch-esql"
3 | type: docs
4 | weight: 2
5 | description: >
6 | Execute ES|QL queries.
7 | ---
8 |
9 | # elasticsearch-esql
10 |
11 | Execute ES|QL queries.
12 |
13 | This tool allows you to execute ES|QL queries against your Elasticsearch
14 | cluster. You can use this to perform complex searches and aggregations.
15 |
16 | See the [official
17 | documentation](https://www.elastic.co/docs/reference/query-languages/esql/esql-getting-started)
18 | for more information.
19 |
20 | ## Example
21 |
22 | ```yaml
23 | tools:
24 | query_my_index:
25 | kind: elasticsearch-esql
26 | source: elasticsearch-source
27 | description: Use this tool to execute ES|QL queries.
28 | query: |
29 | FROM my-index
30 | | KEEP *
31 | | LIMIT ?limit
32 | parameters:
33 | - name: limit
34 | type: integer
35 | description: Limit the number of results.
36 | required: true
37 | ```
38 |
39 | ## Parameters
40 |
41 | | **name** | **type** | **required** | **description** |
42 | |------------|:---------------------------------------:|:------------:|-----------------------------------------------------------------------------------------------------------------------------------------------------|
43 | | query | string | false | The ES\|QL query to run. Can also be passed by parameters. |
44 | | format | string | false | The format of the query. Default is json. Valid values are csv, json, tsv, txt, yaml, cbor, smile, or arrow. |
45 | | timeout | integer | false | The timeout for the query in seconds. Default is 60 (1 minute). |
46 | | parameters | [parameters](../#specifying-parameters) | false | List of [parameters](../#specifying-parameters) that will be used with the ES\|QL query.<br/>Only supports “string”, “integer”, “float”, “boolean”. |
47 |
```
--------------------------------------------------------------------------------
/docs/en/getting-started/quickstart/python/llamaindex/quickstart.py:
--------------------------------------------------------------------------------
```python
1 | import asyncio
2 | import os
3 |
4 | from llama_index.core.agent.workflow import AgentWorkflow
5 |
6 | from llama_index.core.workflow import Context
7 |
8 | # TODO(developer): replace this with another import if needed
9 |
10 | from llama_index.llms.google_genai import GoogleGenAI
11 |
12 | # from llama_index.llms.anthropic import Anthropic
13 |
14 | from toolbox_llamaindex import ToolboxClient
15 |
16 | project = os.environ.get("GCP_PROJECT") or "project-id"
17 |
18 | prompt = """
19 | You're a helpful hotel assistant. You handle hotel searching, booking and
20 | cancellations. When the user searches for a hotel, mention it's name, id,
21 | location and price tier. Always mention hotel ids while performing any
22 | searches. This is very important for any operations. For any bookings or
23 | cancellations, please provide the appropriate confirmation. Be sure to
24 | update checkin or checkout dates if mentioned by the user.
25 | Don't ask for confirmations from the user.
26 | """
27 |
28 | queries = [
29 | "Find hotels in Basel with Basel in its name.",
30 | "Can you book the Hilton Basel for me?",
31 | "Oh wait, this is too expensive. Please cancel it and book the Hyatt Regency instead.",
32 | "My check in dates would be from April 10, 2024 to April 19, 2024.",
33 | ]
34 |
35 | async def main():
36 | # TODO(developer): replace this with another model if needed
37 | llm = GoogleGenAI(
38 | model="gemini-2.0-flash-001",
39 | vertexai_config={"project": project, "location": "us-central1"},
40 | )
41 | # llm = GoogleGenAI(
42 | # api_key=os.getenv("GOOGLE_API_KEY"),
43 | # model="gemini-2.0-flash-001",
44 | # )
45 | # llm = Anthropic(
46 | # model="claude-3-7-sonnet-latest",
47 | # api_key=os.getenv("ANTHROPIC_API_KEY")
48 | # )
49 |
50 | # Load the tools from the Toolbox server
51 | async with ToolboxClient("http://127.0.0.1:5000") as client:
52 | tools = await client.aload_toolset()
53 |
54 | agent = AgentWorkflow.from_tools_or_functions(
55 | tools,
56 | llm=llm,
57 | system_prompt=prompt,
58 | )
59 | ctx = Context(agent)
60 | for query in queries:
61 | response = await agent.run(user_msg=query, ctx=ctx)
62 | print(f"---- {query} ----")
63 | print(str(response))
64 |
65 | asyncio.run(main())
66 |
```
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/question.yml:
--------------------------------------------------------------------------------
```yaml
1 | # Copyright 2025 Google LLC
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # https://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | name: 💬 Question
16 | description: Questions on how something works or the best way to do something?
17 | title: "<brief summary of the question>"
18 | labels: ["type: question"]
19 |
20 | body:
21 | - type: markdown
22 | attributes:
23 | value: |
24 | Thanks for helping us improve! 🙏 Please provide as much information as possible about your question.
25 |
26 | - id: preamble
27 | type: checkboxes
28 | attributes:
29 | label: Prerequisites
30 | description: |
31 | Please run through the following list and make sure you've tried the usual "quick fixes":
32 | options:
33 | - label: "Search the [current open issues](https://github.com/googleapis/genai-toolbox/issues)"
34 | required: true
35 |
36 | - type: textarea
37 | id: question
38 | attributes:
39 | label: Question
40 | description: "What's your question? Please provide as much relevant information as possible to reduce turnaround time. Include information like what environment, language, or framework you are using."
41 | placeholder: "Example: How do I connect using private IP with the AlloyDB source?"
42 | validations:
43 | required: true
44 |
45 | - type: textarea
46 | id: code
47 | attributes:
48 | label: Code
49 | description: "Please paste any useful application code that might be relevant to your question. (if your code is in a public repo, feel free to paste a link!)"
50 |
51 | - type: textarea
52 | id: additional-details
53 | attributes:
54 | label: Additional Details
55 | description: "Any other information you want us to know that might be helpful in answering your question? (link issues, PRs, descriptions, or screenshots)."
56 |
```
--------------------------------------------------------------------------------
/internal/tools/mysql/mysqllisttablefragmentation/mysqllisttablefragmentation_test.go:
--------------------------------------------------------------------------------
```go
1 | // Copyright 2025 Google LLC
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package mysqllisttablefragmentation_test
16 |
17 | import (
18 | "testing"
19 |
20 | yaml "github.com/goccy/go-yaml"
21 | "github.com/google/go-cmp/cmp"
22 | "github.com/googleapis/genai-toolbox/internal/server"
23 | "github.com/googleapis/genai-toolbox/internal/testutils"
24 | "github.com/googleapis/genai-toolbox/internal/tools/mysql/mysqllisttablefragmentation"
25 | )
26 |
27 | func TestParseFromYamlExecuteSql(t *testing.T) {
28 | ctx, err := testutils.ContextWithNewLogger()
29 | if err != nil {
30 | t.Fatalf("unexpected error: %s", err)
31 | }
32 | tcs := []struct {
33 | desc string
34 | in string
35 | want server.ToolConfigs
36 | }{
37 | {
38 | desc: "basic example",
39 | in: `
40 | tools:
41 | example_tool:
42 | kind: mysql-list-table-fragmentation
43 | source: my-instance
44 | description: some description
45 | authRequired:
46 | - my-google-auth-service
47 | - other-auth-service
48 | `,
49 | want: server.ToolConfigs{
50 | "example_tool": mysqllisttablefragmentation.Config{
51 | Name: "example_tool",
52 | Kind: "mysql-list-table-fragmentation",
53 | Source: "my-instance",
54 | Description: "some description",
55 | AuthRequired: []string{"my-google-auth-service", "other-auth-service"},
56 | },
57 | },
58 | },
59 | }
60 | for _, tc := range tcs {
61 | t.Run(tc.desc, func(t *testing.T) {
62 | got := struct {
63 | Tools server.ToolConfigs `yaml:"tools"`
64 | }{}
65 | // Parse contents
66 | err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got)
67 | if err != nil {
68 | t.Fatalf("unable to unmarshal: %s", err)
69 | }
70 | if diff := cmp.Diff(tc.want, got.Tools); diff != "" {
71 | t.Fatalf("incorrect parse: diff %v", diff)
72 | }
73 | })
74 | }
75 |
76 | }
77 |
```
--------------------------------------------------------------------------------
/internal/tools/postgres/postgreslisttables/postgreslisttables_test.go:
--------------------------------------------------------------------------------
```go
1 | // Copyright 2025 Google LLC
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package postgreslisttables_test
16 |
17 | import (
18 | "testing"
19 |
20 | yaml "github.com/goccy/go-yaml"
21 | "github.com/google/go-cmp/cmp"
22 | "github.com/googleapis/genai-toolbox/internal/server"
23 | "github.com/googleapis/genai-toolbox/internal/testutils"
24 | postgreslisttables "github.com/googleapis/genai-toolbox/internal/tools/postgres/postgreslisttables"
25 | )
26 |
27 | func TestParseFromYamlPostgresListTables(t *testing.T) {
28 | ctx, err := testutils.ContextWithNewLogger()
29 | if err != nil {
30 | t.Fatalf("unexpected error: %s", err)
31 | }
32 | tcs := []struct {
33 | desc string
34 | in string
35 | want server.ToolConfigs
36 | }{
37 | {
38 | desc: "basic example",
39 | in: `
40 | tools:
41 | example_tool:
42 | kind: postgres-list-tables
43 | source: my-postgres-instance
44 | description: some description
45 | authRequired:
46 | - my-google-auth-service
47 | - other-auth-service
48 | `,
49 | want: server.ToolConfigs{
50 | "example_tool": postgreslisttables.Config{
51 | Name: "example_tool",
52 | Kind: "postgres-list-tables",
53 | Source: "my-postgres-instance",
54 | Description: "some description",
55 | AuthRequired: []string{"my-google-auth-service", "other-auth-service"},
56 | },
57 | },
58 | },
59 | }
60 | for _, tc := range tcs {
61 | t.Run(tc.desc, func(t *testing.T) {
62 | got := struct {
63 | Tools server.ToolConfigs `yaml:"tools"`
64 | }{}
65 | // Parse contents
66 | err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got)
67 | if err != nil {
68 | t.Fatalf("unable to unmarshal: %s", err)
69 | }
70 | if diff := cmp.Diff(tc.want, got.Tools); diff != "" {
71 | t.Fatalf("incorrect parse: diff %v", diff)
72 | }
73 | })
74 | }
75 |
76 | }
77 |
```
--------------------------------------------------------------------------------
/internal/tools/cloudhealthcare/cloudhealthcareretrieverendereddicominstance/cloudhealthcareretrieverendereddicominstance_test.go:
--------------------------------------------------------------------------------
```go
1 | // Copyright 2025 Google LLC
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package retrieverendereddicominstance_test
16 |
17 | import (
18 | "testing"
19 |
20 | yaml "github.com/goccy/go-yaml"
21 | "github.com/google/go-cmp/cmp"
22 | "github.com/googleapis/genai-toolbox/internal/server"
23 | "github.com/googleapis/genai-toolbox/internal/testutils"
24 | retrieverendereddicominstance "github.com/googleapis/genai-toolbox/internal/tools/cloudhealthcare/cloudhealthcareretrieverendereddicominstance"
25 | )
26 |
27 | func TestParseFromYamlHealthcareRetrieveRenderedDICOMInstance(t *testing.T) {
28 | ctx, err := testutils.ContextWithNewLogger()
29 | if err != nil {
30 | t.Fatalf("unexpected error: %s", err)
31 | }
32 | tcs := []struct {
33 | desc string
34 | in string
35 | want server.ToolConfigs
36 | }{
37 | {
38 | desc: "basic example",
39 | in: `
40 | tools:
41 | example_tool:
42 | kind: cloud-healthcare-retrieve-rendered-dicom-instance
43 | source: my-instance
44 | description: some description
45 | `,
46 | want: server.ToolConfigs{
47 | "example_tool": retrieverendereddicominstance.Config{
48 | Name: "example_tool",
49 | Kind: "cloud-healthcare-retrieve-rendered-dicom-instance",
50 | Source: "my-instance",
51 | Description: "some description",
52 | AuthRequired: []string{},
53 | },
54 | },
55 | },
56 | }
57 | for _, tc := range tcs {
58 | t.Run(tc.desc, func(t *testing.T) {
59 | got := struct {
60 | Tools server.ToolConfigs `yaml:"tools"`
61 | }{}
62 | // Parse contents
63 | err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got)
64 | if err != nil {
65 | t.Fatalf("unable to unmarshal: %s", err)
66 | }
67 | if diff := cmp.Diff(tc.want, got.Tools); diff != "" {
68 | t.Fatalf("incorrect parse: diff %v", diff)
69 | }
70 | })
71 | }
72 | }
73 |
```
--------------------------------------------------------------------------------
/docs/en/samples/snowflake/snowflake-config.yaml:
--------------------------------------------------------------------------------
```yaml
1 | # Copyright 2026 Google LLC
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | sources:
16 | my-snowflake-db:
17 | kind: snowflake
18 | account: ${SNOWFLAKE_ACCOUNT}
19 | user: ${SNOWFLAKE_USER}
20 | password: ${SNOWFLAKE_PASSWORD}
21 | database: ${SNOWFLAKE_DATABASE}
22 | schema: ${SNOWFLAKE_SCHEMA}
23 | warehouse: ${SNOWFLAKE_WAREHOUSE} # Optional, defaults to COMPUTE_WH if not set
24 | role: ${SNOWFLAKE_ROLE} # Optional, defaults to ACCOUNTADMIN if not set
25 |
26 | tools:
27 | execute_sql:
28 | kind: snowflake-execute-sql
29 | source: my-snowflake-db
30 | description: Execute arbitrary SQL statements on Snowflake
31 |
32 | get_customer_orders:
33 | kind: snowflake-sql
34 | source: my-snowflake-db
35 | description: Get orders for a specific customer
36 | statement: |
37 | SELECT o.order_id, o.order_date, o.total_amount, o.status
38 | FROM orders o
39 | WHERE o.customer_id = $1
40 | ORDER BY o.order_date DESC
41 | parameters:
42 | - name: customer_id
43 | type: string
44 | description: The customer ID to look up orders for
45 |
46 | daily_sales_report:
47 | kind: snowflake-sql
48 | source: my-snowflake-db
49 | description: Generate daily sales report for a specific date
50 | statement: |
51 | SELECT
52 | DATE(order_date) as sales_date,
53 | COUNT(*) as total_orders,
54 | SUM(total_amount) as total_revenue,
55 | AVG(total_amount) as avg_order_value
56 | FROM orders
57 | WHERE DATE(order_date) = $1
58 | GROUP BY DATE(order_date)
59 | parameters:
60 | - name: report_date
61 | type: string
62 | description: The date to generate report for (YYYY-MM-DD format)
63 |
64 | toolsets:
65 | snowflake-analytics:
66 | - execute_sql
67 | - get_customer_orders
68 | - daily_sales_report
69 |
```
--------------------------------------------------------------------------------
/docs/en/resources/tools/postgres/postgres-list-tablespaces.md:
--------------------------------------------------------------------------------
```markdown
1 | ---
2 | title: "postgres-list-tablespaces"
3 | type: docs
4 | weight: 1
5 | description: >
6 | The "postgres-list-tablespaces" tool lists tablespaces in a Postgres database.
7 | aliases:
8 | - /resources/tools/postgres-list-tablespaces
9 | ---
10 |
11 | ## About
12 |
13 | The `postgres-list-tablespaces` tool lists available tablespaces in the database. It's compatible with any of the following sources:
14 |
15 | - [alloydb-postgres](../../sources/alloydb-pg.md)
16 | - [cloud-sql-postgres](../../sources/cloud-sql-pg.md)
17 | - [postgres](../../sources/postgres.md)
18 |
19 | `postgres-list-tablespaces` lists detailed information as JSON for tablespaces. The tool takes the following input parameters:
20 |
21 | - `tablespace_name` (optional): A text to filter results by tablespace name. Default: `""`
22 | - `limit` (optional): The maximum number of tablespaces to return. Default: `50`
23 |
24 | ## Example
25 |
26 | ```yaml
27 | tools:
28 | list_tablespaces:
29 | kind: postgres-list-tablespaces
30 | source: postgres-source
31 | description: |
32 | Lists all tablespaces in the database. Returns the tablespace name,
33 | owner name, size in bytes(if the current user has CREATE privileges on
34 | the tablespace, otherwise NULL), internal object ID, the access control
35 | list regarding permissions, and any specific tablespace options.
36 | ```
37 | The response is a json array with the following elements:
38 |
39 | ```json
40 | {
41 | "tablespace_name": "name of the tablespace",
42 | "owner_username": "owner of the tablespace",
43 | "size_in_bytes": "size in bytes if the current user has CREATE privileges on the tablespace, otherwise NULL",
44 | "oid": "Object ID of the tablespace",
45 | "spcacl": "Access privileges",
46 | "spcoptions": "Tablespace-level options (e.g., seq_page_cost, random_page_cost)"
47 | }
48 | ```
49 |
50 | ## Reference
51 |
52 | | **field** | **type** | **required** | **description** |
53 | |-------------|:--------:|:-------------:|------------------------------------------------------|
54 | | kind | string | true | Must be "postgres-list-tablespaces". |
55 | | source | string | true | Name of the source the SQL should execute on. |
56 | | description | string | false | Description of the tool that is passed to the agent. |
57 |
```
--------------------------------------------------------------------------------
/docs/en/resources/tools/postgres/postgres-list-schemas.md:
--------------------------------------------------------------------------------
```markdown
1 | ---
2 | title: "postgres-list-schemas"
3 | type: docs
4 | weight: 1
5 | description: >
6 | The "postgres-list-schemas" tool lists user-defined schemas in a database.
7 | aliases:
8 | - /resources/tools/postgres-list-schemas
9 | ---
10 |
11 | ## About
12 |
13 | The `postgres-list-schemas` tool retrieves information about schemas in a
14 | database excluding system and temporary schemas. It's compatible with any of
15 | the following sources:
16 |
17 | - [alloydb-postgres](../../sources/alloydb-pg.md)
18 | - [cloud-sql-postgres](../../sources/cloud-sql-pg.md)
19 | - [postgres](../../sources/postgres.md)
20 |
21 | `postgres-list-schemas` lists detailed information as JSON for each schema. The
22 | tool takes the following input parameters:
23 |
24 | - `schema_name` (optional): A text to filter results by schema name. Default: `""`
25 | - `owner` (optional): A text to filter results by owner name. Default: `""`
26 | - `limit` (optional): The maximum number of rows to return. Default: `50`.
27 |
28 | ## Example
29 |
30 | ```yaml
31 | tools:
32 | list_schemas:
33 | kind: postgres-list-schemas
34 | source: postgres-source
35 | description: "Lists all schemas in the database ordered by schema name and excluding system and temporary schemas. It returns the schema name, schema owner, grants, number of functions, number of tables and number of views within each schema."
36 | ```
37 |
38 | The response is a json array with the following elements:
39 |
40 | ```json
41 | {
42 | "schema_name": "name of the schema.",
43 | "owner": "role that owns the schema",
44 | "grants": "A JSON object detailing the privileges (e.g., USAGE, CREATE) granted to different roles or PUBLIC on the schema.",
45 | "tables": "The total count of tables within the schema",
46 | "views": "The total count of views within the schema",
47 | "functions": "The total count of functions",
48 | }
49 | ```
50 |
51 | ## Reference
52 |
53 | | **field** | **type** | **required** | **description** |
54 | |-------------|:--------:|:------------:|----------------------------------------------------|
55 | | kind | string | true | Must be "postgres-list-schemas". |
56 | | source | string | true | Name of the source the SQL should execute on. |
57 | | description | string | false | Description of the tool that is passed to the LLM. |
58 |
```
--------------------------------------------------------------------------------
/internal/tools/oceanbase/oceanbaseexecutesql/oceanbaseexecutesql_test.go:
--------------------------------------------------------------------------------
```go
1 | // Copyright 2025 Google LLC
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package oceanbaseexecutesql_test
16 |
17 | import (
18 | "testing"
19 |
20 | yaml "github.com/goccy/go-yaml"
21 | "github.com/google/go-cmp/cmp"
22 | "github.com/googleapis/genai-toolbox/internal/server"
23 | "github.com/googleapis/genai-toolbox/internal/testutils"
24 | "github.com/googleapis/genai-toolbox/internal/tools/oceanbase/oceanbaseexecutesql"
25 | )
26 |
27 | // Test parsing OceanBase Execute SQL tool config from YAML.
28 | func TestParseFromYamlExecuteSql(t *testing.T) {
29 | ctx, err := testutils.ContextWithNewLogger()
30 | if err != nil {
31 | t.Fatalf("unexpected error: %s", err)
32 | }
33 | tcs := []struct {
34 | desc string
35 | in string
36 | want server.ToolConfigs
37 | }{
38 | {
39 | desc: "basic example",
40 | in: `
41 | tools:
42 | example_tool:
43 | kind: oceanbase-execute-sql
44 | source: my-instance
45 | description: some description
46 | authRequired:
47 | - my-google-auth-service
48 | - other-auth-service
49 | `,
50 | want: server.ToolConfigs{
51 | "example_tool": oceanbaseexecutesql.Config{
52 | Name: "example_tool",
53 | Kind: "oceanbase-execute-sql",
54 | Source: "my-instance",
55 | Description: "some description",
56 | AuthRequired: []string{"my-google-auth-service", "other-auth-service"},
57 | },
58 | },
59 | },
60 | }
61 | for _, tc := range tcs {
62 | t.Run(tc.desc, func(t *testing.T) {
63 | got := struct {
64 | Tools server.ToolConfigs `yaml:"tools"`
65 | }{}
66 | // Parse contents
67 | err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got)
68 | if err != nil {
69 | t.Fatalf("unable to unmarshal: %s", err)
70 | }
71 | if diff := cmp.Diff(tc.want, got.Tools); diff != "" {
72 | t.Fatalf("incorrect parse: diff %v", diff)
73 | }
74 | })
75 | }
76 | }
77 |
```
--------------------------------------------------------------------------------
/docs/en/getting-started/quickstart/js/quickstart.test.js:
--------------------------------------------------------------------------------
```javascript
1 | // Copyright 2025 Google LLC
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | import { describe, test, before, after } from "node:test";
16 | import assert from "node:assert/strict";
17 | import fs from "fs";
18 | import path from "path";
19 | import { fileURLToPath } from "url";
20 |
21 | const ORCH_NAME = process.env.ORCH_NAME;
22 | const __dirname = path.dirname(fileURLToPath(import.meta.url));
23 | const orchDir = path.join(__dirname, ORCH_NAME);
24 | const quickstartPath = path.join(orchDir, "quickstart.js");
25 |
26 | const { main: runAgent } = await import(quickstartPath);
27 |
28 | const GOLDEN_FILE_PATH = path.resolve(__dirname, "../golden.txt");
29 |
30 | describe(`${ORCH_NAME} Quickstart Agent`, () => {
31 | let capturedOutput = [];
32 | let originalLog;
33 |
34 | before(() => {
35 | originalLog = console.log;
36 | console.log = (msg) => {
37 | capturedOutput.push(msg);
38 | };
39 | });
40 |
41 | after(() => {
42 | console.log = originalLog;
43 | });
44 |
45 | test("outputContainsRequiredKeywords", async () => {
46 | capturedOutput = [];
47 | await runAgent();
48 | const actualOutput = capturedOutput.join("\n");
49 |
50 | assert.ok(
51 | actualOutput.length > 0,
52 | "Assertion Failed: Script ran successfully but produced no output."
53 | );
54 |
55 | const goldenFile = fs.readFileSync(GOLDEN_FILE_PATH, "utf8");
56 | const keywords = goldenFile.split("\n").filter((kw) => kw.trim() !== "");
57 | const missingKeywords = [];
58 |
59 | for (const keyword of keywords) {
60 | if (!actualOutput.toLowerCase().includes(keyword.toLowerCase())) {
61 | missingKeywords.push(keyword);
62 | }
63 | }
64 |
65 | assert.ok(
66 | missingKeywords.length === 0,
67 | `Assertion Failed: The following keywords were missing from the output: [${missingKeywords.join(", ")}]`
68 | );
69 | });
70 | });
```