Home / Function/ wrap_tool_call() — langchain Function Reference

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
  f226e306_9a63_e254_49cc_cc9aa8840bf1["wrap_tool_call()"]
  c310c442_3221_81bd_b756_9ed477f53ca8["MultipleDynamicToolsMiddleware"]
  f226e306_9a63_e254_49cc_cc9aa8840bf1 -->|defined in| c310c442_3221_81bd_b756_9ed477f53ca8
  9764bb1c_a788_be3d_4231_84ae858344e3["_handle_tool()"]
  f226e306_9a63_e254_49cc_cc9aa8840bf1 -->|calls| 9764bb1c_a788_be3d_4231_84ae858344e3
  1ea5936a_6fbd_698f_ab12_c23421e6c22a["wrap_tool_call()"]
  f226e306_9a63_e254_49cc_cc9aa8840bf1 -->|calls| 1ea5936a_6fbd_698f_ab12_c23421e6c22a
  style f226e306_9a63_e254_49cc_cc9aa8840bf1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_dynamic_tools.py lines 117–123

    def wrap_tool_call(
        self,
        request: ToolCallRequest,
        handler: Callable[[ToolCallRequest], ToolMessage | Command[Any]],
    ) -> ToolMessage | Command[Any]:
        updated = self._handle_tool(request)
        return handler(updated or request)

Domain

Subdomains

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 117.
What does wrap_tool_call() call?
wrap_tool_call() calls 2 function(s): _handle_tool, wrap_tool_call.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free