langchain/callbacks/tracers/base.py/BaseTracer/on_tool_end
class BaseTracer:    def on_tool_end(self, output: str, *, run_id: UUID, **kwargs: Any) -> None:
        """End a trace for a tool run."""
        if not run_id:
            raise TracerException("No run_id provided for on_tool_end callback.")
        tool_run = self.run_map.get(str(run_id))
        if tool_run is None or tool_run.run_type != RunTypeEnum.tool:
            raise TracerException("No tool Run found to be traced")

        tool_run.outputs = {"output": output}
        tool_run.end_time = datetime.utcnow()
        self._end_trace(tool_run)
        self._on_tool_end(tool_run)