Skip to content

Commit da24661

Browse files
Myst9averikitsch
andauthored
fix(tools/mysql-list-tables): Update mysql-list-tables parameter table_names with default value (#1439)
## Description Update the `tables_names` parameter of the `mysql-list-tables` tool with default value `""` Co-authored-by: Averi Kitsch <akitsch@google.com>
1 parent fd00fef commit da24661

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎internal/tools/mysql/mysqllisttables/mysqllisttables.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ func (cfg Config) Initialize(srcs map[string]sources.Source) (tools.Tool, error)
236236
}
237237

238238
allParameters := tools.Parameters{
239-
tools.NewStringParameter("table_names", "Optional: A comma-separated list of table names. If empty, details for all tables will be listed."),
239+
tools.NewStringParameterWithDefault("table_names", "", "Optional: A comma-separated list of table names. If empty, details for all tables will be listed."),
240240
tools.NewStringParameterWithDefault("output_format", "detailed", "Optional: Use 'simple' for names only or 'detailed' for full info."),
241241
}
242242
paramManifest := allParameters.Manifest()
@@ -280,7 +280,7 @@ func (t Tool) Invoke(ctx context.Context, params tools.ParamValues, accessToken
280280

281281
tableNames, ok := paramsMap["table_names"].(string)
282282
if !ok {
283-
return nil, fmt.Errorf("invalid or missing '%s' parameter; expected a string", tableNames)
283+
return nil, fmt.Errorf("invalid '%s' parameter; expected a string", tableNames)
284284
}
285285
outputFormat, _ := paramsMap["output_format"].(string)
286286
if outputFormat != "simple" && outputFormat != "detailed" {

0 commit comments

Comments
 (0)