Schema for label in tools.ts is defined as tool.schema.string() [1, 2]. This schema is used by model to call a tool. But labels being validated as letters/numbers/dash/underscore (2-61 chars). It results in getting an error when a model tries to set a value by malformed label (f.e., containing spaces).
Label schema need to be changed to tool.schema.string().regex(/^[a-z0-9][a-z0-9-_]{1,60}$/i).
Schema for label in
tools.tsis defined astool.schema.string()[1, 2]. This schema is used by model to call a tool. But labels being validated as letters/numbers/dash/underscore (2-61 chars). It results in getting an error when a model tries to set a value by malformed label (f.e., containing spaces).Label schema need to be changed to
tool.schema.string().regex(/^[a-z0-9][a-z0-9-_]{1,60}$/i).