Skip to content

Add tool call parameters for on_tool_start hook #253

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

yanmxa
Copy link

@yanmxa yanmxa commented Mar 20, 2025

Resolve: #252

Signed-off-by: myan <[email protected]>
(
agent.hooks.on_tool_start(context_wrapper, agent, func_tool)
agent.hooks.on_tool_start(context_wrapper, agent, func_tool, tool_call.arguments)
if agent.hooks

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since using only arguments as a parameter is too granular, and adding tool_call.id in the future would lead to parameter inflation at the root level, plus tool_call.id is actually needed, would it be better to pass the entire tool_call object as a parameter instead?"

@louis-sanna-eki
Copy link

louis-sanna-eki commented Apr 10, 2025

@yanmxa thanks for doing this work, very useful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhance on_tool_start Hook to Include Tool Call Arguments
3 participants