People appeared to approach this question as if it were about whether I can be held liable for the action of breaking a window (the main example). However, this question has nothing to do with law; instead, it is a purely philosophical question that seeks to establish how a chain of causes should be interpreted. To eliminate this misconception, I have added a second example, and I've also adjusted the title to match both examples.
If I were to decide to break a window by smashing it with a hammer, for example, out of the hammer and me, which would be the direct and the indirect cause of the window breaking?
I was thinking that the direct cause is the hammer, because it is what'll interact with the window. However, I'm the one who ultimately breaks the window: it wouldn't have broken if it weren't for me, which is why I wonder whether I'm the direct cause, and whether the hammer is an indirect cause because I'm merely using it as a tool.
If I were to hit a baseball with a bat, am I the direct cause of the ball's movement because I'm swinging, or is the bat the direct cause because it connects directly with the ball? Which one of us is the indirect cause?
What is the right way of reasoning in such situations?