ToolManagerMixin#

class langchain_core.callbacks.base.ToolManagerMixin[source]#

Mixin for tool callbacks.

Methods

__init__()

on_tool_end(output, *, run_id[, parent_run_id])

Run when the tool ends running.

on_tool_error(error, *, run_id[, parent_run_id])

Run when tool errors.

__init__()#
on_tool_end(output: Any, *, run_id: UUID, parent_run_id: UUID | None = None, **kwargs: Any) Any[source]#

Run when the tool ends running.

Parameters:
  • output (Any) – The output of the tool.

  • run_id (UUID) – The run ID. This is the ID of the current run.

  • parent_run_id (UUID) – The parent run ID. This is the ID of the parent run.

  • kwargs (Any) – Additional keyword arguments.

Return type:

Any

on_tool_error(error: BaseException, *, run_id: UUID, parent_run_id: UUID | None = None, **kwargs: Any) Any[source]#

Run when tool errors.

Parameters:
  • error (BaseException) – The error that occurred.

  • run_id (UUID) – The run ID. This is the ID of the current run.

  • parent_run_id (UUID) – The parent run ID. This is the ID of the parent run.

  • kwargs (Any) – Additional keyword arguments.

Return type:

Any