"""Use the tool asynchronously."""
        raise NotImplementedError("custom_search does not support async")
[docs]    def add_file(self, source_path: str, target_path: str, description: str) -> None:
        if target_path in self.files:
            raise ValueError("target_path already exists")
        if not Path(source_path).exists():
            raise ValueError("source_path does not exist")
        self.files[target_path] = FileInfo(
            target_path=target_path, source_path=source_path, description=description
        )
[docs]    def clear_files(self) -> None:
        self.files = {}
    # TODO: this is because we can't have a dynamic description
    #  because of the base pydantic class
[docs]    def as_tool(self) -> Tool:
        return Tool.from_function(
            func=self._run,
            name=self.name,
            description=self.description,
            args_schema=self.args_schema,
        )