Has Tool Hooks • AI Agent SDK
has_tool_hooks: Check if any tool hooks are registered.
has_tool_hooks
Method
</div>
This is a method of the MiddlewareManager class in the middleware module.
Check if any tool hooks are registered.
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#8B0000', 'primaryTextColor': '#fff', 'primaryBorderColor': '#710101', 'lineColor': '#189AB4', 'secondaryColor': '#189AB4', 'tertiaryColor': '#fff' }}}%%
graph LR
agent["Agent"] -- "uses" --> tool["Tool: has_tool_hooks"]
tool -- "returns" --> result["Result"]
style tool fill:#189AB4,color:#fff
style agent fill:#8B0000,color:#fff
style result fill:#8B0000,color:#fffSignature
def has_tool_hooks() -> boolReturns
ResponseField
boolThe result of the operation.
Source
View on GitHubpraisonaiagents/hooks/middleware.py at line 437