Register a tool class or instance asynchronously. Args: tool: Tool class or instance to register config: Configuration dict for tool initialization (required when tool is a class) override: Whether to override existing registration ver
(self,
tool: Union[Tool, Type[Tool]],
config: Optional[Dict[str, Any]] = None,
override: bool = False,
version: Optional[str] = None)
| 61 | return await self.tool_context_manager.load_contract() |
| 62 | |
| 63 | async def register(self, |
| 64 | tool: Union[Tool, Type[Tool]], |
| 65 | config: Optional[Dict[str, Any]] = None, |
| 66 | override: bool = False, |
| 67 | version: Optional[str] = None) -> ToolConfig: |
| 68 | """Register a tool class or instance asynchronously. |
| 69 | |
| 70 | Args: |
| 71 | tool: Tool class or instance to register |
| 72 | config: Configuration dict for tool initialization (required when tool is a class) |
| 73 | override: Whether to override existing registration |
| 74 | version: Optional version string |
| 75 | |
| 76 | Returns: |
| 77 | ToolConfig: Tool configuration |
| 78 | """ |
| 79 | tool_config = await self.tool_context_manager.register( |
| 80 | tool, |
| 81 | tool_config_dict=config, |
| 82 | override=override, |
| 83 | version=version |
| 84 | ) |
| 85 | self._registered_configs[tool_config.name] = tool_config |
| 86 | return tool_config |
| 87 | |
| 88 | async def list(self) -> List[str]: |
| 89 | """List all registered tools |
no outgoing calls
no test coverage detected