tooluniverse.compose_tool moduleΒΆ

ComposeTool - A tool that composes other tools using custom code logic. Supports intelligent dependency management with automatic tool loading.

class tooluniverse.compose_tool.ComposeTool[source]ΒΆ

Bases: BaseTool

A flexible tool that can compose other tools using custom code logic. Supports both inline composition_code and external Python files. Features intelligent dependency management with automatic tool loading.

__init__(tool_config, tooluniverse=None)[source]ΒΆ
run(arguments, stream_callback=None)[source]ΒΆ

Execute the composed tool with custom code logic.

Parameters:
  • arguments (dict) – Input arguments for the composition

  • stream_callback (callable, optional) – Callback function for streaming output

Returns:

Result from the composition execution

Return type:

Any