If the vis was 3km and you were either above 3,000ft or going faster than 140kts, then you were below VMC minima in class D airspace and therefore flying IFR. Given that the commander knows (or should know) he's IFR, then it seems ATC were quite reasonable to give you an IFR arrival. A VFR pilot in IMC (which are the conditions you describe) should declare this (and possibly an emergency with it).
Of course, if you were below 3,000ft and less than 140kts then you could have been in Class D VFR or IFR, so ATC would need to ask.
What were you speed and altitude at the time?
As well as making it clear whether you are flying IFR or VFR, it also demonstrates the importance of knowing the VMC minima!