Home / Class/ _MockSimpleTool Class — langchain Architecture

_MockSimpleTool Class — langchain Architecture

Architecture documentation for the _MockSimpleTool class in test_tools.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  cc369fb5_3142_ed03_b358_30810456d377["_MockSimpleTool"]
  18e85ff8_9a5d_f800_f722_027398dc89e7["BaseTool"]
  cc369fb5_3142_ed03_b358_30810456d377 -->|extends| 18e85ff8_9a5d_f800_f722_027398dc89e7
  8e7836ae_e72c_f670_72a5_4ca6d46e3555["test_tools.py"]
  cc369fb5_3142_ed03_b358_30810456d377 -->|defined in| 8e7836ae_e72c_f670_72a5_4ca6d46e3555
  e78a2da7_19a1_38fd_ad19_459850d0b088["_run()"]
  cc369fb5_3142_ed03_b358_30810456d377 -->|method| e78a2da7_19a1_38fd_ad19_459850d0b088
  0daed190_3adc_39fa_6f91_fbcca28e81c3["_arun()"]
  cc369fb5_3142_ed03_b358_30810456d377 -->|method| 0daed190_3adc_39fa_6f91_fbcca28e81c3

Relationship Graph

Source Code

libs/core/tests/unit_tests/test_tools.py lines 418–428

    class _MockSimpleTool(BaseTool):
        name: str = "simple_tool"
        description: str = "A Simple Tool"

        @override
        def _run(self, tool_input: str) -> str:
            return f"{tool_input}"

        @override
        async def _arun(self, tool_input: str) -> str:
            raise NotImplementedError

Extends

Frequently Asked Questions

What is the _MockSimpleTool class?
_MockSimpleTool is a class in the langchain codebase, defined in libs/core/tests/unit_tests/test_tools.py.
Where is _MockSimpleTool defined?
_MockSimpleTool is defined in libs/core/tests/unit_tests/test_tools.py at line 418.
What does _MockSimpleTool extend?
_MockSimpleTool extends BaseTool.

Analyze Your Own Codebase

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

Try Supermodel Free