wrap_tool_call() — langchain Function Reference
Architecture documentation for the wrap_tool_call() function in test_dynamic_tools.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 455837cc_5fda_f424_2098_8408fe296ed5["wrap_tool_call()"] de073c97_ee50_abbe_e9db_be6c9383a57d["ConditionalDynamicToolMiddleware"] 455837cc_5fda_f424_2098_8408fe296ed5 -->|defined in| de073c97_ee50_abbe_e9db_be6c9383a57d 1ea5936a_6fbd_698f_ab12_c23421e6c22a["wrap_tool_call()"] 1ea5936a_6fbd_698f_ab12_c23421e6c22a -->|calls| 455837cc_5fda_f424_2098_8408fe296ed5 1ea5936a_6fbd_698f_ab12_c23421e6c22a["wrap_tool_call()"] 455837cc_5fda_f424_2098_8408fe296ed5 -->|calls| 1ea5936a_6fbd_698f_ab12_c23421e6c22a style 455837cc_5fda_f424_2098_8408fe296ed5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_dynamic_tools.py lines 179–186
def wrap_tool_call(
self,
request: ToolCallRequest,
handler: Callable[[ToolCallRequest], ToolMessage | Command[Any]],
) -> ToolMessage | Command[Any]:
if request.tool_call["name"] == "another_dynamic_tool":
return handler(request.override(tool=another_dynamic_tool))
return handler(request)
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does wrap_tool_call() do?
wrap_tool_call() is a function in the langchain codebase, defined in libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_dynamic_tools.py.
Where is wrap_tool_call() defined?
wrap_tool_call() is defined in libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_dynamic_tools.py at line 179.
What does wrap_tool_call() call?
wrap_tool_call() calls 1 function(s): wrap_tool_call.
What calls wrap_tool_call()?
wrap_tool_call() is called by 1 function(s): wrap_tool_call.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free