A mechanic's lien on real property may be enforced against such property, and against a person liable for the debt upon which the lien is founded, by an action, by the lienor, his assignee or legal representative, in the supreme court or in a county court otherwise having jurisdiction, regardless of the amount of such debt, or in a court which has jurisdiction in an action founded on a contract for a sum of money equivalent to the amount of such debt.
N.Y. Lien Law § 41