-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
I'm working with the @tool hooks under the path /basics/tools/hooks.
According to the documentation, both the pre and post hooks receive a FunctionCall object that contains:
fc.function.name
fc.arguments
fc.result
However, in the pre hook, fc.result is always None — the tool hasn't run yet, so the result is not available.
This matches the behavior in the docs example:
def pre_hook(fc: FunctionCall):
print(f"Pre-hook: {fc.function.name}")
print(f"Arguments: {fc.arguments}")
print(f"Result: {fc.result}") # <-- always None in pre-hook
The post hook works correctly and fc.result contains the tool output.
I'm trying to confirm whether this is the expected behavior or if there's a way to access tool results inside the pre-hook.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels