Skip to main content

execute_tool_call

Method
This is a method of the MiddlewareManager class in the middleware module.
Execute a tool call with all hooks and middleware. Order:
  1. before_tool hooks (in order)
  2. wrap_tool_call middleware chain
  3. actual tool call
  4. after_tool hooks (in reverse order)

Signature

def execute_tool_call(request: ToolRequest, tool_fn: Callable[[ToolRequest], ToolResponse]) -> ToolResponse

Parameters

request
ToolRequest
required
No description available.
tool_fn
Callable
required
No description available.

Returns

Returns
ToolResponse
The result of the operation.