tooluniverse.tool_registry module¶
Simplified tool registry for automatic tool discovery and registration.
- tooluniverse.tool_registry.register_tool(tool_type_name=None, config=None)[source][source]¶
Decorator to automatically register tool classes and their configs.
- Usage:
@register_tool(‘CustomToolName’, config={…}) class MyTool:
pass
- tooluniverse.tool_registry.register_external_tool(tool_name, tool_class)[source][source]¶
Allow external registration of tool classes.
- tooluniverse.tool_registry.register_config(tool_type_name, config)[source][source]¶
Register a config for a tool type.
- tooluniverse.tool_registry.get_tool_registry()[source][source]¶
Get a copy of the current tool registry.
- tooluniverse.tool_registry.get_config_registry()[source][source]¶
Get a copy of the current config registry.
- tooluniverse.tool_registry.lazy_import_tool(tool_name)[source][source]¶
Lazily import a tool by name without importing all tool modules. Only imports the specific module containing the requested tool.
- tooluniverse.tool_registry.build_lazy_registry(package_name=None)[source][source]¶
Build a mapping of tool names to module names using config files and naming patterns. This is truly lazy - it doesn’t import any modules, just creates the mapping.