Restore a specific version of a tool from history Args: tool_name: Name of the tool version: Version string to restore auto_initialize: Whether to automatically initialize the restored tool Returns: ToolConfig of t
(self, tool_name: str, version: str, auto_initialize: bool = True)
| 182 | return success |
| 183 | |
| 184 | async def restore(self, tool_name: str, version: str, auto_initialize: bool = True) -> Optional[ToolConfig]: |
| 185 | """Restore a specific version of a tool from history |
| 186 | |
| 187 | Args: |
| 188 | tool_name: Name of the tool |
| 189 | version: Version string to restore |
| 190 | auto_initialize: Whether to automatically initialize the restored tool |
| 191 | |
| 192 | Returns: |
| 193 | ToolConfig of the restored version, or None if not found |
| 194 | """ |
| 195 | tool_config = await self.tool_context_manager.restore(tool_name, version, auto_initialize) |
| 196 | if tool_config: |
| 197 | self._registered_configs[tool_config.name] = tool_config |
| 198 | return tool_config |
| 199 | |
| 200 | async def retrieve(self, query: str, k: int = 4) -> List[Dict[str, Any]]: |
| 201 | """Retrieve similar tools using FAISS similarity search. |