as_tool_call_hook
Function
This function is defined in the middleware module.Adapt a plain
on_tool_call callback into a before_tool hook.
HooksConfig(on_tool_call=...) is routed onto the existing before_tool
middleware slot, so it fires for every tool the agent executes (sync and
async paths both run through :class:MiddlewareManager). The callback
receives the :class:ToolRequest; its return value is ignored so the
request passes through unchanged.
Signature
Parameters
Callable
required
No description available.
Returns
BeforeToolFn
The result of the operation.
Source
View on GitHub
praisonaiagents/hooks/middleware.py at line 337
