_MockStructuredTool Class — langchain Architecture
Architecture documentation for the _MockStructuredTool class in test_tools.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 5d304437_4ab5_0aad_e283_f75c65590752["_MockStructuredTool"] 18e85ff8_9a5d_f800_f722_027398dc89e7["BaseTool"] 5d304437_4ab5_0aad_e283_f75c65590752 -->|extends| 18e85ff8_9a5d_f800_f722_027398dc89e7 8e7836ae_e72c_f670_72a5_4ca6d46e3555["test_tools.py"] 5d304437_4ab5_0aad_e283_f75c65590752 -->|defined in| 8e7836ae_e72c_f670_72a5_4ca6d46e3555 2d2a28a7_5cc6_e5ef_1a79_e5db2dbde0fb["_run()"] 5d304437_4ab5_0aad_e283_f75c65590752 -->|method| 2d2a28a7_5cc6_e5ef_1a79_e5db2dbde0fb 19e5577b_e032_41b2_c6fd_1775d8935770["_arun()"] 5d304437_4ab5_0aad_e283_f75c65590752 -->|method| 19e5577b_e032_41b2_c6fd_1775d8935770
Relationship Graph
Source Code
libs/core/tests/unit_tests/test_tools.py lines 117–127
class _MockStructuredTool(BaseTool):
name: str = "structured_api"
args_schema: type[BaseModel] = _MockSchema
description: str = "A Structured Tool"
@override
def _run(self, *, arg1: int, arg2: bool, arg3: dict | None = None) -> str:
return f"{arg1} {arg2} {arg3}"
async def _arun(self, *, arg1: int, arg2: bool, arg3: dict | None = None) -> str:
raise NotImplementedError
Defined In
Extends
Source
Frequently Asked Questions
What is the _MockStructuredTool class?
_MockStructuredTool is a class in the langchain codebase, defined in libs/core/tests/unit_tests/test_tools.py.
Where is _MockStructuredTool defined?
_MockStructuredTool is defined in libs/core/tests/unit_tests/test_tools.py at line 117.
What does _MockStructuredTool extend?
_MockStructuredTool extends BaseTool.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free