Skip to content

Issue on docs #365

@aharrar

Description

@aharrar

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions