mirror of
https://github.com/googleapis/genai-toolbox.git
synced 2026-02-11 15:45:06 -05:00
## Description > Should include a concise description of the changes (bug or feature), it's > impact, along with a summary of the solution ## PR Checklist > Thank you for opening a Pull Request! Before submitting your PR, there are a > few things you can do to make sure it goes smoothly: - [ ] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) - [ ] Make sure to add `!` if this involve a breaking change 🛠️ Fixes #<issue_number_goes_here>
59 lines
3.2 KiB
YAML
59 lines
3.2 KiB
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:
|
|
cloud-sql-mysql-source:
|
|
kind: cloud-sql-mysql
|
|
project: ${CLOUD_SQL_MYSQL_PROJECT}
|
|
region: ${CLOUD_SQL_MYSQL_REGION}
|
|
instance: ${CLOUD_SQL_MYSQL_INSTANCE}
|
|
database: ${CLOUD_SQL_MYSQL_DATABASE}
|
|
user: ${CLOUD_SQL_MYSQL_USER:}
|
|
password: ${CLOUD_SQL_MYSQL_PASSWORD:}
|
|
ipType: ${CLOUD_SQL_MYSQL_IP_TYPE:PUBLIC}
|
|
tools:
|
|
execute_sql:
|
|
kind: mysql-execute-sql
|
|
source: cloud-sql-mysql-source
|
|
description: Use this tool to execute SQL.
|
|
list_active_queries:
|
|
kind: mysql-list-active-queries
|
|
source: cloud-sql-mysql-source
|
|
description: Lists top N (default 10) ongoing queries from processlist and innodb_trx, ordered by execution time in descending order. Returns detailed information of those queries in json format, including process id, query, transaction duration, transaction wait duration, process time, transaction state, process state, username with host, transaction rows locked, transaction rows modified, and db schema.
|
|
get_query_plan:
|
|
kind: mysql-get-query-plan
|
|
source: cloud-sql-mysql-source
|
|
description: "Provide information about how MySQL executes a SQL statement. Common use cases include: 1) analyze query plan to improve its performance, and 2) determine effectiveness of existing indexes and evalueate new ones."
|
|
list_tables:
|
|
kind: mysql-list-tables
|
|
source: cloud-sql-mysql-source
|
|
description: "Lists detailed schema information (object type, columns, constraints, indexes, triggers, comment) as JSON for user-created tables (ordinary or partitioned). Filters by a comma-separated list of names. If names are omitted, lists all tables in user schemas."
|
|
list_tables_missing_unique_indexes:
|
|
kind: mysql-list-tables-missing-unique-indexes
|
|
source: cloud-sql-mysql-source
|
|
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."
|
|
list_table_fragmentation:
|
|
kind: mysql-list-table-fragmentation
|
|
source: cloud-sql-mysql-source
|
|
description: List table fragmentation in MySQL, by calculating the size of the data and index files and free space allocated to each table. The query calculates fragmentation percentage which represents the proportion of free space relative to the total data and index size. Storage can be reclaimed for tables with high fragmentation using OPTIMIZE TABLE.
|
|
|
|
toolsets:
|
|
cloud_sql_mysql_database_tools:
|
|
- execute_sql
|
|
- list_tables
|
|
- get_query_plan
|
|
- list_active_queries
|
|
- list_tables_missing_unique_indexes
|
|
- list_table_fragmentation
|