Skip to content

Cloud MySQL list_tables tool retrieve error #910

@iofirag

Description

@iofirag

Prerequisites

  • I've searched the current open issues
  • I've updated to the latest version of Toolbox

Toolbox version

toolbox version 0.9.0+binary.windows.amd64.2b69700c5e40ad37eafd94f378a2e1174879402b

Environment

  1. OS type and version: (output of uname -a)
   $ uname -a
MINGW64_NT-10.0-26100 OfirAgahi-LP 3.4.10-2e2ef940.x86_64 2024-07-09 21:35 UTC x86_64 Msys
  1. running in windows terminal

Client

  1. Client: https://storage.googleapis.com/genai-toolbox/v0.9.0/windows/amd64/toolbox.exe
  2. Version: toolbox version 0.9.0+binary.windows.amd64.2b69700c5e40ad37eafd94f378a2e1174879402b
  3. Example: If possible, please include your code of configuration:

i put this
https://github.com/googleapis/genai-toolbox/blob/main/internal/prebuiltconfigs/tools/cloud-sql-mysql.yaml
(use the last tools.yaml from this commit)
as my tools.yaml
and add there ipType: "private" in the sources section

tools.yaml:

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: "private"
tools:
.....

and run the mcp using

export CLOUD_SQL_MYSQL_PROJECT=""
export CLOUD_SQL_MYSQL_REGION=""
export CLOUD_SQL_MYSQL_INSTANCE=""
export CLOUD_SQL_MYSQL_DATABASE=""
export CLOUD_SQL_MYSQL_USER=""
export CLOUD_SQL_MYSQL_PASSWORD=""
export GOOGLE_APPLICATION_CREDENTIALS=""

./toolbox.exe --tools-file tools.yaml

running modelcontextprotocol/inspector for testing the mcp
$ npx @modelcontextprotocol/inspector

it's success connected to the mcp.

Expected Behavior

list_tables tool will work with and without table_names parameter

Current Behavior

  1. when run it without any value for table_names parameter:
    got Tool Result: Error
    MCP error -32602: provided parameters were invalid: parameter "table_names" is required
Image
  1. when run it with a value in table_names parameter
    got Tool Result: Error
    unable to execute query: sql: expected 2 arguments, got 1
Image
  1. when delete the value that was inserted for table_names parameter and run it again:
    got Tool Result: Error
    unable to execute query: sql: expected 2 arguments, got 1
Image

Steps to reproduce?

click on List Tools
and it's success retrieve the 2 tools that was in the tools.yaml file

  • execute_sql - works.

BUT

  • list_tables - didnt work.

as i understood, table_names is an optional parameter, in the tool list_tables.

  1. run it without any value for table_names parameter:
  2. run it with a value in table_names parameter
  3. delete the value that was inserted for table_names parameter and run it again:

Additional Details

No response

Metadata

Metadata

Assignees

Labels

type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions