End a trace for a tool run.
(self, output: Any, *, run_id: UUID, **kwargs: Any)
| 266 | return tool_run |
| 267 | |
| 268 | def on_tool_end(self, output: Any, *, run_id: UUID, **kwargs: Any) -> Run: |
| 269 | """End a trace for a tool run.""" |
| 270 | tool_run = self._complete_tool_run( |
| 271 | output=output, |
| 272 | run_id=run_id, |
| 273 | **kwargs, |
| 274 | ) |
| 275 | self._end_trace(tool_run) |
| 276 | self._on_tool_end(tool_run) |
| 277 | return tool_run |
| 278 | |
| 279 | def on_tool_error( |
| 280 | self, |
no test coverage detected