-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
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
- 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
- running in windows terminal
Client
- Client: https://storage.googleapis.com/genai-toolbox/v0.9.0/windows/amd64/toolbox.exe
- Version:
toolbox version 0.9.0+binary.windows.amd64.2b69700c5e40ad37eafd94f378a2e1174879402b - 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
- when run it without any value for
table_namesparameter:
gotTool Result: Error
MCP error -32602: provided parameters were invalid: parameter "table_names" is required
- when run it with a value in
table_namesparameter
gotTool Result: Error
unable to execute query: sql: expected 2 arguments, got 1
- when delete the value that was inserted for
table_namesparameter and run it again:
gotTool Result: Error
unable to execute query: sql: expected 2 arguments, got 1
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.
- run it without any value for
table_namesparameter: - run it with a value in
table_namesparameter - delete the value that was inserted for
table_namesparameter 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.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.