This is page 2 of 33. Use http://codebase.md/googleapis/genai-toolbox?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_with_coverage.sh │ └── versioned.release.cloudbuild.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 │ └── workflows │ ├── cloud_build_failure_reporter.yml │ ├── deploy_dev_docs.yaml │ ├── deploy_previous_version_docs.yaml │ ├── deploy_versioned_docs.yaml │ ├── docs_deploy.yaml │ ├── docs_preview_clean.yaml │ ├── docs_preview_deploy.yaml │ ├── lint.yaml │ ├── 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 ├── 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 │ └── en │ ├── _index.md │ ├── about │ │ ├── _index.md │ │ └── faq.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 │ │ └── 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 │ │ │ ├── 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_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 │ │ ├── sources │ │ │ ├── _index.md │ │ │ ├── alloydb-admin.md │ │ │ ├── alloydb-pg.md │ │ │ ├── bigquery.md │ │ │ ├── bigtable.md │ │ │ ├── cassandra.md │ │ │ ├── clickhouse.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 │ │ │ ├── firebird.md │ │ │ ├── firestore.md │ │ │ ├── http.md │ │ │ ├── looker.md │ │ │ ├── mongodb.md │ │ │ ├── mssql.md │ │ │ ├── mysql.md │ │ │ ├── neo4j.md │ │ │ ├── oceanbase.md │ │ │ ├── oracle.md │ │ │ ├── postgres.md │ │ │ ├── redis.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 │ │ ├── cloudmonitoring │ │ │ ├── _index.md │ │ │ └── cloud-monitoring-query-prometheus.md │ │ ├── cloudsql │ │ │ ├── _index.md │ │ │ ├── cloudsqlcreatedatabase.md │ │ │ ├── cloudsqlcreateusers.md │ │ │ ├── cloudsqlgetinstances.md │ │ │ ├── cloudsqllistdatabases.md │ │ │ ├── cloudsqllistinstances.md │ │ │ ├── cloudsqlmssqlcreateinstance.md │ │ │ ├── cloudsqlmysqlcreateinstance.md │ │ │ ├── cloudsqlpgcreateinstances.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 │ │ ├── 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-conversational-analytics.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-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-look.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-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-execute-sql.md │ │ │ ├── postgres-list-active-queries.md │ │ │ ├── postgres-list-available-extensions.md │ │ │ ├── postgres-list-installed-extensions.md │ │ │ ├── postgres-list-tables.md │ │ │ └── postgres-sql.md │ │ ├── redis │ │ │ ├── _index.md │ │ │ └── redis.md │ │ ├── spanner │ │ │ ├── _index.md │ │ │ ├── spanner-execute-sql.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 │ └── sdks │ ├── _index.md │ ├── go-sdk.md │ ├── js-sdk.md │ └── python-sdk.md ├── go.mod ├── go.sum ├── internal │ ├── auth │ │ ├── auth.go │ │ └── google │ │ └── google.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-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 │ │ ├── firestore.yaml │ │ ├── looker-conversational-analytics.yaml │ │ ├── looker.yaml │ │ ├── mssql.yaml │ │ ├── mysql.yaml │ │ ├── neo4j.yaml │ │ ├── oceanbase.yaml │ │ ├── postgres.yaml │ │ ├── spanner-postgres.yaml │ │ ├── spanner.yaml │ │ └── sqlite.yaml │ ├── 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 │ │ ├── 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 │ │ ├── bigtable │ │ │ ├── bigtable_test.go │ │ │ └── bigtable.go │ │ ├── cassandra │ │ │ ├── cassandra_test.go │ │ │ └── cassandra.go │ │ ├── clickhouse │ │ │ ├── clickhouse_test.go │ │ │ └── clickhouse.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 │ │ ├── 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 │ │ ├── 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.go │ │ ├── postgres │ │ │ ├── postgres_test.go │ │ │ └── postgres.go │ │ ├── redis │ │ │ ├── redis_test.go │ │ │ └── redis.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 │ │ ├── cloudmonitoring │ │ │ ├── cloudmonitoring_test.go │ │ │ └── cloudmonitoring.go │ │ ├── cloudsql │ │ │ ├── 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 │ │ ├── common_test.go │ │ ├── common.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 │ │ ├── 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 │ │ │ ├── lookercommon │ │ │ │ ├── lookercommon_test.go │ │ │ │ └── lookercommon.go │ │ │ ├── lookerconversationalanalytics │ │ │ │ ├── lookerconversationalanalytics_test.go │ │ │ │ └── lookerconversationalanalytics.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 │ │ │ ├── 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 │ │ │ └── lookerrunlook │ │ │ ├── lookerrunlook_test.go │ │ │ └── lookerrunlook.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 │ │ │ ├── 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.go │ │ │ └── oraclesql │ │ │ └── oraclesql.go │ │ ├── parameters_test.go │ │ ├── parameters.go │ │ ├── postgres │ │ │ ├── postgresexecutesql │ │ │ │ ├── postgresexecutesql_test.go │ │ │ │ └── postgresexecutesql.go │ │ │ ├── postgreslistactivequeries │ │ │ │ ├── postgreslistactivequeries_test.go │ │ │ │ └── postgreslistactivequeries.go │ │ │ ├── postgreslistavailableextensions │ │ │ │ ├── postgreslistavailableextensions_test.go │ │ │ │ └── postgreslistavailableextensions.go │ │ │ ├── postgreslistinstalledextensions │ │ │ │ ├── postgreslistinstalledextensions_test.go │ │ │ │ └── postgreslistinstalledextensions.go │ │ │ ├── postgreslisttables │ │ │ │ ├── postgreslisttables_test.go │ │ │ │ └── postgreslisttables.go │ │ │ └── postgressql │ │ │ ├── postgressql_test.go │ │ │ └── postgressql.go │ │ ├── redis │ │ │ ├── redis_test.go │ │ │ └── redis.go │ │ ├── spanner │ │ │ ├── spannerexecutesql │ │ │ │ ├── spannerexecutesql_test.go │ │ │ │ └── spannerexecutesql.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 │ └── util.go ├── LICENSE ├── logo.png ├── main.go ├── README.md └── 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 ├── cloudmonitoring │ └── cloud_monitoring_integration_test.go ├── cloudsql │ ├── 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 ├── common.go ├── couchbase │ └── couchbase_integration_test.go ├── dataform │ └── dataform_integration_test.go ├── dataplex │ └── dataplex_integration_test.go ├── dgraph │ └── dgraph_integration_test.go ├── firebird │ └── firebird_integration_test.go ├── firestore │ └── firestore_integration_test.go ├── http │ └── http_integration_test.go ├── looker │ └── looker_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 ├── redis │ └── redis_test.go ├── server.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 -------------------------------------------------------------------------------- /docs/en/resources/tools/firestore/firestore-list-collections.md: -------------------------------------------------------------------------------- ```markdown --- title: "firestore-list-collections" type: docs weight: 1 description: > A "firestore-list-collections" tool lists collections in Firestore, either at the root level or as subcollections of a document. aliases: - /resources/tools/firestore-list-collections --- ## About A `firestore-list-collections` tool lists [collections](https://firebase.google.com/docs/firestore/data-model#collections) in Firestore, either at the root level or as [subcollections](https://firebase.google.com/docs/firestore/data-model#subcollections) of a specific document. It's compatible with the following sources: - [firestore](../../sources/firestore.md) `firestore-list-collections` takes an optional `parentPath` parameter to specify a document path. If provided, it lists all subcollections of that document. If not provided, it lists all root-level collections in the database. ## Example ```yaml tools: list_firestore_collections: kind: firestore-list-collections source: my-firestore-source description: Use this tool to list collections in Firestore. ``` ## Reference | **field** | **type** | **required** | **description** | |-------------|:----------------:|:------------:|--------------------------------------------------------| | kind | string | true | Must be "firestore-list-collections". | | source | string | true | Name of the Firestore source to list collections from. | | description | string | true | Description of the tool that is passed to the LLM. | ``` -------------------------------------------------------------------------------- /internal/server/static/toolsets.html: -------------------------------------------------------------------------------- ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Toolsets View</title> <link rel="stylesheet" href="/ui/css/style.css"> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <script src="https://accounts.google.com/gsi/client" async defer></script> </head> <body> <div id="navbar-container" data-active-nav="/ui/toolsets"></div> <aside class="second-nav"> <h4>Retrieve Toolset</h4> <div class="search-container"> <input type="text" id="toolset-search-input" placeholder="Enter toolset name..."> <button id="toolset-search-button" aria-label="Retrieve Tools"> <span class="material-icons">search</span> </button> </div> <div id="secondary-panel-content"> <p>Retrieve toolset to see available tools.</p> </div> </aside> <div id="main-content-container"></div> <script type="module" src="/ui/js/toolsets.js"></script> <script src="/ui/js/navbar.js"></script> <script src="/ui/js/mainContent.js"></script> <script> document.addEventListener('DOMContentLoaded', () => { const navbarContainer = document.getElementById('navbar-container'); const activeNav = navbarContainer.getAttribute('data-active-nav'); renderNavbar('navbar-container', activeNav); renderMainContent('main-content-container', 'tool-display-area', getToolsetInstructions()); }); </script> </body> </html> ``` -------------------------------------------------------------------------------- /docs/en/resources/tools/dataform/dataform-compile-local.md: -------------------------------------------------------------------------------- ```markdown --- title: "dataform-compile-local" type: docs weight: 1 description: > A "dataform-compile-local" tool runs the `dataform compile` CLI command on a local project directory. aliases: - /resources/tools/dataform-compile-local --- ## About A `dataform-compile-local` tool runs the `dataform compile` command on a local Dataform project. It is a standalone tool and **is not** compatible with any sources. At invocation time, the tool executes `dataform compile --json` in the specified project directory and returns the resulting JSON object from the CLI. `dataform-compile-local` takes the following parameter: - `project_dir` (string): The absolute or relative path to the local Dataform project directory. The server process must have read access to this path. ## Requirements ### Dataform CLI This tool executes the `dataform` command-line interface (CLI) via a system call. You must have the **`dataform` CLI** installed and available in the server's system `PATH`. You can typically install the CLI via `npm`: ```bash npm install -g @dataform/cli ``` See the [official Dataform documentation](https://www.google.com/search?q=https://cloud.google.com/dataform/docs/install-dataform-cli) for more details. ## Example ```yaml tools: my_dataform_compiler: kind: dataform-compile-local description: Use this tool to compile a local Dataform project. ``` ## Reference | **field** | **type** | **required** | **description** | | :---- | :---- | :---- | :---- | | kind | string | true | Must be "dataform-compile-local". | | description | string | true | Description of the tool that is passed to the LLM. | ``` -------------------------------------------------------------------------------- /docs/en/resources/tools/alloydb/alloydb-get-instance.md: -------------------------------------------------------------------------------- ```markdown --- title: alloydb-get-instance type: docs weight: 1 description: "The \"alloydb-get-instance\" tool retrieves details for a specific AlloyDB instance.\n" aliases: [/resources/tools/alloydb-get-instance] --- ## About The `alloydb-get-instance` tool retrieves detailed information for a single, specified AlloyDB instance. It is compatible with [alloydb-admin](../../sources/alloydb-admin.md) source. | Parameter | Type | Description | Required | | :--------- | :----- | :-------------------------------------------------- | :------- | | `project` | string | The GCP project ID to get instance for. | Yes | | `location` | string | The location of the instance (e.g., 'us-central1'). | Yes | | `cluster` | string | The ID of the cluster. | Yes | | `instance` | string | The ID of the instance to retrieve. | Yes | ## Example ```yaml tools: get_specific_instance: kind: alloydb-get-instance source: my-alloydb-admin-source description: Use this tool to retrieve details for a specific AlloyDB instance. ``` ## Reference | **field** | **type** | **required** | **description** | | ----------- | :------: | :----------: | ---------------------------------------------------- | | kind | string | true | Must be alloydb-get-instance. | | source | string | true | The name of an `alloydb-admin` source. | | description | string | false | Description of the tool that is passed to the agent. | ``` -------------------------------------------------------------------------------- /docs/en/resources/tools/tidb/tidb-execute-sql.md: -------------------------------------------------------------------------------- ```markdown --- title: "tidb-execute-sql" type: docs weight: 1 description: > A "tidb-execute-sql" tool executes a SQL statement against a TiDB database. aliases: - /resources/tools/tidb-execute-sql --- ## About A `tidb-execute-sql` tool executes a SQL statement against a TiDB database. It's compatible with the following source: - [tidb](../sources/tidb.md) `tidb-execute-sql` takes one input parameter `sql` and run the sql statement against the `source`. > **Note:** This tool is intended for developer assistant workflows with > human-in-the-loop and shouldn't be used for production agents. ## Example ```yaml tools: execute_sql_tool: kind: tidb-execute-sql source: my-tidb-instance description: Use this tool to execute sql statement. ``` ## Reference | **field** | **type** | **required** | **description** | |-------------|:------------------------------------------:|:------------:|--------------------------------------------------------------------------------------------------| | kind | string | true | Must be "tidb-execute-sql". | | source | string | true | Name of the source the SQL should execute on. | | description | string | true | Description of the tool that is passed to the LLM. | ``` -------------------------------------------------------------------------------- /docs/en/resources/tools/trino/trino-execute-sql.md: -------------------------------------------------------------------------------- ```markdown --- title: "trino-execute-sql" type: docs weight: 1 description: > A "trino-execute-sql" tool executes a SQL statement against a Trino database. aliases: - /resources/tools/trino-execute-sql --- ## About A `trino-execute-sql` tool executes a SQL statement against a Trino database. It's compatible with any of the following sources: - [trino](../../sources/trino.md) `trino-execute-sql` takes one input parameter `sql` and run the sql statement against the `source`. > **Note:** This tool is intended for developer assistant workflows with > human-in-the-loop and shouldn't be used for production agents. ## Example ```yaml tools: execute_sql_tool: kind: trino-execute-sql source: my-trino-instance description: Use this tool to execute sql statement. ``` ## Reference | **field** | **type** | **required** | **description** | |-------------|:------------------------------------------:|:------------:|--------------------------------------------------------------------------------------------------| | kind | string | true | Must be "trino-execute-sql". | | source | string | true | Name of the source the SQL should execute on. | | description | string | true | Description of the tool that is passed to the LLM. | ``` -------------------------------------------------------------------------------- /docs/en/resources/tools/redis/redis.md: -------------------------------------------------------------------------------- ```markdown --- title: "redis" type: docs weight: 1 description: > A "redis" tool executes a set of pre-defined Redis commands against a Redis instance. aliases: - /resources/tools/redis --- ## About A redis tool executes a series of pre-defined Redis commands against a Redis source. The specified Redis commands are executed sequentially. Each command is represented as a string list, where the first element is the command name (e.g., SET, GET, HGETALL) and subsequent elements are its arguments. ### Dynamic Command Parameters Command arguments can be templated using the `$variableName` annotation. The array type parameters will be expanded once into multiple arguments. Take the following config for example: ```yaml commands: - [SADD, userNames, $userNames] # Array will be flattened into multiple arguments. parameters: - name: userNames type: array description: The user names to be set. ``` If the input is an array of strings `["Alice", "Sid", "Bob"]`, The final command to be executed after argument expansion will be `[SADD, userNames, Alice, Sid, Bob]`. ## Example ```yaml tools: user_data_tool: kind: redis source: my-redis-instance description: | Use this tool to interact with user data stored in Redis. It can set, retrieve, and delete user-specific information. commands: - [SADD, userNames, $userNames] # Array will be flattened into multiple arguments. - [GET, $userId] parameters: - name: userId type: string description: The unique identifier for the user. - name: userNames type: array description: The user names to be set. ``` ``` -------------------------------------------------------------------------------- /.ci/quickstart_test/js.integration.cloudbuild.yaml: -------------------------------------------------------------------------------- ```yaml # Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. steps: - name: 'node:20' id: 'js-quickstart-test' entrypoint: 'bash' args: # The '-c' flag tells bash to execute the following string as a command. # The 'set -ex' enables debug output and exits on error for easier troubleshooting. - -c - | set -ex export VERSION=$(cat ./cmd/version.txt) chmod +x .ci/quickstart_test/run_js_tests.sh .ci/quickstart_test/run_js_tests.sh env: - 'CLOUD_SQL_INSTANCE=${_CLOUD_SQL_INSTANCE}' - 'GCP_PROJECT=${_GCP_PROJECT}' - 'DATABASE_NAME=${_DATABASE_NAME}' - 'DB_USER=${_DB_USER}' secretEnv: ['TOOLS_YAML_CONTENT', 'GOOGLE_API_KEY', 'DB_PASSWORD'] availableSecrets: secretManager: - versionName: projects/${_GCP_PROJECT}/secrets/${_TOOLS_YAML_SECRET}/versions/6 env: 'TOOLS_YAML_CONTENT' - versionName: projects/${_GCP_PROJECT_NUMBER}/secrets/${_API_KEY_SECRET}/versions/latest env: 'GOOGLE_API_KEY' - versionName: projects/${_GCP_PROJECT}/secrets/${_DB_PASS_SECRET}/versions/latest env: 'DB_PASSWORD' timeout: 1000s options: logging: CLOUD_LOGGING_ONLY ``` -------------------------------------------------------------------------------- /docs/en/resources/tools/valkey/valkey.md: -------------------------------------------------------------------------------- ```markdown --- title: "valkey" type: docs weight: 1 description: > A "valkey" tool executes a set of pre-defined Valkey commands against a Valkey instance. aliases: - /resources/tools/valkey --- ## About A valkey tool executes a series of pre-defined Valkey commands against a Valkey instance. The specified Valkey commands are executed sequentially. Each command is represented as a string array, where the first element is the command name (e.g., SET, GET, HGETALL) and subsequent elements are its arguments. ### Dynamic Command Parameters Command arguments can be templated using the `$variableName` annotation. The array type parameters will be expanded once into multiple arguments. Take the following config for example: ```yaml commands: - [SADD, userNames, $userNames] # Array will be flattened into multiple arguments. parameters: - name: userNames type: array description: The user names to be set. ``` If the input is an array of strings `["Alice", "Sid", "Bob"]`, The final command to be executed after argument expansion will be `[SADD, userNames, Alice, Sid, Bob]`. ## Example ```yaml tools: user_data_tool: kind: valkey source: my-valkey-instance description: | Use this tool to interact with user data stored in Valkey. It can set, retrieve, and delete user-specific information. commands: - [SADD, userNames, $userNames] # Array will be flattened into multiple arguments. - [GET, $userId] parameters: - name: userId type: string description: The unique identifier for the user. - name: userNames type: array description: The user names to be set. ``` ``` -------------------------------------------------------------------------------- /.ci/quickstart_test/go.integration.cloudbuild.yaml: -------------------------------------------------------------------------------- ```yaml # Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. steps: - name: 'golang:1.25.1' id: 'go-quickstart-test' entrypoint: 'bash' args: # The '-c' flag tells bash to execute the following string as a command. # The 'set -ex' enables debug output and exits on error for easier troubleshooting. - -c - | set -ex export VERSION=$(cat ./cmd/version.txt) chmod +x .ci/quickstart_test/run_go_tests.sh .ci/quickstart_test/run_go_tests.sh env: - 'CLOUD_SQL_INSTANCE=${_CLOUD_SQL_INSTANCE}' - 'GCP_PROJECT=${_GCP_PROJECT}' - 'DATABASE_NAME=${_DATABASE_NAME}' - 'DB_USER=${_DB_USER}' secretEnv: ['TOOLS_YAML_CONTENT', 'GOOGLE_API_KEY', 'DB_PASSWORD'] availableSecrets: secretManager: - versionName: projects/${_GCP_PROJECT}/secrets/${_TOOLS_YAML_SECRET}/versions/7 env: 'TOOLS_YAML_CONTENT' - versionName: projects/${_GCP_PROJECT_NUMBER}/secrets/${_API_KEY_SECRET}/versions/latest env: 'GOOGLE_API_KEY' - versionName: projects/${_GCP_PROJECT}/secrets/${_DB_PASS_SECRET}/versions/latest env: 'DB_PASSWORD' timeout: 1000s options: logging: CLOUD_LOGGING_ONLY ``` -------------------------------------------------------------------------------- /.github/release-please.yml: -------------------------------------------------------------------------------- ```yaml # Copyright 2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. handleGHRelease: true packageName: genai-toolbox releaseType: simple versionFile: "cmd/version.txt" extraFiles: [ "README.md", "docs/en/getting-started/colab_quickstart.ipynb", "docs/en/getting-started/introduction/_index.md", "docs/en/getting-started/mcp_quickstart/_index.md", "docs/en/getting-started/quickstart/shared/configure_toolbox.md", "docs/en/samples/alloydb/_index.md", "docs/en/samples/alloydb/mcp_quickstart.md", "docs/en/samples/alloydb/ai-nl/alloydb_ai_nl.ipynb", "docs/en/samples/bigquery/local_quickstart.md", "docs/en/samples/bigquery/mcp_quickstart/_index.md", "docs/en/samples/bigquery/colab_quickstart_bigquery.ipynb", "docs/en/samples/looker/looker_gemini.md", "docs/en/samples/looker/looker_gemini_oauth/_index.md", "docs/en/samples/looker/looker_mcp_inspector/_index.md", "docs/en/how-to/connect-ide/looker_mcp.md", "docs/en/how-to/connect-ide/mysql_mcp.md", "docs/en/how-to/connect-ide/mssql_mcp.md", "docs/en/how-to/connect-ide/postgres_mcp.md", "docs/en/how-to/connect-ide/neo4j_mcp.md", "docs/en/how-to/connect-ide/sqlite_mcp.md", ] ``` -------------------------------------------------------------------------------- /docs/en/resources/tools/mysql/mysql-execute-sql.md: -------------------------------------------------------------------------------- ```markdown --- title: "mysql-execute-sql" type: docs weight: 1 description: > A "mysql-execute-sql" tool executes a SQL statement against a MySQL database. aliases: - /resources/tools/mysql-execute-sql --- ## About A `mysql-execute-sql` tool executes a SQL statement against a MySQL database. It's compatible with any of the following sources: - [cloud-sql-mysql](../../sources/cloud-sql-mysql.md) - [mysql](../../sources/mysql.md) `mysql-execute-sql` takes one input parameter `sql` and run the sql statement against the `source`. > **Note:** This tool is intended for developer assistant workflows with > human-in-the-loop and shouldn't be used for production agents. ## Example ```yaml tools: execute_sql_tool: kind: mysql-execute-sql source: my-mysql-instance description: Use this tool to execute sql statement. ``` ## Reference | **field** | **type** | **required** | **description** | |-------------|:------------------------------------------:|:------------:|--------------------------------------------------------------------------------------------------| | kind | string | true | Must be "mysql-execute-sql". | | source | string | true | Name of the source the SQL should execute on. | | description | string | true | Description of the tool that is passed to the LLM. | ``` -------------------------------------------------------------------------------- /docs/en/resources/tools/oracle/oracle-sql.md: -------------------------------------------------------------------------------- ```markdown --- title: "oracle-sql" type: docs weight: 1 description: > An "oracle-sql" tool executes a pre-defined SQL statement against an Oracle database. aliases: - /resources/tools/oracle-sql --- ## About An `oracle-sql` tool executes a pre-defined SQL statement against an Oracle database. It's compatible with the following source: - [oracle](../../sources/oracle.md) The specified SQL statement is executed using [prepared statements][oracle-stmt] for security and performance. It expects parameter placeholders in the SQL query to be in the native Oracle format (e.g., `:1`, `:2`). [oracle-stmt]: https://docs.oracle.com/javase/tutorial/jdbc/basics/prepared.html ## Example > **Note:** This tool uses parameterized queries to prevent SQL injections. > Query parameters can be used as substitutes for arbitrary expressions. > Parameters cannot be used as substitutes for identifiers, column names, table > names, or other parts of the query. ```yaml tools: search_flights_by_number: kind: oracle-sql source: my-oracle-instance statement: | SELECT * FROM flights WHERE airline = :1 AND flight_number = :2 FETCH FIRST 10 ROWS ONLY description: | Use this tool to get information for a specific flight. Takes an airline code and flight number and returns info on the flight. Do NOT use this tool with a flight id. Do NOT guess an airline code or flight number. Example: {{ "airline": "CY", "flight_number": "888", }} parameters: - name: airline type: string description: Airline unique 2 letter identifier - name: flight_number type: string description: 1 to 4 digit number ``` ``` -------------------------------------------------------------------------------- /.ci/quickstart_test/py.integration.cloudbuild.yaml: -------------------------------------------------------------------------------- ```yaml # Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. steps: - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:537.0.0' id: 'python-quickstart-test' entrypoint: 'bash' args: # The '-c' flag tells bash to execute the following string as a command. # The 'set -ex' enables debug output and exits on error for easier troubleshooting. - -c - | set -ex export VERSION=$(cat ./cmd/version.txt) chmod +x .ci/quickstart_test/run_py_tests.sh .ci/quickstart_test/run_py_tests.sh env: - 'CLOUD_SQL_INSTANCE=${_CLOUD_SQL_INSTANCE}' - 'GCP_PROJECT=${_GCP_PROJECT}' - 'DATABASE_NAME=${_DATABASE_NAME}' - 'DB_USER=${_DB_USER}' secretEnv: ['TOOLS_YAML_CONTENT', 'GOOGLE_API_KEY', 'DB_PASSWORD'] availableSecrets: secretManager: - versionName: projects/${_GCP_PROJECT}/secrets/${_TOOLS_YAML_SECRET}/versions/5 env: 'TOOLS_YAML_CONTENT' - versionName: projects/${_GCP_PROJECT_NUMBER}/secrets/${_API_KEY_SECRET}/versions/latest env: 'GOOGLE_API_KEY' - versionName: projects/${_GCP_PROJECT}/secrets/${_DB_PASS_SECRET}/versions/latest env: 'DB_PASSWORD' timeout: 1000s options: logging: CLOUD_LOGGING_ONLY ``` -------------------------------------------------------------------------------- /docs/en/resources/sources/cloud-monitoring.md: -------------------------------------------------------------------------------- ```markdown --- title: "Cloud Monitoring" type: docs weight: 1 description: > A "cloud-monitoring" source provides a client for the Cloud Monitoring API. aliases: - /resources/sources/cloud-monitoring --- ## About The `cloud-monitoring` source provides a client to interact with the [Google Cloud Monitoring API](https://cloud.google.com/monitoring/api). This allows tools to access cloud monitoring metrics explorer and run promql queries. Authentication can be handled in two ways: 1. **Application Default Credentials (ADC):** By default, the source uses ADC to authenticate with the API. 2. **Client-side OAuth:** If `useClientOAuth` is set to `true`, the source will expect an OAuth 2.0 access token to be provided by the client (e.g., a web browser) for each request. ## Example ```yaml sources: my-cloud-monitoring: kind: cloud-monitoring my-oauth-cloud-monitoring: kind: cloud-monitoring useClientOAuth: true ``` ## Reference | **field** | **type** | **required** | **description** | |----------------|:--------:|:------------:|------------------------------------------------------------------------------------------------------------------------------------------------| | kind | string | true | Must be "cloud-monitoring". | | useClientOAuth | boolean | false | If true, the source will use client-side OAuth for authorization. Otherwise, it will use Application Default Credentials. Defaults to `false`. | ``` -------------------------------------------------------------------------------- /docs/en/resources/tools/clickhouse/clickhouse-execute-sql.md: -------------------------------------------------------------------------------- ```markdown --- title: "clickhouse-execute-sql" type: docs weight: 1 description: > A "clickhouse-execute-sql" tool executes a SQL statement against a ClickHouse database. aliases: - /resources/tools/clickhouse-execute-sql --- ## About A `clickhouse-execute-sql` tool executes a SQL statement against a ClickHouse database. It's compatible with the [clickhouse](../../sources/clickhouse.md) source. `clickhouse-execute-sql` takes one input parameter `sql` and runs the SQL statement against the specified `source`. This tool includes query logging capabilities for monitoring and debugging purposes. > **Note:** This tool is intended for developer assistant workflows with > human-in-the-loop and shouldn't be used for production agents. ## Example ```yaml tools: execute_sql_tool: kind: clickhouse-execute-sql source: my-clickhouse-instance description: Use this tool to execute SQL statements against ClickHouse. ``` ## Parameters | **parameter** | **type** | **required** | **description** | |---------------|:--------:|:------------:|---------------------------------------------------| | sql | string | true | The SQL statement to execute against the database | ## Reference | **field** | **type** | **required** | **description** | |-------------|:--------:|:------------:|-------------------------------------------------------| | kind | string | true | Must be "clickhouse-execute-sql". | | source | string | true | Name of the ClickHouse source to execute SQL against. | | description | string | true | Description of the tool that is passed to the LLM. | ``` -------------------------------------------------------------------------------- /docs/en/resources/tools/looker/looker-get-filters.md: -------------------------------------------------------------------------------- ```markdown --- title: "looker-get-filters" type: docs weight: 1 description: > A "looker-get-filters" tool returns all the filters from a given explore in a given model in the source. aliases: - /resources/tools/looker-get-filters --- ## About A `looker-get-filters` tool returns all the filters from a given explore in a given model in the source. It's compatible with the following sources: - [looker](../../sources/looker.md) `looker-get-filters` accepts two parameters, the `model` and the `explore`. ## Example ```yaml tools: get_dimensions: kind: looker-get-filters source: looker-source description: | The get_filters tool retrieves the list of filters defined in an explore. It takes two parameters, the model_name looked up from get_models and the explore_name looked up from get_explores. ``` The response is a json array with the following elements: ```json { "name": "field name", "description": "field description", "type": "field type", "label": "field label", "label_short": "field short label", "tags": ["tags", ...], "synonyms": ["synonyms", ...], "suggestions": ["suggestion", ...], "suggest_explore": "explore", "suggest_dimension": "dimension" } ``` ## Reference | **field** | **type** | **required** | **description** | |-------------|:--------:|:------------:|----------------------------------------------------| | kind | string | true | Must be "looker-get-filters". | | source | string | true | Name of the source the SQL should execute on. | | description | string | true | Description of the tool that is passed to the LLM. | ``` -------------------------------------------------------------------------------- /docs/en/resources/sources/cloud-sql-admin.md: -------------------------------------------------------------------------------- ```markdown --- title: "Cloud SQL Admin" type: docs weight: 1 description: > A "cloud-sql-admin" source provides a client for the Cloud SQL Admin API. aliases: - /resources/sources/cloud-sql-admin --- ## About The `cloud-sql-admin` source provides a client to interact with the [Google Cloud SQL Admin API](https://cloud.google.com/sql/docs/mysql/admin-api). This allows tools to perform administrative tasks on Cloud SQL instances, such as creating users and databases. Authentication can be handled in two ways: 1. **Application Default Credentials (ADC):** By default, the source uses ADC to authenticate with the API. 2. **Client-side OAuth:** If `useClientOAuth` is set to `true`, the source will expect an OAuth 2.0 access token to be provided by the client (e.g., a web browser) for each request. ## Example ```yaml sources: my-cloud-sql-admin: kind: cloud-sql-admin my-oauth-cloud-sql-admin: kind: cloud-sql-admin useClientOAuth: true ``` ## Reference | **field** | **type** | **required** | **description** | |----------------|:--------:|:------------:|------------------------------------------------------------------------------------------------------------------------------------------------| | kind | string | true | Must be "cloud-sql-admin". | | useClientOAuth | boolean | false | If true, the source will use client-side OAuth for authorization. Otherwise, it will use Application Default Credentials. Defaults to `false`. | ``` -------------------------------------------------------------------------------- /docs/en/resources/sources/alloydb-admin.md: -------------------------------------------------------------------------------- ```markdown --- title: "AlloyDB Admin" linkTitle: "AlloyDB Admin" type: docs weight: 2 description: > The "alloydb-admin" source provides a client for the AlloyDB API. aliases: - /resources/sources/alloydb-admin --- ## About The `alloydb-admin` source provides a client to interact with the [Google AlloyDB API](https://cloud.google.com/alloydb/docs/reference/rest). This allows tools to perform administrative tasks on AlloyDB resources, such as managing clusters, instances, and users. Authentication can be handled in two ways: 1. **Application Default Credentials (ADC):** By default, the source uses ADC to authenticate with the API. 2. **Client-side OAuth:** If `useClientOAuth` is set to `true`, the source will expect an OAuth 2.0 access token to be provided by the client (e.g., a web browser) for each request. ## Example ```yaml sources: my-alloydb-admin: kind: alloy-admin my-oauth-alloydb-admin: kind: alloydb-admin useClientOAuth: true ``` ## Reference | **field** | **type** | **required** | **description** | |----------------|:--------:|:------------:|------------------------------------------------------------------------------------------------------------------------------------------------| | kind | string | true | Must be "alloydb-admin". | | useClientOAuth | boolean | false | If true, the source will use client-side OAuth for authorization. Otherwise, it will use Application Default Credentials. Defaults to `false`. | ``` -------------------------------------------------------------------------------- /docs/en/resources/tools/bigquery/bigquery-get-dataset-info.md: -------------------------------------------------------------------------------- ```markdown --- title: "bigquery-get-dataset-info" type: docs weight: 1 description: > A "bigquery-get-dataset-info" tool retrieves metadata for a BigQuery dataset. aliases: - /resources/tools/bigquery-get-dataset-info --- ## About A `bigquery-get-dataset-info` tool retrieves metadata for a BigQuery dataset. It's compatible with the following sources: - [bigquery](../../sources/bigquery.md) `bigquery-get-dataset-info` takes a `dataset` parameter to specify the dataset on the given source. It also optionally accepts a `project` parameter to define the Google Cloud project ID. If the `project` parameter is not provided, the tool defaults to using the project defined in the source configuration. ## Example ```yaml tools: bigquery_get_dataset_info: kind: bigquery-get-dataset-info source: my-bigquery-source description: Use this tool to get dataset metadata. ``` ## Reference | **field** | **type** | **required** | **description** | |-------------|:------------------------------------------:|:------------:|--------------------------------------------------------------------------------------------------| | kind | string | true | Must be "bigquery-get-dataset-info". | | source | string | true | Name of the source the SQL should execute on. | | description | string | true | Description of the tool that is passed to the LLM. | ``` -------------------------------------------------------------------------------- /internal/prebuiltconfigs/tools/alloydb-postgres-admin.yaml: -------------------------------------------------------------------------------- ```yaml # Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. sources: alloydb-admin-source: kind: alloydb-admin tools: create_cluster: kind: alloydb-create-cluster source: alloydb-admin-source wait_for_operation: kind: alloydb-wait-for-operation source: alloydb-admin-source delay: 1s maxDelay: 4m multiplier: 2 maxRetries: 10 create_instance: kind: alloydb-create-instance source: alloydb-admin-source list_clusters: kind: alloydb-list-clusters source: alloydb-admin-source list_instances: kind: alloydb-list-instances source: alloydb-admin-source list_users: kind: alloydb-list-users source: alloydb-admin-source create_user: kind: alloydb-create-user source: alloydb-admin-source get_cluster: kind: alloydb-get-cluster source: alloydb-admin-source get_instance: kind: alloydb-get-instance source: alloydb-admin-source get_user: kind: alloydb-get-user source: alloydb-admin-source toolsets: alloydb_postgres_admin_tools: - create_cluster - wait_for_operation - create_instance - list_clusters - list_instances - list_users - create_user - get_cluster - get_instance - get_user ``` -------------------------------------------------------------------------------- /docs/en/resources/tools/looker/looker-get-parameters.md: -------------------------------------------------------------------------------- ```markdown --- title: "looker-get-parameters" type: docs weight: 1 description: > A "looker-get-parameters" tool returns all the parameters from a given explore in a given model in the source. aliases: - /resources/tools/looker-get-parameters --- ## About A `looker-get-parameters` tool returns all the parameters from a given explore in a given model in the source. It's compatible with the following sources: - [looker](../../sources/looker.md) `looker-get-parameters` accepts two parameters, the `model` and the `explore`. ## Example ```yaml tools: get_parameters: kind: looker-get-parameters source: looker-source description: | The get_parameters tool retrieves the list of parameters defined in an explore. It takes two parameters, the model_name looked up from get_models and the explore_name looked up from get_explores. ``` The response is a json array with the following elements: ```json { "name": "field name", "description": "field description", "type": "field type", "label": "field label", "label_short": "field short label", "tags": ["tags", ...], "synonyms": ["synonyms", ...], "suggestions": ["suggestion", ...], "suggest_explore": "explore", "suggest_dimension": "dimension" } ``` ## Reference | **field** | **type** | **required** | **description** | |-------------|:--------:|:------------:|----------------------------------------------------| | kind | string | true | Must be "looker-get-parameters". | | source | string | true | Name of the source the SQL should execute on. | | description | string | true | Description of the tool that is passed to the LLM. | ``` -------------------------------------------------------------------------------- /docs/en/resources/tools/postgres/postgres-execute-sql.md: -------------------------------------------------------------------------------- ```markdown --- title: "postgres-execute-sql" type: docs weight: 1 description: > A "postgres-execute-sql" tool executes a SQL statement against a Postgres database. aliases: - /resources/tools/postgres-execute-sql --- ## About A `postgres-execute-sql` tool executes a SQL statement against a Postgres database. It's compatible with any of the following sources: - [alloydb-postgres](../../sources/alloydb-pg.md) - [cloud-sql-postgres](../../sources/cloud-sql-pg.md) - [postgres](../../sources/postgres.md) `postgres-execute-sql` takes one input parameter `sql` and run the sql statement against the `source`. > **Note:** This tool is intended for developer assistant workflows with > human-in-the-loop and shouldn't be used for production agents. ## Example ```yaml tools: execute_sql_tool: kind: postgres-execute-sql source: my-pg-instance description: Use this tool to execute sql statement. ``` ## Reference | **field** | **type** | **required** | **description** | |-------------|:------------------------------------------:|:------------:|--------------------------------------------------------------------------------------------------| | kind | string | true | Must be "postgres-execute-sql". | | source | string | true | Name of the source the SQL should execute on. | | description | string | true | Description of the tool that is passed to the LLM. | ``` -------------------------------------------------------------------------------- /docs/en/resources/tools/clickhouse/clickhouse-list-databases.md: -------------------------------------------------------------------------------- ```markdown --- title: "clickhouse-list-databases" type: docs weight: 3 description: > A "clickhouse-list-databases" tool lists all databases in a ClickHouse instance. aliases: - /resources/tools/clickhouse-list-databases --- ## About A `clickhouse-list-databases` tool lists all available databases in a ClickHouse instance. It's compatible with the [clickhouse](../../sources/clickhouse.md) source. This tool executes the `SHOW DATABASES` command and returns a list of all databases accessible to the configured user, making it useful for database discovery and exploration tasks. ## Example ```yaml tools: list_clickhouse_databases: kind: clickhouse-list-databases source: my-clickhouse-instance description: List all available databases in the ClickHouse instance ``` ## Return Value The tool returns an array of objects, where each object contains: - `name`: The name of the database Example response: ```json [ {"name": "default"}, {"name": "system"}, {"name": "analytics"}, {"name": "user_data"} ] ``` ## Reference | **field** | **type** | **required** | **description** | |--------------|:------------------:|:------------:|-------------------------------------------------------| | kind | string | true | Must be "clickhouse-list-databases". | | source | string | true | Name of the ClickHouse source to list databases from. | | description | string | true | Description of the tool that is passed to the LLM. | | authRequired | array of string | false | Authentication services required to use this tool. | | parameters | array of Parameter | false | Parameters for the tool (typically not used). | ``` -------------------------------------------------------------------------------- /docs/en/resources/tools/mssql/mssql-list-tables.md: -------------------------------------------------------------------------------- ```markdown --- title: "mssql-list-tables" type: docs weight: 1 description: > The "mssql-list-tables" tool lists schema information for all or specified tables in a SQL server database. aliases: - /resources/tools/mssql-list-tables --- ## About The `mssql-list-tables` tool retrieves schema information for all or specified tables in a SQL server database. It is compatible with any of the following sources: - [cloud-sql-mssql](../../sources/cloud-sql-mssql.md) - [mssql](../../sources/mssql.md) `mssql-list-tables` lists detailed schema information (object type, columns, constraints, indexes, triggers, owner, comment) as JSON for user-created tables (ordinary or partitioned). The tool takes the following input parameters: - **`table_names`** (string, optional): Filters by a comma-separated list of names. By default, it lists all tables in user schemas. Default: `""`. - **`output_format`** (string, optional): Indicate the output format of table schema. `simple` will return only the table names, `detailed` will return the full table information. Default: `detailed`. ## Example ```yaml tools: mssql_list_tables: kind: mssql-list-tables source: mssql-source description: Use this tool to retrieve schema information for all or specified tables. Output format can be simple (only table names) or detailed. ``` ## Reference | **field** | **type** | **required** | **description** | |-------------|:--------:|:------------:|------------------------------------------------------| | kind | string | true | Must be "mssql-list-tables". | | source | string | true | Name of the source the SQL should execute on. | | description | string | true | Description of the tool that is passed to the agent. | ``` -------------------------------------------------------------------------------- /internal/sources/sqlite/sqlite_test.go: -------------------------------------------------------------------------------- ```go // Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package sqlite_test import ( "testing" yaml "github.com/goccy/go-yaml" "github.com/google/go-cmp/cmp" "github.com/googleapis/genai-toolbox/internal/server" "github.com/googleapis/genai-toolbox/internal/sources" "github.com/googleapis/genai-toolbox/internal/sources/sqlite" "github.com/googleapis/genai-toolbox/internal/testutils" ) func TestParseFromYamlSQLite(t *testing.T) { tcs := []struct { desc string in string want server.SourceConfigs }{ { desc: "basic example", in: ` sources: my-sqlite-db: kind: sqlite database: /path/to/database.db `, want: map[string]sources.SourceConfig{ "my-sqlite-db": sqlite.Config{ Name: "my-sqlite-db", Kind: sqlite.SourceKind, Database: "/path/to/database.db", }, }, }, } for _, tc := range tcs { t.Run(tc.desc, func(t *testing.T) { got := struct { Sources server.SourceConfigs `yaml:"sources"` }{} // Parse contents err := yaml.Unmarshal(testutils.FormatYaml(tc.in), &got) if err != nil { t.Fatalf("unable to unmarshal: %s", err) } if !cmp.Equal(tc.want, got.Sources) { t.Fatalf("incorrect parse: want %v, got %v", tc.want, got.Sources) } }) } } ``` -------------------------------------------------------------------------------- /.ci/generate_release_table.sh: -------------------------------------------------------------------------------- ```bash #! /bin/bash # Check if VERSION has been set if [ -z "${VERSION}" ]; then echo "Error: VERSION env var is not set" >&2 # Print to stderr exit 1 # Exit with a non-zero status to indicate an error fi FILES=("linux.amd64" "darwin.arm64" "darwin.amd64" "windows.amd64") output_string="" # Define the descriptions - ensure this array's order matches FILES DESCRIPTIONS=( "For **Linux** systems running on **Intel/AMD 64-bit processors**." "For **macOS** systems running on **Apple Silicon** (M1, M2, M3, etc.) processors." "For **macOS** systems running on **Intel processors**." "For **Windows** systems running on **Intel/AMD 64-bit processors**." ) # Write the table header ROW_FMT="| %-105s | %-120s | %-67s |\n" output_string+=$(printf "$ROW_FMT" "**OS/Architecture**" "**Description**" "**SHA256 Hash**")$'\n' output_string+=$(printf "$ROW_FMT" "$(printf -- '-%0.s' {1..105})" "$(printf -- '-%0.s' {1..120})" "$(printf -- '-%0.s' {1..67})")$'\n' # Loop through all files matching the pattern "toolbox.*.*" for i in "${!FILES[@]}" do file_key="${FILES[$i]}" # e.g., "linux.amd64" description_text="${DESCRIPTIONS[$i]}" # Extract OS and ARCH from the filename OS=$(echo "$file_key" | cut -d '.' -f 1) ARCH=$(echo "$file_key" | cut -d '.' -f 2) # Get release URL if [ "$OS" = 'windows' ]; then URL="https://storage.googleapis.com/genai-toolbox/$VERSION/$OS/$ARCH/toolbox.exe" else URL="https://storage.googleapis.com/genai-toolbox/$VERSION/$OS/$ARCH/toolbox" fi curl "$URL" --fail --output toolbox || exit 1 # Calculate the SHA256 checksum of the file SHA256=$(shasum -a 256 toolbox | awk '{print $1}') # Write the table row output_string+=$(printf "$ROW_FMT" "[$OS/$ARCH]($URL)" "$description_text" "$SHA256")$'\n' rm toolbox done printf "$output_string\n" ``` -------------------------------------------------------------------------------- /docs/en/resources/tools/postgres/postgres-list-tables.md: -------------------------------------------------------------------------------- ```markdown --- title: "postgres-list-tables" type: docs weight: 1 description: > The "postgres-list-tables" tool lists schema information for all or specified tables in a Postgres database. aliases: - /resources/tools/postgres-list-tables --- ## About The `postgres-list-tables` tool retrieves schema information for all or specified tables in a Postgres database. It's compatible with any of the following sources: - [alloydb-postgres](../../sources/alloydb-pg.md) - [cloud-sql-postgres](../../sources/cloud-sql-pg.md) - [postgres](../../sources/postgres.md) `postgres-list-tables` lists detailed schema information (object type, columns, constraints, indexes, triggers, owner, comment) as JSON for user-created tables (ordinary or partitioned). The tool takes the following input parameters: * `table_names` (optional): Filters by a comma-separated list of names. By default, it lists all tables in user schemas.* `output_format` (optional): Indicate the output format of table schema. `simple` will return only the table names, `detailed` will return the full table information. Default: `detailed`. ## Example ```yaml tools: postgres_list_tables: kind: postgres-list-tables source: postgres-source description: Use this tool to retrieve schema information for all or specified tables. Output format can be simple (only table names) or detailed. ``` ## Reference | **field** | **type** | **required** | **description** | |-------------|:--------:|:------------:|------------------------------------------------------| | kind | string | true | Must be "postgres-list-tables". | | source | string | true | Name of the source the SQL should execute on. | | description | string | true | Description of the tool that is passed to the agent. | ``` -------------------------------------------------------------------------------- /internal/tools/clickhouse/clickhouseexecutesql/clickhouseexecutesql_test.go: -------------------------------------------------------------------------------- ```go // Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package clickhouse import ( "testing" yaml "github.com/goccy/go-yaml" "github.com/google/go-cmp/cmp" "github.com/googleapis/genai-toolbox/internal/server" "github.com/googleapis/genai-toolbox/internal/testutils" ) func TestParseFromYamlClickHouseExecuteSQL(t *testing.T) { ctx, err := testutils.ContextWithNewLogger() if err != nil { t.Fatalf("unexpected error: %s", err) } tcs := []struct { desc string in string want server.ToolConfigs }{ { desc: "basic example", in: ` tools: example_tool: kind: clickhouse-execute-sql source: my-instance description: some description `, want: server.ToolConfigs{ "example_tool": Config{ Name: "example_tool", Kind: "clickhouse-execute-sql", Source: "my-instance", Description: "some description", AuthRequired: []string{}, }, }, }, } for _, tc := range tcs { t.Run(tc.desc, func(t *testing.T) { got := struct { Tools server.ToolConfigs `yaml:"tools"` }{} err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got) if err != nil { t.Fatalf("unable to unmarshal: %s", err) } if diff := cmp.Diff(tc.want, got.Tools); diff != "" { t.Fatalf("incorrect parse: diff %v", diff) } }) } } ``` -------------------------------------------------------------------------------- /docs/en/resources/tools/alloydb/alloydb-list-clusters.md: -------------------------------------------------------------------------------- ```markdown --- title: alloydb-list-clusters type: docs weight: 1 description: "The \"alloydb-list-clusters\" tool lists the AlloyDB clusters in a given project and location.\n" aliases: [/resources/tools/alloydb-list-clusters] --- ## About The `alloydb-list-clusters` tool retrieves AlloyDB cluster information for all or specified locations in a given project. It is compatible with [alloydb-admin](../../sources/alloydb-admin.md) source. `alloydb-list-clusters` tool lists the detailed information of AlloyDB cluster(cluster name, state, configuration, etc) for a given project and location. The tool takes the following input parameters: | Parameter | Type | Description | Required | | :--------- | :----- | :----------------------------------------------------------------------------------------------- | :------- | | `project` | string | The GCP project ID to list clusters for. | Yes | | `location` | string | The location to list clusters in (e.g., 'us-central1'). Use `-` for all locations. Default: `-`. | No | ## Example ```yaml tools: list_clusters: kind: alloydb-list-clusters source: alloydb-admin-source description: Use this tool to list all AlloyDB clusters in a given project and location. ``` ## Reference | **field** | **type** | **required** | **description** | | ----------- | :------: | :----------: | ---------------------------------------------------- | | kind | string | true | Must be alloydb-list-clusters. | | source | string | true | The name of an `alloydb-admin` source. | | description | string | false | Description of the tool that is passed to the agent. | ``` -------------------------------------------------------------------------------- /internal/prebuiltconfigs/tools/looker-conversational-analytics.yaml: -------------------------------------------------------------------------------- ```yaml # Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. sources: looker-source: kind: looker base_url: ${LOOKER_BASE_URL} client_id: ${LOOKER_CLIENT_ID:} client_secret: ${LOOKER_CLIENT_SECRET:} verify_ssl: ${LOOKER_VERIFY_SSL:true} timeout: 600s use_client_oauth: ${LOOKER_USE_CLIENT_OAUTH:false} project: ${LOOKER_PROJECT:} location: ${LOOKER_LOCATION:} tools: ask_data_insights: kind: looker-conversational-analytics source: looker-source description: | Use this tool to perform data analysis, get insights, or answer complex questions about the contents of specific Looker explores. get_models: kind: looker-get-models source: looker-source description: | The get_models tool retrieves the list of LookML models in the Looker system. It takes no parameters. get_explores: kind: looker-get-explores source: looker-source description: | The get_explores tool retrieves the list of explores defined in a LookML model in the Looker system. It takes one parameter, the model_name looked up from get_models. toolsets: looker_conversational_analytics_tools: - ask_data_insights - get_models - get_explores ``` -------------------------------------------------------------------------------- /internal/tools/toolsets.go: -------------------------------------------------------------------------------- ```go // Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package tools import ( "fmt" ) type ToolsetConfig struct { Name string `yaml:"name"` ToolNames []string `yaml:",inline"` } type Toolset struct { Name string `yaml:"name"` Tools []*Tool `yaml:",inline"` Manifest ToolsetManifest `yaml:",inline"` McpManifest []McpManifest `yaml:",inline"` } type ToolsetManifest struct { ServerVersion string `json:"serverVersion"` ToolsManifest map[string]Manifest `json:"tools"` } func (t ToolsetConfig) Initialize(serverVersion string, toolsMap map[string]Tool) (Toolset, error) { // finish toolset setup // Check each declared tool name exists var toolset Toolset toolset.Name = t.Name if !IsValidName(toolset.Name) { return toolset, fmt.Errorf("invalid toolset name: %s", t) } toolset.Tools = make([]*Tool, len(t.ToolNames)) toolset.Manifest = ToolsetManifest{ ServerVersion: serverVersion, ToolsManifest: make(map[string]Manifest), } for _, toolName := range t.ToolNames { tool, ok := toolsMap[toolName] if !ok { return toolset, fmt.Errorf("tool does not exist: %s", t) } toolset.Tools = append(toolset.Tools, &tool) toolset.Manifest.ToolsManifest[toolName] = tool.Manifest() toolset.McpManifest = append(toolset.McpManifest, tool.McpManifest()) } return toolset, nil } ``` -------------------------------------------------------------------------------- /internal/tools/cloudsql/cloudsqllistinstances/cloudsqllistinstances_test.go: -------------------------------------------------------------------------------- ```go // Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package cloudsqllistinstances import ( "testing" "github.com/goccy/go-yaml" "github.com/google/go-cmp/cmp" "github.com/googleapis/genai-toolbox/internal/server" "github.com/googleapis/genai-toolbox/internal/testutils" ) func TestParseFromYaml(t *testing.T) { ctx, err := testutils.ContextWithNewLogger() if err != nil { t.Fatalf("unexpected error: %s", err) } tcs := []struct { desc string in string want server.ToolConfigs }{ { desc: "basic example", in: ` tools: list-my-instances: kind: cloud-sql-list-instances description: some description source: some-source `, want: server.ToolConfigs{ "list-my-instances": Config{ Name: "list-my-instances", Kind: "cloud-sql-list-instances", Description: "some description", AuthRequired: []string{}, Source: "some-source", }, }, }, } for _, tc := range tcs { t.Run(tc.desc, func(t *testing.T) { got := struct { Tools server.ToolConfigs `yaml:"tools"` }{} // Parse contents err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got) if err != nil { t.Fatalf("unable to unmarshal: %s", err) } if diff := cmp.Diff(tc.want, got.Tools); diff != "" { t.Fatalf("incorrect parse: diff %v", diff) } }) } } ``` -------------------------------------------------------------------------------- /internal/tools/dataform/dataformcompilelocal/dataformcompilelocal_test.go: -------------------------------------------------------------------------------- ```go // Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package dataformcompilelocal_test import ( "testing" yaml "github.com/goccy/go-yaml" "github.com/google/go-cmp/cmp" "github.com/googleapis/genai-toolbox/internal/server" "github.com/googleapis/genai-toolbox/internal/testutils" "github.com/googleapis/genai-toolbox/internal/tools/dataform/dataformcompilelocal" ) func TestParseFromYamlDataformCompile(t *testing.T) { ctx, err := testutils.ContextWithNewLogger() if err != nil { t.Fatalf("unexpected error: %s", err) } tcs := []struct { desc string in string want server.ToolConfigs }{ { desc: "basic example", in: ` tools: example_tool: kind: dataform-compile-local description: some description `, want: server.ToolConfigs{ "example_tool": dataformcompilelocal.Config{ Name: "example_tool", Kind: "dataform-compile-local", Description: "some description", AuthRequired: []string{}, }, }, }, } for _, tc := range tcs { t.Run(tc.desc, func(t *testing.T) { got := struct { Tools server.ToolConfigs `yaml:"tools"` }{} // Parse contents err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got) if err != nil { t.Fatalf("unable to unmarshal: %s", err) } if diff := cmp.Diff(tc.want, got.Tools); diff != "" { t.Fatalf("incorrect parse: diff %v", diff) } }) } } ``` -------------------------------------------------------------------------------- /.github/workflows/docs_preview_clean.yaml: -------------------------------------------------------------------------------- ```yaml # Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. name: "docs" permissions: contents: write pull-requests: write # This Workflow depends on 'github.event.number', # not compatible with branch or manual triggers. on: pull_request: types: - closed jobs: clean: if: ${{ !github.event.pull_request.head.repo.fork }} runs-on: ubuntu-24.04 concurrency: # Shared concurrency group wih preview staging. group: "preview-${{ github.event.number }}" cancel-in-progress: true steps: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 with: ref: versioned-gh-pages - name: Remove Preview run: | rm -Rf ./previews/PR-${{ github.event.number }} git config user.name 'github-actions[bot]' git config user.email 'github-actions[bot]@users.noreply.github.com' git add -u previews/PR-${{ github.event.number }} git commit --message "cleanup: previews/PR-${{ github.event.number }}" git push - name: Comment uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 with: script: | github.rest.issues.createComment({ issue_number: context.payload.number, owner: context.repo.owner, repo: context.repo.repo, body: "🧨 Preview deployments removed." }) ``` -------------------------------------------------------------------------------- /docs/en/resources/authServices/google.md: -------------------------------------------------------------------------------- ```markdown --- title: "Google Sign-In" type: docs weight: 1 description: > Use Google Sign-In for Oauth 2.0 flow and token lifecycle. --- ## Getting Started Google Sign-In manages the OAuth 2.0 flow and token lifecycle. To integrate the Google Sign-In workflow to your web app [follow this guide][gsi-setup]. After setting up the Google Sign-In workflow, you should have registered your application and retrieved a [Client ID][client-id]. Configure your auth service in with the `Client ID`. [gsi-setup]: https://developers.google.com/identity/sign-in/web/sign-in [client-id]: https://developers.google.com/identity/sign-in/web/sign-in#create_authorization_credentials ## Behavior ### Authorized Invocations When using [Authorized Invocations][auth-invoke], a tool will be considered authorized if it has a valid Oauth 2.0 token that matches the Client ID. [auth-invoke]: ../tools/#authorized-invocations ### Authenticated Parameters When using [Authenticated Parameters][auth-params], any [claim provided by the id-token][provided-claims] can be used for the parameter. [auth-params]: ../tools/#authenticated-parameters [provided-claims]: https://developers.google.com/identity/openid-connect/openid-connect#obtaininguserprofileinformation ## Example ```yaml authServices: my-google-auth: kind: google clientId: ${YOUR_GOOGLE_CLIENT_ID} ``` {{< notice tip >}} Use environment variable replacement with the format ${ENV_NAME} instead of hardcoding your secrets into the configuration file. {{< /notice >}} ## Reference | **field** | **type** | **required** | **description** | |-----------|:--------:|:------------:|------------------------------------------------------------------| | kind | string | true | Must be "google". | | clientId | string | true | Client ID of your application from registering your application. | ``` -------------------------------------------------------------------------------- /docs/en/getting-started/quickstart/python/langchain/quickstart.py: -------------------------------------------------------------------------------- ```python import asyncio from langgraph.prebuilt import create_react_agent # TODO(developer): replace this with another import if needed from langchain_google_vertexai import ChatVertexAI # from langchain_google_genai import ChatGoogleGenerativeAI # from langchain_anthropic import ChatAnthropic from langgraph.checkpoint.memory import MemorySaver from toolbox_langchain import ToolboxClient prompt = """ You're a helpful hotel assistant. You handle hotel searching, booking and cancellations. When the user searches for a hotel, mention it's name, id, location and price tier. Always mention hotel ids while performing any searches. This is very important for any operations. For any bookings or cancellations, please provide the appropriate confirmation. Be sure to update checkin or checkout dates if mentioned by the user. Don't ask for confirmations from the user. """ queries = [ "Find hotels in Basel with Basel in its name.", "Can you book the Hilton Basel for me?", "Oh wait, this is too expensive. Please cancel it and book the Hyatt Regency instead.", "My check in dates would be from April 10, 2024 to April 19, 2024.", ] async def main(): # TODO(developer): replace this with another model if needed model = ChatVertexAI(model_name="gemini-2.0-flash-001") # model = ChatGoogleGenerativeAI(model="gemini-2.0-flash-001") # model = ChatAnthropic(model="claude-3-5-sonnet-20240620") # Load the tools from the Toolbox server async with ToolboxClient("http://127.0.0.1:5000") as client: tools = await client.aload_toolset() agent = create_react_agent(model, tools, checkpointer=MemorySaver()) config = {"configurable": {"thread_id": "thread-1"}} for query in queries: inputs = {"messages": [("user", prompt + query)]} response = agent.invoke(inputs, stream_mode="values", config=config) print(response["messages"][-1].content) asyncio.run(main()) ``` -------------------------------------------------------------------------------- /internal/tools/utility/wait/wait_test.go: -------------------------------------------------------------------------------- ```go // Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package wait_test import ( "testing" yaml "github.com/goccy/go-yaml" "github.com/google/go-cmp/cmp" "github.com/googleapis/genai-toolbox/internal/server" "github.com/googleapis/genai-toolbox/internal/testutils" wait "github.com/googleapis/genai-toolbox/internal/tools/utility/wait" ) func TestParseFromYamlWait(t *testing.T) { ctx, err := testutils.ContextWithNewLogger() if err != nil { t.Fatalf("unexpected error: %s", err) } tcs := []struct { desc string in string want server.ToolConfigs }{ { desc: "basic example", in: ` tools: example_tool: kind: wait description: some description timeout: 10s authRequired: - my-google-auth-service `, want: server.ToolConfigs{ "example_tool": wait.Config{ Name: "example_tool", Kind: "wait", Description: "some description", Timeout: "10s", AuthRequired: []string{"my-google-auth-service"}, }, }, }, } for _, tc := range tcs { t.Run(tc.desc, func(t *testing.T) { got := struct { Tools server.ToolConfigs `yaml:"tools"` }{} // Parse contents err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got) if err != nil { t.Fatalf("unable to unmarshal: %s", err) } if diff := cmp.Diff(tc.want, got.Tools); diff != "" { t.Fatalf("incorrect parse: diff %v", diff) } }) } } ``` -------------------------------------------------------------------------------- /internal/tools/cloudsql/cloudsqlcreateusers/cloudsqlcreateusers_test.go: -------------------------------------------------------------------------------- ```go // Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package cloudsqlcreateusers_test import ( "testing" "github.com/goccy/go-yaml" "github.com/google/go-cmp/cmp" "github.com/googleapis/genai-toolbox/internal/server" "github.com/googleapis/genai-toolbox/internal/testutils" "github.com/googleapis/genai-toolbox/internal/tools/cloudsql/cloudsqlcreateusers" ) func TestParseFromYaml(t *testing.T) { ctx, err := testutils.ContextWithNewLogger() if err != nil { t.Fatalf("unexpected error: %s", err) } tcs := []struct { desc string in string want server.ToolConfigs }{ { desc: "basic example", in: ` tools: create-user: kind: cloud-sql-create-users source: my-source description: some description `, want: server.ToolConfigs{ "create-user": cloudsqlcreateusers.Config{ Name: "create-user", Kind: "cloud-sql-create-users", Source: "my-source", Description: "some description", AuthRequired: []string{}, }, }, }, } for _, tc := range tcs { t.Run(tc.desc, func(t *testing.T) { got := struct { Tools server.ToolConfigs `yaml:"tools"` }{} // Parse contents err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got) if err != nil { t.Fatalf("unable to unmarshal: %s", err) } if diff := cmp.Diff(tc.want, got.Tools); diff != "" { t.Fatalf("incorrect parse: diff %v", diff) } }) } } ``` -------------------------------------------------------------------------------- /docs/en/resources/sources/neo4j.md: -------------------------------------------------------------------------------- ```markdown --- title: "Neo4j" type: docs weight: 1 description: > Neo4j is a powerful, open source graph database system --- ## About [Neo4j][neo4j-docs] is a powerful, open source graph database system with over 15 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance. [neo4j-docs]: https://neo4j.com/docs ## Available Tools - [`neo4j-cypher`](../tools/neo4j/neo4j-cypher.md) Run Cypher queries against your Neo4j graph database. ## Requirements ### Database User This source only uses standard authentication. You will need to [create a Neo4j user][neo4j-users] to log in to the database with, or use the default `neo4j` user if available. [neo4j-users]: https://neo4j.com/docs/operations-manual/current/authentication-authorization/manage-users/ ## Example ```yaml sources: my-neo4j-source: kind: neo4j uri: neo4j+s://xxxx.databases.neo4j.io:7687 user: ${USER_NAME} password: ${PASSWORD} database: "neo4j" ``` {{< notice tip >}} Use environment variable replacement with the format ${ENV_NAME} instead of hardcoding your secrets into the configuration file. {{< /notice >}} ## Reference | **field** | **type** | **required** | **description** | |-----------|:--------:|:------------:|----------------------------------------------------------------------| | kind | string | true | Must be "neo4j". | | uri | string | true | Connect URI ("bolt://localhost", "neo4j+s://xxx.databases.neo4j.io") | | user | string | true | Name of the Neo4j user to connect as (e.g. "neo4j"). | | password | string | true | Password of the Neo4j user (e.g. "my-password"). | | database | string | true | Name of the Neo4j database to connect to (e.g. "neo4j"). | ``` -------------------------------------------------------------------------------- /internal/tools/bigquery/bigqueryforecast/bigqueryforecast_test.go: -------------------------------------------------------------------------------- ```go // Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package bigqueryforecast_test import ( "testing" yaml "github.com/goccy/go-yaml" "github.com/google/go-cmp/cmp" "github.com/googleapis/genai-toolbox/internal/server" "github.com/googleapis/genai-toolbox/internal/testutils" "github.com/googleapis/genai-toolbox/internal/tools/bigquery/bigqueryforecast" ) func TestParseFromYamlBigQueryForecast(t *testing.T) { ctx, err := testutils.ContextWithNewLogger() if err != nil { t.Fatalf("unexpected error: %s", err) } tcs := []struct { desc string in string want server.ToolConfigs }{ { desc: "basic example", in: ` tools: example_tool: kind: bigquery-forecast source: my-instance description: some description `, want: server.ToolConfigs{ "example_tool": bigqueryforecast.Config{ Name: "example_tool", Kind: "bigquery-forecast", Source: "my-instance", Description: "some description", AuthRequired: []string{}, }, }, }, } for _, tc := range tcs { t.Run(tc.desc, func(t *testing.T) { got := struct { Tools server.ToolConfigs `yaml:"tools"` }{} // Parse contents err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got) if err != nil { t.Fatalf("unable to unmarshal: %s", err) } if diff := cmp.Diff(tc.want, got.Tools); diff != "" { t.Fatalf("incorrect parse: diff %v", diff) } }) } } ``` -------------------------------------------------------------------------------- /docs/en/resources/tools/mysql/mysql-list-tables-missing-unique-indexes.md: -------------------------------------------------------------------------------- ```markdown --- title: "mysql-list-tables-missing-unique-indexes" type: docs weight: 1 description: > A "mysql-list-tables-missing-unique-indexes" tool lists tables that do not have primary or unique indices in a MySQL instance. aliases: - /resources/tools/mysql-list-tables-missing-unique-indexes --- ## About A `mysql-list-tables-missing-unique-indexes` tool searches tables that do not have primary or unique indices in a MySQL database. It's compatible with: - [cloud-sql-mysql](../../sources/cloud-sql-mysql.md) - [mysql](../../sources/mysql.md) `mysql-list-tables-missing-unique-indexes` outputs table names, including `table_schema` and `table_name` in JSON format. It takes 2 optional input parameters: - `table_schema` (optional): Only check tables in this specific schema/database. Search all visible tables in all visible databases if not specified. - `limit` (optional): max number of queries to return, default `50`. ## Example ```yaml tools: list_tables_missing_unique_indexes: kind: mysql-list-tables-missing-unique-indexes source: my-mysql-instance description: Find tables that do not have primary or unique key constraint. A primary key or unique key is the only mechanism that guaranttes a row is unique. Without them, the database-level protection against data integrity issues will be missing. ``` The response is a json array with the following fields: ```json { "table_schema": "the schema/database this table belongs to", "table_name": "name of the table", } ``` ## Reference | **field** | **type** | **required** | **description** | |-------------|:--------:|:------------:|----------------------------------------------------| | kind | string | true | Must be "mysql-list-active-queries". | | source | string | true | Name of the source the SQL should execute on. | | description | string | true | Description of the tool that is passed to the LLM. | ``` -------------------------------------------------------------------------------- /internal/tools/bigquery/bigqueryexecutesql/bigqueryexecutesql_test.go: -------------------------------------------------------------------------------- ```go // Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package bigqueryexecutesql_test import ( "testing" yaml "github.com/goccy/go-yaml" "github.com/google/go-cmp/cmp" "github.com/googleapis/genai-toolbox/internal/server" "github.com/googleapis/genai-toolbox/internal/testutils" "github.com/googleapis/genai-toolbox/internal/tools/bigquery/bigqueryexecutesql" ) func TestParseFromYamlBigQueryExecuteSql(t *testing.T) { ctx, err := testutils.ContextWithNewLogger() if err != nil { t.Fatalf("unexpected error: %s", err) } tcs := []struct { desc string in string want server.ToolConfigs }{ { desc: "basic example", in: ` tools: example_tool: kind: bigquery-execute-sql source: my-instance description: some description `, want: server.ToolConfigs{ "example_tool": bigqueryexecutesql.Config{ Name: "example_tool", Kind: "bigquery-execute-sql", Source: "my-instance", Description: "some description", AuthRequired: []string{}, }, }, }, } for _, tc := range tcs { t.Run(tc.desc, func(t *testing.T) { got := struct { Tools server.ToolConfigs `yaml:"tools"` }{} // Parse contents err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got) if err != nil { t.Fatalf("unable to unmarshal: %s", err) } if diff := cmp.Diff(tc.want, got.Tools); diff != "" { t.Fatalf("incorrect parse: diff %v", diff) } }) } } ``` -------------------------------------------------------------------------------- /internal/tools/cloudsql/cloudsqlcreatedatabase/cloudsqlcreatedatabase_test.go: -------------------------------------------------------------------------------- ```go // Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package cloudsqlcreatedatabase_test import ( "testing" "github.com/goccy/go-yaml" "github.com/google/go-cmp/cmp" "github.com/googleapis/genai-toolbox/internal/server" "github.com/googleapis/genai-toolbox/internal/testutils" "github.com/googleapis/genai-toolbox/internal/tools/cloudsql/cloudsqlcreatedatabase" ) func TestParseFromYaml(t *testing.T) { ctx, err := testutils.ContextWithNewLogger() if err != nil { t.Fatalf("unexpected error: %s", err) } tcs := []struct { desc string in string want server.ToolConfigs }{ { desc: "basic example", in: ` tools: create-database: kind: cloud-sql-create-database source: my-source description: some description `, want: server.ToolConfigs{ "create-database": cloudsqlcreatedatabase.Config{ Name: "create-database", Kind: "cloud-sql-create-database", Source: "my-source", Description: "some description", AuthRequired: []string{}, }, }, }, } for _, tc := range tcs { t.Run(tc.desc, func(t *testing.T) { got := struct { Tools server.ToolConfigs `yaml:"tools"` }{} // Parse contents err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got) if err != nil { t.Fatalf("unable to unmarshal: %s", err) } if diff := cmp.Diff(tc.want, got.Tools); diff != "" { t.Fatalf("incorrect parse: diff %v", diff) } }) } } ``` -------------------------------------------------------------------------------- /internal/tools/cloudsql/cloudsqllistdatabases/cloudsqllistdatabases_test.go: -------------------------------------------------------------------------------- ```go // Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package cloudsqllistdatabases_test import ( "testing" "github.com/goccy/go-yaml" "github.com/google/go-cmp/cmp" "github.com/googleapis/genai-toolbox/internal/server" "github.com/googleapis/genai-toolbox/internal/testutils" "github.com/googleapis/genai-toolbox/internal/tools/cloudsql/cloudsqllistdatabases" ) func TestParseFromYaml(t *testing.T) { ctx, err := testutils.ContextWithNewLogger() if err != nil { t.Fatalf("unexpected error: %s", err) } tcs := []struct { desc string in string want server.ToolConfigs }{ { desc: "basic example", in: ` tools: list-my-databases: kind: cloud-sql-list-databases description: some description source: some-source `, want: server.ToolConfigs{ "list-my-databases": cloudsqllistdatabases.Config{ Name: "list-my-databases", Kind: "cloud-sql-list-databases", Description: "some description", AuthRequired: []string{}, Source: "some-source", }, }, }, } for _, tc := range tcs { t.Run(tc.desc, func(t *testing.T) { got := struct { Tools server.ToolConfigs `yaml:"tools"` }{} // Parse contents err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got) if err != nil { t.Fatalf("unable to unmarshal: %s", err) } if diff := cmp.Diff(tc.want, got.Tools); diff != "" { t.Fatalf("incorrect parse: diff %v", diff) } }) } } ``` -------------------------------------------------------------------------------- /internal/tools/bigquery/bigquerysearchcatalog/bigquerysearchcatalog_test.go: -------------------------------------------------------------------------------- ```go // Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package bigquerysearchcatalog_test import ( "testing" yaml "github.com/goccy/go-yaml" "github.com/google/go-cmp/cmp" "github.com/googleapis/genai-toolbox/internal/server" "github.com/googleapis/genai-toolbox/internal/testutils" "github.com/googleapis/genai-toolbox/internal/tools/bigquery/bigquerysearchcatalog" ) func TestParseFromYamlBigQuerySearch(t *testing.T) { ctx, err := testutils.ContextWithNewLogger() if err != nil { t.Fatalf("unexpected error: %s", err) } tcs := []struct { desc string in string want server.ToolConfigs }{ { desc: "basic example", in: ` tools: example_tool: kind: bigquery-search-catalog source: my-instance description: some description `, want: server.ToolConfigs{ "example_tool": bigquerysearchcatalog.Config{ Name: "example_tool", Kind: "bigquery-search-catalog", Source: "my-instance", Description: "some description", AuthRequired: []string{}, }, }, }, } for _, tc := range tcs { t.Run(tc.desc, func(t *testing.T) { got := struct { Tools server.ToolConfigs `yaml:"tools"` }{} // Parse contents err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got) if err != nil { t.Fatalf("unable to unmarshal: %s", err) } if diff := cmp.Diff(tc.want, got.Tools); diff != "" { t.Fatalf("incorrect parse: diff %v", diff) } }) } } ``` -------------------------------------------------------------------------------- /internal/tools/bigquery/bigquerygettableinfo/bigquerygettableinfo_test.go: -------------------------------------------------------------------------------- ```go // Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package bigquerygettableinfo_test import ( "testing" yaml "github.com/goccy/go-yaml" "github.com/google/go-cmp/cmp" "github.com/googleapis/genai-toolbox/internal/server" "github.com/googleapis/genai-toolbox/internal/testutils" "github.com/googleapis/genai-toolbox/internal/tools/bigquery/bigquerygettableinfo" ) func TestParseFromYamlBigQueryGetTableInfo(t *testing.T) { ctx, err := testutils.ContextWithNewLogger() if err != nil { t.Fatalf("unexpected error: %s", err) } tcs := []struct { desc string in string want server.ToolConfigs }{ { desc: "basic example", in: ` tools: example_tool: kind: bigquery-get-table-info source: my-instance description: some description `, want: server.ToolConfigs{ "example_tool": bigquerygettableinfo.Config{ Name: "example_tool", Kind: "bigquery-get-table-info", Source: "my-instance", Description: "some description", AuthRequired: []string{}, }, }, }, } for _, tc := range tcs { t.Run(tc.desc, func(t *testing.T) { got := struct { Tools server.ToolConfigs `yaml:"tools"` }{} // Parse contents err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got) if err != nil { t.Fatalf("unable to unmarshal: %s", err) } if diff := cmp.Diff(tc.want, got.Tools); diff != "" { t.Fatalf("incorrect parse: diff %v", diff) } }) } } ``` -------------------------------------------------------------------------------- /internal/tools/bigquery/bigquerylisttableids/bigquerylisttableids_test.go: -------------------------------------------------------------------------------- ```go // Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package bigquerylisttableids_test import ( "testing" yaml "github.com/goccy/go-yaml" "github.com/google/go-cmp/cmp" "github.com/googleapis/genai-toolbox/internal/server" "github.com/googleapis/genai-toolbox/internal/testutils" "github.com/googleapis/genai-toolbox/internal/tools/bigquery/bigquerylisttableids" ) func TestParseFromYamlBigQueryListTableIds(t *testing.T) { ctx, err := testutils.ContextWithNewLogger() if err != nil { t.Fatalf("unexpected error: %s", err) } tcs := []struct { desc string in string want server.ToolConfigs }{ { desc: "basic example", in: ` tools: example_tool: kind: bigquery-list-table-ids source: my-instance description: some description `, want: server.ToolConfigs{ "example_tool": bigquerylisttableids.Config{ Name: "example_tool", Kind: "bigquery-list-table-ids", Source: "my-instance", Description: "some description", AuthRequired: []string{}, }, }, }, } for _, tc := range tcs { t.Run(tc.desc, func(t *testing.T) { got := struct { Tools server.ToolConfigs `yaml:"tools"` }{} // Parse contents err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got) if err != nil { t.Fatalf("unable to unmarshal: %s", err) } if diff := cmp.Diff(tc.want, got.Tools); diff != "" { t.Fatalf("incorrect parse: diff %v", diff) } }) } } ``` -------------------------------------------------------------------------------- /internal/tools/dataplex/dataplexsearchentries/dataplexsearchentries_test.go: -------------------------------------------------------------------------------- ```go // Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package dataplexsearchentries_test import ( "testing" yaml "github.com/goccy/go-yaml" "github.com/google/go-cmp/cmp" "github.com/googleapis/genai-toolbox/internal/server" "github.com/googleapis/genai-toolbox/internal/testutils" "github.com/googleapis/genai-toolbox/internal/tools/dataplex/dataplexsearchentries" ) func TestParseFromYamlDataplexSearchEntries(t *testing.T) { ctx, err := testutils.ContextWithNewLogger() if err != nil { t.Fatalf("unexpected error: %s", err) } tcs := []struct { desc string in string want server.ToolConfigs }{ { desc: "basic example", in: ` tools: example_tool: kind: dataplex-search-entries source: my-instance description: some description `, want: server.ToolConfigs{ "example_tool": dataplexsearchentries.Config{ Name: "example_tool", Kind: "dataplex-search-entries", Source: "my-instance", Description: "some description", AuthRequired: []string{}, }, }, }, } for _, tc := range tcs { t.Run(tc.desc, func(t *testing.T) { got := struct { Tools server.ToolConfigs `yaml:"tools"` }{} // Parse contents err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got) if err != nil { t.Fatalf("unable to unmarshal: %s", err) } if diff := cmp.Diff(tc.want, got.Tools); diff != "" { t.Fatalf("incorrect parse: diff %v", diff) } }) } } ``` -------------------------------------------------------------------------------- /docs/en/resources/tools/looker/looker-make-dashboard.md: -------------------------------------------------------------------------------- ```markdown --- title: "looker-make-dashboard" type: docs weight: 1 description: > "looker-make-dashboard" generates a Looker dashboard in the users personal folder in Looker aliases: - /resources/tools/looker-make-dashboard --- ## About The `looker-make-dashboard` creates a dashboard in the user's Looker personal folder. It's compatible with the following sources: - [looker](../../sources/looker.md) `looker-make-dashboard` takes one parameter: 1. the `title` ## Example ```yaml tools: make_dashboard: kind: looker-make-dashboard source: looker-source description: | make_dashboard Tool This tool creates a new dashboard in Looker. The dashboard is initially empty and the add_dashboard_element tool is used to add content to the dashboard. The newly created dashboard will be created in the user's personal folder in looker. The dashboard name must be unique. The result is a json document with a link to the newly created dashboard and the id of the dashboard. Use the id when calling add_dashboard_element. ``` ## Reference | **field** | **type** | **required** | **description** | |-------------|:------------------------------------------:|:------------:|--------------------------------------------------------------------------------------------------| | kind | string | true | Must be "looker-make-dashboard" | | source | string | true | Name of the source the SQL should execute on. | | description | string | true | Description of the tool that is passed to the LLM. | ``` -------------------------------------------------------------------------------- /internal/tools/bigquery/bigquerygetdatasetinfo/bigquerygetdatasetinfo_test.go: -------------------------------------------------------------------------------- ```go // Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package bigquerygetdatasetinfo_test import ( "testing" yaml "github.com/goccy/go-yaml" "github.com/google/go-cmp/cmp" "github.com/googleapis/genai-toolbox/internal/server" "github.com/googleapis/genai-toolbox/internal/testutils" "github.com/googleapis/genai-toolbox/internal/tools/bigquery/bigquerygetdatasetinfo" ) func TestParseFromYamlBigQueryGetDatasetInfo(t *testing.T) { ctx, err := testutils.ContextWithNewLogger() if err != nil { t.Fatalf("unexpected error: %s", err) } tcs := []struct { desc string in string want server.ToolConfigs }{ { desc: "basic example", in: ` tools: example_tool: kind: bigquery-get-dataset-info source: my-instance description: some description `, want: server.ToolConfigs{ "example_tool": bigquerygetdatasetinfo.Config{ Name: "example_tool", Kind: "bigquery-get-dataset-info", Source: "my-instance", Description: "some description", AuthRequired: []string{}, }, }, }, } for _, tc := range tcs { t.Run(tc.desc, func(t *testing.T) { got := struct { Tools server.ToolConfigs `yaml:"tools"` }{} // Parse contents err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got) if err != nil { t.Fatalf("unable to unmarshal: %s", err) } if diff := cmp.Diff(tc.want, got.Tools); diff != "" { t.Fatalf("incorrect parse: diff %v", diff) } }) } } ``` -------------------------------------------------------------------------------- /internal/tools/bigquery/bigquerylistdatasetids/bigquerylistdatasetids_test.go: -------------------------------------------------------------------------------- ```go // Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package bigquerylistdatasetids_test import ( "testing" yaml "github.com/goccy/go-yaml" "github.com/google/go-cmp/cmp" "github.com/googleapis/genai-toolbox/internal/server" "github.com/googleapis/genai-toolbox/internal/testutils" "github.com/googleapis/genai-toolbox/internal/tools/bigquery/bigquerylistdatasetids" ) func TestParseFromYamlBigQueryListDatasetIds(t *testing.T) { ctx, err := testutils.ContextWithNewLogger() if err != nil { t.Fatalf("unexpected error: %s", err) } tcs := []struct { desc string in string want server.ToolConfigs }{ { desc: "basic example", in: ` tools: example_tool: kind: bigquery-list-dataset-ids source: my-instance description: some description `, want: server.ToolConfigs{ "example_tool": bigquerylistdatasetids.Config{ Name: "example_tool", Kind: "bigquery-list-dataset-ids", Source: "my-instance", Description: "some description", AuthRequired: []string{}, }, }, }, } for _, tc := range tcs { t.Run(tc.desc, func(t *testing.T) { got := struct { Tools server.ToolConfigs `yaml:"tools"` }{} // Parse contents err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got) if err != nil { t.Fatalf("unable to unmarshal: %s", err) } if diff := cmp.Diff(tc.want, got.Tools); diff != "" { t.Fatalf("incorrect parse: diff %v", diff) } }) } } ``` -------------------------------------------------------------------------------- /internal/tools/dataplex/dataplexsearchaspecttypes/dataplexsearchaspecttypes_test.go: -------------------------------------------------------------------------------- ```go // Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package dataplexsearchaspecttypes_test import ( "testing" yaml "github.com/goccy/go-yaml" "github.com/google/go-cmp/cmp" "github.com/googleapis/genai-toolbox/internal/server" "github.com/googleapis/genai-toolbox/internal/testutils" "github.com/googleapis/genai-toolbox/internal/tools/dataplex/dataplexsearchaspecttypes" ) func TestParseFromYamlDataplexSearchAspectTypes(t *testing.T) { ctx, err := testutils.ContextWithNewLogger() if err != nil { t.Fatalf("unexpected error: %s", err) } tcs := []struct { desc string in string want server.ToolConfigs }{ { desc: "basic example", in: ` tools: example_tool: kind: dataplex-search-aspect-types source: my-instance description: some description `, want: server.ToolConfigs{ "example_tool": dataplexsearchaspecttypes.Config{ Name: "example_tool", Kind: "dataplex-search-aspect-types", Source: "my-instance", Description: "some description", AuthRequired: []string{}, }, }, }, } for _, tc := range tcs { t.Run(tc.desc, func(t *testing.T) { got := struct { Tools server.ToolConfigs `yaml:"tools"` }{} // Parse contents err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got) if err != nil { t.Fatalf("unable to unmarshal: %s", err) } if diff := cmp.Diff(tc.want, got.Tools); diff != "" { t.Fatalf("incorrect parse: diff %v", diff) } }) } } ``` -------------------------------------------------------------------------------- /internal/tools/bigquery/bigqueryanalyzecontribution/bigqueryanalyzecontribution_test.go: -------------------------------------------------------------------------------- ```go // Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package bigqueryanalyzecontribution_test import ( "testing" yaml "github.com/goccy/go-yaml" "github.com/google/go-cmp/cmp" "github.com/googleapis/genai-toolbox/internal/server" "github.com/googleapis/genai-toolbox/internal/testutils" "github.com/googleapis/genai-toolbox/internal/tools/bigquery/bigqueryanalyzecontribution" ) func TestParseFromYamlBigQueryAnalyzeContribution(t *testing.T) { ctx, err := testutils.ContextWithNewLogger() if err != nil { t.Fatalf("unexpected error: %s", err) } tcs := []struct { desc string in string want server.ToolConfigs }{ { desc: "basic example", in: ` tools: example_tool: kind: bigquery-analyze-contribution source: my-instance description: some description `, want: server.ToolConfigs{ "example_tool": bigqueryanalyzecontribution.Config{ Name: "example_tool", Kind: "bigquery-analyze-contribution", Source: "my-instance", Description: "some description", AuthRequired: []string{}, }, }, }, } for _, tc := range tcs { t.Run(tc.desc, func(t *testing.T) { got := struct { Tools server.ToolConfigs `yaml:"tools"` }{} // Parse contents err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got) if err != nil { t.Fatalf("unable to unmarshal: %s", err) } if diff := cmp.Diff(tc.want, got.Tools); diff != "" { t.Fatalf("incorrect parse: diff %v", diff) } }) } } ``` -------------------------------------------------------------------------------- /internal/tools/cloudsqlpg/cloudsqlpgcreateinstances/cloudsqlpgcreateinstances_test.go: -------------------------------------------------------------------------------- ```go // Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package cloudsqlpgcreateinstances_test import ( "testing" yaml "github.com/goccy/go-yaml" "github.com/google/go-cmp/cmp" "github.com/googleapis/genai-toolbox/internal/server" "github.com/googleapis/genai-toolbox/internal/testutils" "github.com/googleapis/genai-toolbox/internal/tools/cloudsqlpg/cloudsqlpgcreateinstances" ) func TestParseFromYaml(t *testing.T) { ctx, err := testutils.ContextWithNewLogger() if err != nil { t.Fatalf("unexpected error: %s", err) } tcs := []struct { desc string in string want server.ToolConfigs }{ { desc: "basic example", in: ` tools: create-instance-tool: kind: cloud-sql-postgres-create-instance description: a test description source: a-source `, want: server.ToolConfigs{ "create-instance-tool": cloudsqlpgcreateinstances.Config{ Name: "create-instance-tool", Kind: "cloud-sql-postgres-create-instance", Description: "a test description", Source: "a-source", AuthRequired: []string{}, }, }, }, } for _, tc := range tcs { t.Run(tc.desc, func(t *testing.T) { got := struct { Tools server.ToolConfigs `yaml:"tools"` }{} // Parse contents err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got) if err != nil { t.Fatalf("unable to unmarshal: %s", err) } if diff := cmp.Diff(tc.want, got.Tools); diff != "" { t.Fatalf("incorrect parse: diff %v", diff) } }) } } ``` -------------------------------------------------------------------------------- /internal/tools/cloudsql/cloudsqlgetinstances/cloudsqlgetinstances_test.go: -------------------------------------------------------------------------------- ```go // Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package cloudsqlgetinstances_test import ( "testing" yaml "github.com/goccy/go-yaml" "github.com/google/go-cmp/cmp" "github.com/googleapis/genai-toolbox/internal/server" "github.com/googleapis/genai-toolbox/internal/testutils" cloudsqlgetinstances "github.com/googleapis/genai-toolbox/internal/tools/cloudsql/cloudsqlgetinstances" ) func TestParseFromYaml(t *testing.T) { ctx, err := testutils.ContextWithNewLogger() if err != nil { t.Fatalf("unexpected error: %s", err) } tcs := []struct { desc string in string want server.ToolConfigs }{ { desc: "basic example", in: ` tools: get-instances: kind: cloud-sql-get-instance description: "A tool to get cloud sql instances" source: "my-gcp-source" `, want: server.ToolConfigs{ "get-instances": cloudsqlgetinstances.Config{ Name: "get-instances", Kind: "cloud-sql-get-instance", Description: "A tool to get cloud sql instances", Source: "my-gcp-source", AuthRequired: []string{}, }, }, }, } for _, tc := range tcs { t.Run(tc.desc, func(t *testing.T) { got := struct { Tools server.ToolConfigs `yaml:"tools"` }{} // Parse contents err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got) if err != nil { t.Fatalf("unable to unmarshal: %s", err) } if diff := cmp.Diff(tc.want, got.Tools); diff != "" { t.Fatalf("incorrect parse: diff %v", diff) } }) } } ``` -------------------------------------------------------------------------------- /internal/tools/cloudsqlmssql/cloudsqlmssqlcreateinstance/cloudsqlmssqlcreateinstance_test.go: -------------------------------------------------------------------------------- ```go // Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package cloudsqlmssqlcreateinstance_test import ( "testing" yaml "github.com/goccy/go-yaml" "github.com/google/go-cmp/cmp" "github.com/googleapis/genai-toolbox/internal/server" "github.com/googleapis/genai-toolbox/internal/testutils" "github.com/googleapis/genai-toolbox/internal/tools/cloudsqlmssql/cloudsqlmssqlcreateinstance" ) func TestParseFromYaml(t *testing.T) { ctx, err := testutils.ContextWithNewLogger() if err != nil { t.Fatalf("unexpected error: %s", err) } tcs := []struct { desc string in string want server.ToolConfigs }{ { desc: "basic example", in: ` tools: create-instance-tool: kind: cloud-sql-mssql-create-instance description: a test description source: a-source `, want: server.ToolConfigs{ "create-instance-tool": cloudsqlmssqlcreateinstance.Config{ Name: "create-instance-tool", Kind: "cloud-sql-mssql-create-instance", Description: "a test description", Source: "a-source", AuthRequired: []string{}, }, }, }, } for _, tc := range tcs { t.Run(tc.desc, func(t *testing.T) { got := struct { Tools server.ToolConfigs `yaml:"tools"` }{} // Parse contents err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got) if err != nil { t.Fatalf("unable to unmarshal: %s", err) } if diff := cmp.Diff(tc.want, got.Tools); diff != "" { t.Fatalf("incorrect parse: diff %v", diff) } }) } } ``` -------------------------------------------------------------------------------- /internal/tools/cloudsqlmysql/cloudsqlmysqlcreateinstance/cloudsqlmysqlcreateinstance_test.go: -------------------------------------------------------------------------------- ```go // Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package cloudsqlmysqlcreateinstance_test import ( "testing" yaml "github.com/goccy/go-yaml" "github.com/google/go-cmp/cmp" "github.com/googleapis/genai-toolbox/internal/server" "github.com/googleapis/genai-toolbox/internal/testutils" "github.com/googleapis/genai-toolbox/internal/tools/cloudsqlmysql/cloudsqlmysqlcreateinstance" ) func TestParseFromYaml(t *testing.T) { ctx, err := testutils.ContextWithNewLogger() if err != nil { t.Fatalf("unexpected error: %s", err) } tcs := []struct { desc string in string want server.ToolConfigs }{ { desc: "basic example", in: ` tools: create-instance-tool: kind: cloud-sql-mysql-create-instance description: a test description source: a-source `, want: server.ToolConfigs{ "create-instance-tool": cloudsqlmysqlcreateinstance.Config{ Name: "create-instance-tool", Kind: "cloud-sql-mysql-create-instance", Description: "a test description", Source: "a-source", AuthRequired: []string{}, }, }, }, } for _, tc := range tcs { t.Run(tc.desc, func(t *testing.T) { got := struct { Tools server.ToolConfigs `yaml:"tools"` }{} // Parse contents err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got) if err != nil { t.Fatalf("unable to unmarshal: %s", err) } if diff := cmp.Diff(tc.want, got.Tools); diff != "" { t.Fatalf("incorrect parse: diff %v", diff) } }) } } ``` -------------------------------------------------------------------------------- /internal/tools/looker/lookerconversationalanalytics/lookerconversationalanalytics_test.go: -------------------------------------------------------------------------------- ```go // Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package lookerconversationalanalytics_test import ( "testing" yaml "github.com/goccy/go-yaml" "github.com/google/go-cmp/cmp" "github.com/googleapis/genai-toolbox/internal/server" "github.com/googleapis/genai-toolbox/internal/testutils" "github.com/googleapis/genai-toolbox/internal/tools/looker/lookerconversationalanalytics" ) func TestParseFromYamlLookerConversationalAnalytics(t *testing.T) { ctx, err := testutils.ContextWithNewLogger() if err != nil { t.Fatalf("unexpected error: %s", err) } tcs := []struct { desc string in string want server.ToolConfigs }{ { desc: "basic example", in: ` tools: example_tool: kind: looker-conversational-analytics source: my-instance description: some description `, want: server.ToolConfigs{ "example_tool": lookerconversationalanalytics.Config{ Name: "example_tool", Kind: "looker-conversational-analytics", Source: "my-instance", Description: "some description", AuthRequired: []string{}, }, }, }, } for _, tc := range tcs { t.Run(tc.desc, func(t *testing.T) { got := struct { Tools server.ToolConfigs `yaml:"tools"` }{} // Parse contents err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got) if err != nil { t.Fatalf("unable to unmarshal: %s", err) } if diff := cmp.Diff(tc.want, got.Tools); diff != "" { t.Fatalf("incorrect parse: diff %v", diff) } }) } } ``` -------------------------------------------------------------------------------- /docs/en/resources/tools/looker/looker-get-measures.md: -------------------------------------------------------------------------------- ```markdown --- title: "looker-get-measures" type: docs weight: 1 description: > A "looker-get-measures" tool returns all the measures from a given explore in a given model in the source. aliases: - /resources/tools/looker-get-measures --- ## About A `looker-get-measures` tool returns all the measures from a given explore in a given model in the source. It's compatible with the following sources: - [looker](../../sources/looker.md) `looker-get-measures` accepts two parameters, the `model` and the `explore`. ## Example ```yaml tools: get_measures: kind: looker-get-measures source: looker-source description: | The get_measures tool retrieves the list of measures defined in an explore. It takes two parameters, the model_name looked up from get_models and the explore_name looked up from get_explores. If this returns a suggestions field for a measure, the contents of suggestions can be used as filters for this field. If this returns a suggest_explore and suggest_dimension, a query against that explore and dimension can be used to find valid filters for this field. ``` The response is a json array with the following elements: ```json { "name": "field name", "description": "field description", "type": "field type", "label": "field label", "label_short": "field short label", "tags": ["tags", ...], "synonyms": ["synonyms", ...], "suggestions": ["suggestion", ...], "suggest_explore": "explore", "suggest_dimension": "dimension" } ``` ## Reference | **field** | **type** | **required** | **description** | |-------------|:--------:|:------------:|----------------------------------------------------| | kind | string | true | Must be "looker-get-measures". | | source | string | true | Name of the source the SQL should execute on. | | description | string | true | Description of the tool that is passed to the LLM. | ``` -------------------------------------------------------------------------------- /internal/tools/bigquery/bigqueryconversationalanalytics/bigqueryconversationalanalytics_test.go: -------------------------------------------------------------------------------- ```go // Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package bigqueryconversationalanalytics_test import ( "testing" yaml "github.com/goccy/go-yaml" "github.com/google/go-cmp/cmp" "github.com/googleapis/genai-toolbox/internal/server" "github.com/googleapis/genai-toolbox/internal/testutils" "github.com/googleapis/genai-toolbox/internal/tools/bigquery/bigqueryconversationalanalytics" ) func TestParseFromYamlBigQueryConversationalAnalytics(t *testing.T) { ctx, err := testutils.ContextWithNewLogger() if err != nil { t.Fatalf("unexpected error: %s", err) } tcs := []struct { desc string in string want server.ToolConfigs }{ { desc: "basic example", in: ` tools: example_tool: kind: bigquery-conversational-analytics source: my-instance description: some description `, want: server.ToolConfigs{ "example_tool": bigqueryconversationalanalytics.Config{ Name: "example_tool", Kind: "bigquery-conversational-analytics", Source: "my-instance", Description: "some description", AuthRequired: []string{}, }, }, }, } for _, tc := range tcs { t.Run(tc.desc, func(t *testing.T) { got := struct { Tools server.ToolConfigs `yaml:"tools"` }{} // Parse contents err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got) if err != nil { t.Fatalf("unable to unmarshal: %s", err) } if diff := cmp.Diff(tc.want, got.Tools); diff != "" { t.Fatalf("incorrect parse: diff %v", diff) } }) } } ``` -------------------------------------------------------------------------------- /docs/en/resources/tools/bigquery/bigquery-list-dataset-ids.md: -------------------------------------------------------------------------------- ```markdown --- title: "bigquery-list-dataset-ids" type: docs weight: 1 description: > A "bigquery-list-dataset-ids" tool returns all dataset IDs from the source. aliases: - /resources/tools/bigquery-list-dataset-ids --- ## About A `bigquery-list-dataset-ids` tool returns all dataset IDs from the source. It's compatible with the following sources: - [bigquery](../../sources/bigquery.md) `bigquery-list-dataset-ids` accepts the following parameter: - **`project`** (optional): Defines the Google Cloud project ID. If not provided, the tool defaults to the project from the source configuration. The tool's behavior regarding this parameter is influenced by the `allowedDatasets` restriction on the `bigquery` source: - **Without `allowedDatasets` restriction:** The tool can list datasets from any project specified by the `project` parameter. - **With `allowedDatasets` restriction:** The tool directly returns the pre-configured list of dataset IDs from the source, and the `project` parameter is ignored. ## Example ```yaml tools: bigquery_list_dataset_ids: kind: bigquery-list-dataset-ids source: my-bigquery-source description: Use this tool to get dataset metadata. ``` ## Reference | **field** | **type** | **required** | **description** | |-------------|:------------------------------------------:|:------------:|--------------------------------------------------------------------------------------------------| | kind | string | true | Must be "bigquery-list-dataset-ids". | | source | string | true | Name of the source the SQL should execute on. | | description | string | true | Description of the tool that is passed to the LLM. | ``` -------------------------------------------------------------------------------- /internal/tools/tidb/tidbexecutesql/tidbexecutesql_test.go: -------------------------------------------------------------------------------- ```go // Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package tidbexecutesql_test import ( "testing" yaml "github.com/goccy/go-yaml" "github.com/google/go-cmp/cmp" "github.com/googleapis/genai-toolbox/internal/server" "github.com/googleapis/genai-toolbox/internal/testutils" "github.com/googleapis/genai-toolbox/internal/tools/tidb/tidbexecutesql" ) func TestParseFromYamlExecuteSql(t *testing.T) { ctx, err := testutils.ContextWithNewLogger() if err != nil { t.Fatalf("unexpected error: %s", err) } tcs := []struct { desc string in string want server.ToolConfigs }{ { desc: "basic example", in: ` tools: example_tool: kind: tidb-execute-sql source: my-instance description: some description authRequired: - my-google-auth-service - other-auth-service `, want: server.ToolConfigs{ "example_tool": tidbexecutesql.Config{ Name: "example_tool", Kind: "tidb-execute-sql", Source: "my-instance", Description: "some description", AuthRequired: []string{"my-google-auth-service", "other-auth-service"}, }, }, }, } for _, tc := range tcs { t.Run(tc.desc, func(t *testing.T) { got := struct { Tools server.ToolConfigs `yaml:"tools"` }{} // Parse contents err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got) if err != nil { t.Fatalf("unable to unmarshal: %s", err) } if diff := cmp.Diff(tc.want, got.Tools); diff != "" { t.Fatalf("incorrect parse: diff %v", diff) } }) } } ``` -------------------------------------------------------------------------------- /internal/tools/mssql/mssqlexecutesql/mssqlexecutesql_test.go: -------------------------------------------------------------------------------- ```go // Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package mssqlexecutesql_test import ( "testing" yaml "github.com/goccy/go-yaml" "github.com/google/go-cmp/cmp" "github.com/googleapis/genai-toolbox/internal/server" "github.com/googleapis/genai-toolbox/internal/testutils" "github.com/googleapis/genai-toolbox/internal/tools/mssql/mssqlexecutesql" ) func TestParseFromYamlExecuteSql(t *testing.T) { ctx, err := testutils.ContextWithNewLogger() if err != nil { t.Fatalf("unexpected error: %s", err) } tcs := []struct { desc string in string want server.ToolConfigs }{ { desc: "basic example", in: ` tools: example_tool: kind: mssql-execute-sql source: my-instance description: some description authRequired: - my-google-auth-service - other-auth-service `, want: server.ToolConfigs{ "example_tool": mssqlexecutesql.Config{ Name: "example_tool", Kind: "mssql-execute-sql", Source: "my-instance", Description: "some description", AuthRequired: []string{"my-google-auth-service", "other-auth-service"}, }, }, }, } for _, tc := range tcs { t.Run(tc.desc, func(t *testing.T) { got := struct { Tools server.ToolConfigs `yaml:"tools"` }{} // Parse contents err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got) if err != nil { t.Fatalf("unable to unmarshal: %s", err) } if diff := cmp.Diff(tc.want, got.Tools); diff != "" { t.Fatalf("incorrect parse: diff %v", diff) } }) } } ``` -------------------------------------------------------------------------------- /internal/tools/mysql/mysqlexecutesql/mysqlexecutesql_test.go: -------------------------------------------------------------------------------- ```go // Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package mysqlexecutesql_test import ( "testing" yaml "github.com/goccy/go-yaml" "github.com/google/go-cmp/cmp" "github.com/googleapis/genai-toolbox/internal/server" "github.com/googleapis/genai-toolbox/internal/testutils" "github.com/googleapis/genai-toolbox/internal/tools/mysql/mysqlexecutesql" ) func TestParseFromYamlExecuteSql(t *testing.T) { ctx, err := testutils.ContextWithNewLogger() if err != nil { t.Fatalf("unexpected error: %s", err) } tcs := []struct { desc string in string want server.ToolConfigs }{ { desc: "basic example", in: ` tools: example_tool: kind: mysql-execute-sql source: my-instance description: some description authRequired: - my-google-auth-service - other-auth-service `, want: server.ToolConfigs{ "example_tool": mysqlexecutesql.Config{ Name: "example_tool", Kind: "mysql-execute-sql", Source: "my-instance", Description: "some description", AuthRequired: []string{"my-google-auth-service", "other-auth-service"}, }, }, }, } for _, tc := range tcs { t.Run(tc.desc, func(t *testing.T) { got := struct { Tools server.ToolConfigs `yaml:"tools"` }{} // Parse contents err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got) if err != nil { t.Fatalf("unable to unmarshal: %s", err) } if diff := cmp.Diff(tc.want, got.Tools); diff != "" { t.Fatalf("incorrect parse: diff %v", diff) } }) } } ``` -------------------------------------------------------------------------------- /docs/en/resources/tools/postgres/postgres-list-available-extensions.md: -------------------------------------------------------------------------------- ```markdown --- title: "postgres-list-available-extensions" type: docs weight: 1 description: > The "postgres-list-available-extensions" tool retrieves all PostgreSQL extensions available for installation on a Postgres database. aliases: - /resources/tools/postgres-list-available-extensions --- ## About The `postgres-list-available-extensions` tool retrieves all PostgreSQL extensions available for installation on a Postgres database. It's compatible with any of the following sources: - [alloydb-postgres](../../sources/alloydb-pg.md) - [cloud-sql-postgres](../../sources/cloud-sql-pg.md) - [postgres](../../sources/postgres.md) `postgres-list-available-extensions` lists all PostgreSQL extensions available for installation (extension name, default version description) as JSON. The does not support any input parameter. ## Example ```yaml tools: list_available_extensions: kind: postgres-list-available-extensions source: postgres-source description: Discover all PostgreSQL extensions available for installation on this server, returning name, default_version, and description. ``` ## Reference | **name** | **default_version** | **description** | |----------------------|---------------------|---------------------------------------------------------------------------------------------------------------------| | address_standardizer | 3.5.2 | Used to parse an address into constituent elements. Generally used to support geocoding address normalization step. | | amcheck | 1.4 | functions for verifying relation integrity | | anon | 1.0.0 | Data anonymization tools | | autoinc | 1.0 | functions for autoincrementing fields | ``` -------------------------------------------------------------------------------- /.ci/test_with_coverage.sh: -------------------------------------------------------------------------------- ```bash #!/bin/bash # Arguments: # $1: Display name for logs (e.g., "Cloud SQL Postgres") # $2: Integration test's package name (e.g., cloudsqlpg) # $3, $4, ...: Tool package names for grep (e.g., postgressql), if the # integration test specifically check a separate package inside a folder, please # specify the full path instead (e.g., postgressql/postgresexecutesql) DISPLAY_NAME="$1" SOURCE_PACKAGE_NAME="$2" # Construct the test binary name TEST_BINARY="${SOURCE_PACKAGE_NAME}.test" # Construct the full source path SOURCE_PATH="sources/${SOURCE_PACKAGE_NAME}/" # Shift arguments so that $3 and onwards become the list of tool package names shift 2 TOOL_PACKAGE_NAMES=("$@") COVERAGE_FILE="${TEST_BINARY%.test}_coverage.out" FILTERED_COVERAGE_FILE="${TEST_BINARY%.test}_filtered_coverage.out" export path="github.com/googleapis/genai-toolbox/internal/" GREP_PATTERN="^mode:|${path}${SOURCE_PATH}" # Add each tool package path to the grep pattern for tool_name in "${TOOL_PACKAGE_NAMES[@]}"; do if [ -n "$tool_name" ]; then full_tool_path="tools/${tool_name}/" GREP_PATTERN="${GREP_PATTERN}|${path}${full_tool_path}" fi done # Run integration test if ! ./"${TEST_BINARY}" -test.v -test.coverprofile="${COVERAGE_FILE}"; then echo "Error: Tests for ${DISPLAY_NAME} failed. Exiting." exit 1 fi # Filter source/tool packages if ! grep -E "${GREP_PATTERN}" "${COVERAGE_FILE}" > "${FILTERED_COVERAGE_FILE}"; then echo "Warning: Could not filter coverage for ${DISPLAY_NAME}. Filtered file might be empty or invalid." fi # Calculate coverage echo "Calculating coverage for ${DISPLAY_NAME}..." total_coverage=$(go tool cover -func="${FILTERED_COVERAGE_FILE}" 2>/dev/null | grep "total:" | awk '{print $3}') echo "${DISPLAY_NAME} total coverage: $total_coverage" coverage_numeric=$(echo "$total_coverage" | sed 's/%//') # Check coverage threshold if awk -v coverage="$coverage_numeric" 'BEGIN {exit !(coverage < 50)}'; then echo "Coverage failure: ${DISPLAY_NAME} total coverage($total_coverage) is below 50%." exit 1 else echo "Coverage for ${DISPLAY_NAME} is sufficient." fi ``` -------------------------------------------------------------------------------- /docs/en/resources/tools/looker/looker-health-vacuum.md: -------------------------------------------------------------------------------- ```markdown --- title: "looker-health-vacuum" type: docs weight: 1 description: > "looker-health-vacuum" provides a set of commands to audit and identify unused LookML objects in a Looker instance. aliases: - /resources/tools/looker-health-vacuum --- ## About The `looker-health-vacuum` tool helps you identify unused LookML objects such as models, explores, joins, and fields. The `action` parameter selects the type of vacuum to perform: - `models`: Identifies unused explores within a model. - `explores`: Identifies unused joins and fields within an explore. ## Parameters | **field** | **type** | **required** | **description** | | :--- | :--- | :--- | :--- | | kind | string | true | Must be "looker-health-vacuum" | | source | string | true | Looker source name | | action | string | true | The vacuum to perform: `models`, or `explores`. | | project | string | false | The name of the Looker project to vacuum. | | model | string | false | The name of the Looker model to vacuum. | | explore | string | false | The name of the Looker explore to vacuum. | | timeframe | int | false | The timeframe in days to analyze for usage. Defaults to 90. | | min_queries | int | false | The minimum number of queries for an object to be considered used. Defaults to 1. | ## Example Identify unnused fields (*in this case, less than 1 query in the last 20 days*) and joins in the `order_items` explore and `thelook` model ```yaml tools: vacuum-tool: kind: looker-health-vacuum source: looker-source description: | Vacuums the Looker instance by identifying unused explores, fields, and joins. parameters: action: explores project: "thelook_core" model: "thelook" explore: "order_items" timeframe: 20 min_queries: 1 ``` Identify unnused explores across all models in `thelook_core` project. ```yaml tools: vacuum-tool: kind: looker-health-vacuum source: looker-source description: | Vacuums the Looker instance by identifying unused explores, fields, and joins. parameters: action: models project: "thelook_core" ``` -------------------------------------------------------------------------------- /internal/tools/trino/trinoexecutesql/trinoexecutesql_test.go: -------------------------------------------------------------------------------- ```go // Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package trinoexecutesql_test import ( "testing" yaml "github.com/goccy/go-yaml" "github.com/google/go-cmp/cmp" "github.com/googleapis/genai-toolbox/internal/server" "github.com/googleapis/genai-toolbox/internal/testutils" "github.com/googleapis/genai-toolbox/internal/tools/trino/trinoexecutesql" ) func TestParseFromYamlTrinoExecuteSQL(t *testing.T) { ctx, err := testutils.ContextWithNewLogger() if err != nil { t.Fatalf("unexpected error: %s", err) } tcs := []struct { desc string in string want server.ToolConfigs }{ { desc: "basic example", in: ` tools: example_tool: kind: trino-execute-sql source: my-trino-instance description: some description authRequired: - my-google-auth-service - other-auth-service `, want: server.ToolConfigs{ "example_tool": trinoexecutesql.Config{ Name: "example_tool", Kind: "trino-execute-sql", Source: "my-trino-instance", Description: "some description", AuthRequired: []string{"my-google-auth-service", "other-auth-service"}, }, }, }, } for _, tc := range tcs { t.Run(tc.desc, func(t *testing.T) { got := struct { Tools server.ToolConfigs `yaml:"tools"` }{} // Parse contents err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got) if err != nil { t.Fatalf("unable to unmarshal: %s", err) } if diff := cmp.Diff(tc.want, got.Tools); diff != "" { t.Fatalf("incorrect parse: diff %v", diff) } }) } } ``` -------------------------------------------------------------------------------- /internal/tools/firebird/firebirdexecutesql/firebirdexecutesql_test.go: -------------------------------------------------------------------------------- ```go // Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package firebirdexecutesql_test import ( "testing" yaml "github.com/goccy/go-yaml" "github.com/google/go-cmp/cmp" "github.com/googleapis/genai-toolbox/internal/server" "github.com/googleapis/genai-toolbox/internal/testutils" "github.com/googleapis/genai-toolbox/internal/tools/firebird/firebirdexecutesql" ) func TestParseFromYamlExecuteSql(t *testing.T) { ctx, err := testutils.ContextWithNewLogger() if err != nil { t.Fatalf("unexpected error: %s", err) } tcs := []struct { desc string in string want server.ToolConfigs }{ { desc: "basic example", in: ` tools: example_tool: kind: firebird-execute-sql source: my-instance description: some description authRequired: - my-google-auth-service - other-auth-service `, want: server.ToolConfigs{ "example_tool": firebirdexecutesql.Config{ Name: "example_tool", Kind: "firebird-execute-sql", Source: "my-instance", Description: "some description", AuthRequired: []string{"my-google-auth-service", "other-auth-service"}, }, }, }, } for _, tc := range tcs { t.Run(tc.desc, func(t *testing.T) { got := struct { Tools server.ToolConfigs `yaml:"tools"` }{} // Parse contents err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got) if err != nil { t.Fatalf("unable to unmarshal: %s", err) } if diff := cmp.Diff(tc.want, got.Tools); diff != "" { t.Fatalf("incorrect parse: diff %v", diff) } }) } } ``` -------------------------------------------------------------------------------- /internal/tools/postgres/postgresexecutesql/postgresexecutesql_test.go: -------------------------------------------------------------------------------- ```go // Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package postgresexecutesql_test import ( "testing" yaml "github.com/goccy/go-yaml" "github.com/google/go-cmp/cmp" "github.com/googleapis/genai-toolbox/internal/server" "github.com/googleapis/genai-toolbox/internal/testutils" "github.com/googleapis/genai-toolbox/internal/tools/postgres/postgresexecutesql" ) func TestParseFromYamlExecuteSql(t *testing.T) { ctx, err := testutils.ContextWithNewLogger() if err != nil { t.Fatalf("unexpected error: %s", err) } tcs := []struct { desc string in string want server.ToolConfigs }{ { desc: "basic example", in: ` tools: example_tool: kind: postgres-execute-sql source: my-instance description: some description authRequired: - my-google-auth-service - other-auth-service `, want: server.ToolConfigs{ "example_tool": postgresexecutesql.Config{ Name: "example_tool", Kind: "postgres-execute-sql", Source: "my-instance", Description: "some description", AuthRequired: []string{"my-google-auth-service", "other-auth-service"}, }, }, }, } for _, tc := range tcs { t.Run(tc.desc, func(t *testing.T) { got := struct { Tools server.ToolConfigs `yaml:"tools"` }{} // Parse contents err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got) if err != nil { t.Fatalf("unable to unmarshal: %s", err) } if diff := cmp.Diff(tc.want, got.Tools); diff != "" { t.Fatalf("incorrect parse: diff %v", diff) } }) } } ``` -------------------------------------------------------------------------------- /docs/en/resources/tools/neo4j/neo4j-schema.md: -------------------------------------------------------------------------------- ```markdown --- title: "neo4j-schema" type: "docs" weight: 1 description: > A "neo4j-schema" tool extracts a comprehensive schema from a Neo4j database. aliases: - /resources/tools/neo4j-schema --- ## About A `neo4j-schema` tool connects to a Neo4j database and extracts its complete schema information. It runs multiple queries concurrently to efficiently gather details about node labels, relationships, properties, constraints, and indexes. The tool automatically detects if the APOC (Awesome Procedures on Cypher) library is available. If so, it uses APOC procedures like `apoc.meta.schema` for a highly detailed overview of the database structure; otherwise, it falls back to using native Cypher queries. The extracted schema is **cached** to improve performance for subsequent requests. The output is a structured JSON object containing all the schema details, which can be invaluable for providing database context to an LLM. This tool is compatible with a `neo4j` source and takes no parameters. ## Example ```yaml tools: get_movie_db_schema: kind: neo4j-schema source: my-neo4j-movies-instance description: | Use this tool to get the full schema of the movie database. This provides information on all available node labels (like Movie, Person), relationships (like ACTED_IN), and the properties on each. This tool takes no parameters. # Optional configuration to cache the schema for 2 hours cacheExpireMinutes: 120 ``` ## Reference | **field** | **type** | **required** | **description** | |--------------------|:--------:|:------------:|---------------------------------------------------------| | kind | string | true | Must be `neo4j-schema`. | | source | string | true | Name of the source the schema should be extracted from. | | description | string | true | Description of the tool that is passed to the LLM. | | cacheExpireMinutes | integer | false | Cache expiration time in minutes. Defaults to 60. | ``` -------------------------------------------------------------------------------- /internal/tools/mysql/mysqllisttables/mysqllisttables_test.go: -------------------------------------------------------------------------------- ```go // Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package mysqllisttables_test import ( "testing" yaml "github.com/goccy/go-yaml" "github.com/google/go-cmp/cmp" "github.com/googleapis/genai-toolbox/internal/server" "github.com/googleapis/genai-toolbox/internal/testutils" mysqllisttables "github.com/googleapis/genai-toolbox/internal/tools/mysql/mysqllisttables" ) func TestParseFromYamlMySQLListTables(t *testing.T) { ctx, err := testutils.ContextWithNewLogger() if err != nil { t.Fatalf("unexpected error: %s", err) } tcs := []struct { desc string in string want server.ToolConfigs }{ { desc: "basic example", in: ` tools: example_tool: kind: mysql-list-tables source: my-mysql-instance description: some description authRequired: - my-google-auth-service - other-auth-service `, want: server.ToolConfigs{ "example_tool": mysqllisttables.Config{ Name: "example_tool", Kind: "mysql-list-tables", Source: "my-mysql-instance", Description: "some description", AuthRequired: []string{"my-google-auth-service", "other-auth-service"}, }, }, }, } for _, tc := range tcs { t.Run(tc.desc, func(t *testing.T) { got := struct { Tools server.ToolConfigs `yaml:"tools"` }{} // Parse contents err := yaml.UnmarshalContext(ctx, testutils.FormatYaml(tc.in), &got) if err != nil { t.Fatalf("unable to unmarshal: %s", err) } if diff := cmp.Diff(tc.want, got.Tools); diff != "" { t.Fatalf("incorrect parse: diff %v", diff) } }) } } ```