InjectedToolCallId Class — langchain Architecture
Architecture documentation for the InjectedToolCallId class in base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD ab8eb42c_4742_06de_dfb3_94321a7bdac0["InjectedToolCallId"] 85ecb5bd_fbe3_a926_8a1c_56bb2ae9df14["InjectedToolArg"] ab8eb42c_4742_06de_dfb3_94321a7bdac0 -->|extends| 85ecb5bd_fbe3_a926_8a1c_56bb2ae9df14 80cebff4_efbd_4311_85e9_de0dc81a7eee["base.py"] ab8eb42c_4742_06de_dfb3_94321a7bdac0 -->|defined in| 80cebff4_efbd_4311_85e9_de0dc81a7eee
Relationship Graph
Source Code
libs/core/langchain_core/tools/base.py lines 1396–1419
class InjectedToolCallId(InjectedToolArg):
"""Annotation for injecting the tool call ID.
This annotation is used to mark a tool parameter that should receive the tool call
ID at runtime.
```python
from typing import Annotated
from langchain_core.messages import ToolMessage
from langchain_core.tools import tool, InjectedToolCallId
@tool
def foo(
x: int, tool_call_id: Annotated[str, InjectedToolCallId]
) -> ToolMessage:
\"\"\"Return x.\"\"\"
return ToolMessage(
str(x),
artifact=x,
name="foo",
tool_call_id=tool_call_id
)
```
"""
Defined In
Extends
Source
Frequently Asked Questions
What is the InjectedToolCallId class?
InjectedToolCallId is a class in the langchain codebase, defined in libs/core/langchain_core/tools/base.py.
Where is InjectedToolCallId defined?
InjectedToolCallId is defined in libs/core/langchain_core/tools/base.py at line 1396.
What does InjectedToolCallId extend?
InjectedToolCallId extends InjectedToolArg.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free