tooluniverse.tools.ToolDescriptionOptimizer module

ToolDescriptionOptimizer

Optimizes a tool’s description and parameter descriptions by generating test cases, executing the…

tooluniverse.tools.ToolDescriptionOptimizer.ToolDescriptionOptimizer(tool_config, save_to_file, output_file, max_iterations, satisfaction_threshold, *, stream_callback=None, use_cache=False, validate=True)[source]

Optimizes a tool’s description and parameter descriptions by generating test cases, executing the…

Parameters:
  • tool_config (dict[str, Any]) – The full configuration of the tool to optimize.

  • save_to_file (bool) – If true, save the optimized description to a file (do not overwrite the origi…

  • output_file (str) – Optional file path to save the optimized description. If not provided, use ‘<…

  • max_iterations (int) – Maximum number of optimization rounds to perform.

  • satisfaction_threshold (float) – Quality score threshold (1-10) to consider optimization satisfactory.

  • stream_callback (Callable, optional) – Callback for streaming output

  • use_cache (bool, default False) – Enable caching

  • validate (bool, default True) – Validate parameters

Return type:

Any