langchain_core.messages.tool.InvalidToolCall

class langchain_core.messages.tool.InvalidToolCall[source]

Allowance for errors made by LLM.

Here we add an error key to surface errors made during generation (e.g., invalid JSON arguments.)

name: Optional[str]

The name of the tool to be called.

args: Optional[str]

The arguments to the tool call.

id: Optional[str]

An identifier associated with the tool call.

error: Optional[str]

An error message associated with the tool call.

type: NotRequired[Literal['invalid_tool_call']]