I think you did not understand my request, I have already used the tool mode and I know how it works.
In my case, I use an animation of an AnimationPlayer to call a method, when I play the animation during the game, it works and the function is called, I get my print("test").
What I would like is to have the same thing when I preview the animation directly in the editor.
I thought that the tool mode would do that but it doesn't seem to work, maybe Godot doesn't manage this possibility.