Home / Function/ awrap_tool_call() — langchain Function Reference

awrap_tool_call() — langchain Function Reference

Architecture documentation for the awrap_tool_call() function in test_sync_async_wrappers.py from the langchain codebase.

Function python LangChainCore Runnables calls 1 called by 3

Entity Profile

Dependency Diagram

graph TD
  f42a5199_3b5b_01a0_d6db_0e1554648695["awrap_tool_call()"]
  4b08f19e_ba4b_5969_d3cf_5a5c96c8db00["AsyncOnlyMiddleware"]
  f42a5199_3b5b_01a0_d6db_0e1554648695 -->|defined in| 4b08f19e_ba4b_5969_d3cf_5a5c96c8db00
  83212f91_58cd_0efb_7c70_b1044be4f13c["awrap_tool_call()"]
  83212f91_58cd_0efb_7c70_b1044be4f13c -->|calls| f42a5199_3b5b_01a0_d6db_0e1554648695
  20b56989_a6d2_b59b_34e9_720ef7799e73["test_mixed_middleware_composition_async_path_fails_with_sync_only()"]
  20b56989_a6d2_b59b_34e9_720ef7799e73 -->|calls| f42a5199_3b5b_01a0_d6db_0e1554648695
  764efc16_2be8_1972_2479_1920fef42a5a["test_mixed_middleware_composition_sync_path_with_async_only_fails()"]
  764efc16_2be8_1972_2479_1920fef42a5a -->|calls| f42a5199_3b5b_01a0_d6db_0e1554648695
  83212f91_58cd_0efb_7c70_b1044be4f13c["awrap_tool_call()"]
  f42a5199_3b5b_01a0_d6db_0e1554648695 -->|calls| 83212f91_58cd_0efb_7c70_b1044be4f13c
  style f42a5199_3b5b_01a0_d6db_0e1554648695 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_sync_async_wrappers.py lines 112–118

            async def awrap_tool_call(
                self,
                request: ToolCallRequest,
                handler: Callable[[ToolCallRequest], Awaitable[ToolMessage | Command[Any]]],
            ) -> ToolMessage | Command[Any]:
                call_log.append("async_called")
                return await handler(request)

Domain

Subdomains

Frequently Asked Questions

What does awrap_tool_call() do?
awrap_tool_call() is a function in the langchain codebase, defined in libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_sync_async_wrappers.py.
Where is awrap_tool_call() defined?
awrap_tool_call() is defined in libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_sync_async_wrappers.py at line 112.
What does awrap_tool_call() call?
awrap_tool_call() calls 1 function(s): awrap_tool_call.
What calls awrap_tool_call()?
awrap_tool_call() is called by 3 function(s): awrap_tool_call, test_mixed_middleware_composition_async_path_fails_with_sync_only, test_mixed_middleware_composition_sync_path_with_async_only_fails.

Analyze Your Own Codebase

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

Try Supermodel Free