The state's attorney may commence and prosecute actions in the name of and on behalf of the county as provided in this chapter.
If in the opinion of the state's attorney the commencement and prosecution of any action is necessary to protect the interests of the county in any matter or to recover any money due the county from any person, the state's attorney may present to the judge of the circuit court of the circuit in which the county is situated a summons and complaint in such matter and ask leave of the judge to commence such action. If it appears to the judge that the interests of the county presumably require the prosecution of the action, the judge shall endorse the summons. Then the state's attorney may commence and prosecute the action.
SDCL 7-19-1