_matches_tool_filter() — langchain Function Reference
Architecture documentation for the _matches_tool_filter() function in tool_call_limit.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 69072976_06ba_948b_d3cc_f7ede1e73d0f["_matches_tool_filter()"] 68f7858b_b207_3223_e360_e5e5b35adf21["ToolCallLimitMiddleware"] 69072976_06ba_948b_d3cc_f7ede1e73d0f -->|defined in| 68f7858b_b207_3223_e360_e5e5b35adf21 6385d4be_67e3_d055_9df4_4d5383df6d8d["_separate_tool_calls()"] 6385d4be_67e3_d055_9df4_4d5383df6d8d -->|calls| 69072976_06ba_948b_d3cc_f7ede1e73d0f style 69072976_06ba_948b_d3cc_f7ede1e73d0f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain_v1/langchain/agents/middleware/tool_call_limit.py lines 281–290
def _matches_tool_filter(self, tool_call: ToolCall) -> bool:
"""Check if a tool call matches this middleware's tool filter.
Args:
tool_call: The tool call to check.
Returns:
True if this middleware should track this tool call.
"""
return self.tool_name is None or tool_call["name"] == self.tool_name
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does _matches_tool_filter() do?
_matches_tool_filter() is a function in the langchain codebase, defined in libs/langchain_v1/langchain/agents/middleware/tool_call_limit.py.
Where is _matches_tool_filter() defined?
_matches_tool_filter() is defined in libs/langchain_v1/langchain/agents/middleware/tool_call_limit.py at line 281.
What calls _matches_tool_filter()?
_matches_tool_filter() is called by 1 function(s): _separate_tool_calls.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free