Skip to content

Commit 8cffcef

Browse files
feat(cmd/internal,docs): warn that prebuilt tools are for developer use (googleapis#3451)
Co-authored-by: Averi Kitsch <akitsch@google.com>
1 parent a3325a3 commit 8cffcef

6 files changed

Lines changed: 10 additions & 5 deletions

File tree

‎cmd/internal/options.go‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ func (opts *ToolboxOptions) LoadConfig(ctx context.Context, parser *ConfigParser
195195
sourcesList := strings.Join(opts.PrebuiltConfigs, ", ")
196196
logMsg := fmt.Sprintf("Using prebuilt tool configurations for: %s", sourcesList)
197197
logger.InfoContext(ctx, logMsg)
198+
logger.WarnContext(ctx, "These prebuilt configs are intended for 'build-time' use cases, where agents are helping trusted developers build things. They are not secure enough for 'run time' use cases, where the agent will be talking to potentially untrusted developers.")
198199

199200
for _, configName := range opts.PrebuiltConfigs {
200201
if !strings.Contains(configName, "/") {

‎docs/en/documentation/configuration/prebuilt-configs/_index.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ Prebuilt configs are reusable, pre-packaged toolsets that are designed to extend
1010
the capabilities of agents. These configs are built to be generic and adaptable,
1111
allowing developers to interact with and take action on databases.
1212

13+
{{< notice warning >}}
14+
These prebuilt configs are intended for 'build-time' use cases, where agents are helping trusted developers build things. They are not secure enough for 'run time' use cases, where the agent will be talking to potentially untrusted developers.
15+
{{< /notice >}}
16+
1317
See guides, [Connect from your IDE](../../connect-to/ides/_index.md), for
1418
details on how to connect your AI tools (IDEs) to databases via Toolbox and MCP.
1519

‎docs/en/reference/cli.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ description: >
2121
| `-p` | `--port` | Port the server will listen on. | `5000` |
2222
| | `--tls-cert` | Path to the PEM-encoded TLS certificate file. | |
2323
| | `--tls-key` | Path to the PEM-encoded TLS private key file. | |
24-
| | `--prebuilt` | Use one or more prebuilt tool configuration by source type. Optionally specify a toolset suffix (e.g., `<source>/<toolset>`) to load only that toolset. See [Prebuilt Tools Reference](../documentation/configuration/prebuilt-configs/_index.md) for allowed values. | |
24+
| | `--prebuilt` | Use one or more prebuilt tool configuration by source type. Optionally specify a toolset suffix (e.g., `<source>/<toolset>`) to load only that toolset. These prebuilt configs are intended for 'build-time' use cases, where agents are helping trusted developers build things. They are not secure enough for 'run time' use cases, where the agent will be talking to potentially untrusted developers. See [Prebuilt Tools Reference](../documentation/configuration/prebuilt-configs/_index.md) for allowed values. | |
2525
| | `--stdio` | Listens via MCP STDIO instead of acting as a remote HTTP server. | |
2626
| | `--telemetry-gcp` | Enable exporting directly to Google Cloud Monitoring. | |
2727
| | `--telemetry-gcp-project` | Google Cloud project ID used for `--telemetry-gcp`; defaults to `GOOGLE_CLOUD_PROJECT` if not set. | |
@@ -186,7 +186,7 @@ The CLI supports multiple mutually exclusive ways to specify tool configurations
186186
**Prebuilt Configurations:**
187187

188188
- `--prebuilt`: Use one or more predefined configurations for specific database types (e.g.,
189-
'bigquery', 'postgres', 'spanner'), optionally appending a toolset name to filter the loaded tools (e.g., `alloydb-postgres/monitor`). See [Prebuilt Tools
189+
'bigquery', 'postgres', 'spanner'), optionally appending a toolset name to filter the loaded tools (e.g., `alloydb-postgres/monitor`). These prebuilt configs are intended for 'build-time' use cases, where agents are helping trusted developers build things. They are not secure enough for 'run time' use cases, where the agent will be talking to potentially untrusted developers. See [Prebuilt Tools
190190
Reference](../documentation/configuration/prebuilt-configs/_index.md) for allowed values.
191191

192192
{{< notice tip >}}

‎internal/prebuiltconfigs/tools/alloydb-omni.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ kind: tool
188188
name: get_query_plan
189189
type: postgres-sql
190190
source: alloydb-omni-source
191-
description: Generate a PostgreSQL EXPLAIN plan in JSON format for a single SQL statement—without executing it. This returns the optimizer's estimated plan, costs, and rows (no ANALYZE, no extra options). Use in production safely for plan inspection, regression checks, and query tuning workflows.
191+
description: Generate a PostgreSQL EXPLAIN plan in JSON format for a single SQL statement—without executing it. This returns the optimizer's estimated plan, costs, and rows (no ANALYZE, no extra options).
192192
statement: |
193193
EXPLAIN (FORMAT JSON) {{.query}};
194194
templateParameters:

‎internal/prebuiltconfigs/tools/cloud-sql-postgres.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ kind: tool
183183
name: get_query_plan
184184
type: postgres-sql
185185
source: cloudsql-pg-source
186-
description: Generate a PostgreSQL EXPLAIN plan in JSON format for a single SQL statement—without executing it. This returns the optimizer's estimated plan, costs, and rows (no ANALYZE, no extra options). Use in production safely for plan inspection, regression checks, and query tuning workflows.
186+
description: Generate a PostgreSQL EXPLAIN plan in JSON format for a single SQL statement—without executing it. This returns the optimizer's estimated plan, costs, and rows (no ANALYZE, no extra options). Do not use this tool in production as it is prone to SQL injection risks.
187187
statement: |
188188
EXPLAIN (FORMAT JSON) {{.query}};
189189
templateParameters:

‎internal/prebuiltconfigs/tools/postgres.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ kind: tool
173173
name: get_query_plan
174174
type: postgres-sql
175175
source: postgresql-source
176-
description: Generate a PostgreSQL EXPLAIN plan in JSON format for a single SQL statement—without executing it. This returns the optimizer's estimated plan, costs, and rows (no ANALYZE, no extra options). Use in production safely for plan inspection, regression checks, and query tuning workflows.
176+
description: Generate a PostgreSQL EXPLAIN plan in JSON format for a single SQL statement—without executing it. This returns the optimizer's estimated plan, costs, and rows (no ANALYZE, no extra options). Do not use this tool in production as it is prone to SQL injection risks.
177177
statement: |
178178
EXPLAIN (FORMAT JSON) {{.query}};
179179
templateParameters:

0 commit comments

Comments
 (0)