This PR sets the default description with the correct name when using toolOf function.
More flexible options were contemplated but not will be part of this PR:
Making Tool Serializable: This option would involve marking Tool as serializable using the @Serializable and @Description annotations. However, I'm uncertain if making Tool serializable adds the necessary value to justify this approach.
Passing Description as a Parameter: Another approach could be to modify the toolOf(tool) method to accept the description as an additional parameter. This method, though functional, is not particularly elegant or intuitive.
Target-Specific Implementation: For JVM targets, we could leverage the @Description annotation and access it via reflection, and set the description if the parameter is null. For other platforms, we would have to rely only on passing the description as a parameter.
Given that none of these options are completely satisfactory and considering that this feature is not immediately critical, I propose for now just this simple change to just set the default description with the correct tool name.
This PR sets the default description with the correct name when using
toolOf
function.More flexible options were contemplated but not will be part of this PR:
Making Tool Serializable: This option would involve marking Tool as serializable using the
@Serializable
and@Description
annotations. However, I'm uncertain if making Tool serializable adds the necessary value to justify this approach.Passing Description as a Parameter: Another approach could be to modify the
toolOf(tool)
method to accept thedescription
as an additional parameter. This method, though functional, is not particularly elegant or intuitive.Target-Specific Implementation: For JVM targets, we could leverage the
@Description
annotation and access it via reflection, and set the description if the parameter is null. For other platforms, we would have to rely only on passing the description as a parameter.Given that none of these options are completely satisfactory and considering that this feature is not immediately critical, I propose for now just this simple change to just set the default description with the correct tool name.