ToolOutputMixin#

class langchain_core.messages.tool.ToolOutputMixin[source]#

Mixin for objects that tools can return directly.

If a custom BaseTool is invoked with a ToolCall and the output of custom code is not an instance of ToolOutputMixin, the output will automatically be coerced to a string and wrapped in a ToolMessage.