Skip to main content

get_hooks

Method
This is a method of the HookRegistry class in the registry module.
Get all hooks for an event, optionally filtered by target.

Signature

def get_hooks(event: HookEvent, target: Optional[str]) -> List[HookDefinition]

Parameters

event
HookEvent
required
The event to get hooks for
target
Optional
Optional target to filter by (e.g., tool name)

Returns

Returns
List[HookDefinition]
List of matching hook definitions