Back to Genai Toolbox

cloud-sql-admin-sql-many

docs/en/integrations/cloud-sql-admin/tools/cloudsqladminsqlmany.md

1.3.02.2 KB
Original Source

About

The cloud-sql-admin-sql-many tool executes a predefined SQL statement against a specific Cloud SQL instance identified by project, instanceId, and database parameters provided at runtime.

It supports both parameters and templateParameters to allow dynamic values to be injected into the query at runtime.

Note: This tool is intended for developer assistant workflows with human-in-the-loop and shouldn't be used for production agents.

Compatible Sources

{{< compatible-sources >}}

Parameters

The following parameters are required at runtime when invoking the tool:

ParameterTypeDescription
projectstringThe GCP project ID.
instanceIdstringThe Cloud SQL instance ID.
databasestringThe database name.

Additional parameters may be required based on the parameters or templateParameters configured in the tool definition.

Example

yaml
kind: tool
name: get_user_many_tool
type: cloud-sql-admin-sql-many
source: my-cloud-sql-admin-source
description: Use this tool to get user details from a specific instance.
statement: SELECT * FROM users WHERE id = {{.user_id}}
templateParameters:
  - name: user_id
    type: string
    description: The ID of the user.

Reference

fieldtyperequireddescription
typestringtrueMust be "cloud-sql-admin-sql-many".
sourcestringtrueName of the cloud-sql-admin source.
descriptionstringtrueDescription of the tool that is passed to the agent.
statementstringtrueThe SQL statement template to execute.
parameterslistfalseList of parameters used in the statement template.
templateParameterslistfalseList of parameters used in the statement template.