from modules.nodes.state import ChatState def increment_tool_calls(state: ChatState): state["tool_calls"] = state.get("tool_calls", 0) + 1 return state