get_input_schema() — langchain Function Reference
Architecture documentation for the get_input_schema() function in base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 7c319e04_955b_2f3f_b566_46230f8f7256["get_input_schema()"] 18e85ff8_9a5d_f800_f722_027398dc89e7["BaseTool"] 7c319e04_955b_2f3f_b566_46230f8f7256 -->|defined in| 18e85ff8_9a5d_f800_f722_027398dc89e7 b3e89d48_15bc_a2b9_9f3c_980febdf8096["tool_call_schema()"] b3e89d48_15bc_a2b9_9f3c_980febdf8096 -->|calls| 7c319e04_955b_2f3f_b566_46230f8f7256 c0d52d58_8a26_451c_3602_695fe2854328["create_schema_from_function()"] 7c319e04_955b_2f3f_b566_46230f8f7256 -->|calls| c0d52d58_8a26_451c_3602_695fe2854328 style 7c319e04_955b_2f3f_b566_46230f8f7256 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/langchain_core/tools/base.py lines 619–632
def get_input_schema(self, config: RunnableConfig | None = None) -> type[BaseModel]:
"""The tool's input schema.
Args:
config: The configuration for the tool.
Returns:
The input schema for the tool.
"""
if self.args_schema is not None:
if isinstance(self.args_schema, dict):
return super().get_input_schema(config)
return self.args_schema
return create_schema_from_function(self.name, self._run)
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does get_input_schema() do?
get_input_schema() is a function in the langchain codebase, defined in libs/core/langchain_core/tools/base.py.
Where is get_input_schema() defined?
get_input_schema() is defined in libs/core/langchain_core/tools/base.py at line 619.
What does get_input_schema() call?
get_input_schema() calls 1 function(s): create_schema_from_function.
What calls get_input_schema()?
get_input_schema() is called by 1 function(s): tool_call_schema.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free