MCPcopy
hub / github.com/langchain-ai/langchain / on_tool_end

Method on_tool_end

libs/core/langchain_core/tracers/base.py:268–277  ·  view source on GitHub ↗

End a trace for a tool run.

(self, output: Any, *, run_id: UUID, **kwargs: Any)

Source from the content-addressed store, hash-verified

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,

Callers 2

runMethod · 0.45
arunMethod · 0.45

Calls 3

_end_traceMethod · 0.95
_complete_tool_runMethod · 0.80
_on_tool_endMethod · 0.45

Tested by

no test coverage detected