_MisAnnotatedTool Class — langchain Architecture
Architecture documentation for the _MisAnnotatedTool class in test_tools.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 9721cfe7_bdcc_12b8_f946_d5919c09943c["_MisAnnotatedTool"] 18e85ff8_9a5d_f800_f722_027398dc89e7["BaseTool"] 9721cfe7_bdcc_12b8_f946_d5919c09943c -->|extends| 18e85ff8_9a5d_f800_f722_027398dc89e7 8e7836ae_e72c_f670_72a5_4ca6d46e3555["test_tools.py"] 9721cfe7_bdcc_12b8_f946_d5919c09943c -->|defined in| 8e7836ae_e72c_f670_72a5_4ca6d46e3555 7a921b84_26ef_fcb3_cfbb_5a88e428b55d["_run()"] 9721cfe7_bdcc_12b8_f946_d5919c09943c -->|method| 7a921b84_26ef_fcb3_cfbb_5a88e428b55d cb3f4171_db66_93f0_634e_6cd9a34c8b89["_arun()"] 9721cfe7_bdcc_12b8_f946_d5919c09943c -->|method| cb3f4171_db66_93f0_634e_6cd9a34c8b89
Relationship Graph
Source Code
libs/core/tests/unit_tests/test_tools.py lines 144–157
class _MisAnnotatedTool(BaseTool):
name: str = "structured_api"
# This would silently be ignored without the custom metaclass
args_schema: BaseModel = _MockSchema # type: ignore[assignment]
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 _MisAnnotatedTool class?
_MisAnnotatedTool is a class in the langchain codebase, defined in libs/core/tests/unit_tests/test_tools.py.
Where is _MisAnnotatedTool defined?
_MisAnnotatedTool is defined in libs/core/tests/unit_tests/test_tools.py at line 144.
What does _MisAnnotatedTool extend?
_MisAnnotatedTool extends BaseTool.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free