langchain_core.messages.tool
.ToolCall¶
- class langchain_core.messages.tool.ToolCall[source]¶
Represents a request to call a tool.
Example
{ "name": "foo", "args": {"a": 1}, "id": "123" }
This represents a request to call the tool named “foo” with arguments {“a”: 1} and an identifier of “123”.
- name: str¶
The name of the tool to be called.
- args: Dict[str, Any]¶
The arguments to the tool call.
- id: Optional[str]¶
An identifier associated with the tool call.
An identifier is needed to associate a tool call request with a tool call result in events when multiple concurrent tool calls are made.
- type: NotRequired[Literal['tool_call']]¶