get_tool_calls function

Get tool calls helper function