Presiding Judge.
Mr. Micah Riggs and the Midwest Freedom Coalition (Midwest) (collectively, “Appellants”) appeal the dismissal of their petition for declaratory relief against the Attorney General of Missouri. We affirm.
Factual and Procedural Background
The Missouri Governor Jay Nixon signed into law a bill criminalizing the possession of synthetic cannabinoids, now codified in sections 195.010, 195.017, 195.022, 195.202, and 195.217. A month before the law became effective, Midwest filed a petition seeking a declaratory judgment and an injunction against Attorney General Chris Koster. Midwest asked the circuit court, inter alia, to declare specific provisions of the bill unconstitutional and to enjoin the Attorney General from enforcing them. The Attorney General filed a motion to dismiss the petition on the grounds that Midwest did not have standing and that he was not the proper party to sue.
Thereafter, Midwest filed an amended petition. It provided a description of its members that included those who sell and distribute synthetic cannabinoids and added Mr. Riggs as a plaintiff, describing him as one of those members “actively engaged in the sale, resale, and manufacture of synthetic cannabinoids.” In response, the Attorney General asked the court, inter alia, to dismiss the amended petition. He alleged that Appellants had failed to plead a justiciable controversy because he was not the proper party to enjoin from enforcing those provisions of the newly enacted bill.
The circuit court found that the Attorney General was not the proper party to sue and dismissed the case. Appellants appeal.
Standard of Review
We review the circuit court’s dismissal de novo. Foster v. State, 352 S.W.3d 357, 359 (Mo. banc 2011). We will reverse if the dismissed pleading establishes facts, viewed in the light most favorable to the plaintiff, that substantiate a cause of action against the defending party. See Newman v. Warsaw, 129 S.W.3d 474, 476 (Mo.App. W.D.2004).
Legal Analysis
In their sole point, Appellants argue that the circuit court erred in dismissing the cause of action because the proper defendant was the Attorney General and the proper remedy was an action for declaratory relief.
A petition is properly dismissed when it fails to state a claim upon which relief can be granted. See State ex rel. Mo. Highway & Transp. Comm’n v. Overall, 73 S.W.3d 779, 782 (Mo.App. E.D.2002). A petition that has an improper party as the sole defendant fails to state a claim upon which relief can be granted. Id.
To maintain a declaratory judgment action, the petition must allege facts showing: “(1) a justiciable controversy exists and (2) the party has no adequate remedy at law.” Foster, 352 S.W.3d at 359. The justiciable controversy must be between the parties to the action. See Mo. Health Care Assoc. v. Attorney Gen. of Mo., 953 S.W.2d 617, 621 (Mo. banc 1997). Parties include persons “who have or claim any interest which would be affected by the declaration, and no declaration shall prejudice the rights of persons not parties *26to the proceedings.” § 527.110;1 see also Rule 84.07. Section 527.110 also states,
In any proceeding which involves the validity of a municipal ordinance or franchise, such municipality shall be made a party, and shall be entitled to be heard, and if the statute, ordinance or franchise is alleged to be unconstitutional, the attorney general of the state shall also be served, with a copy of the proceeding and, be entitled to be heard.
(emphasis added). In suits for declaratory judgment, indispensable parties must be included in the action; indispensable parties are those necessary parties whose interest will be affected by “direct operation of the judgment rendered.” Jones v. Jones, 285 S.W.3d 356, 360 (Mo.App. S.D.2009) (internal quotation marks and citation omitted). A justiciable controversy involving the constitutionality of a statute exists between the plaintiff and the state official charged with the duty to enforce that law. See Mo. Health Care Assoc., 953 S.W.2d at 621.
In essence, Appellants argue that the Attorney General was a necessary party under Missouri law. They cite to the italicized language in section 527.110 and to Missouri Health Care for support. To the extent that Appellants are arguing that Missouri Health Care interpreted the italicized language to mean that the Attorney General is a necessary party in actions challenging the constitutionality of statutes, they are incorrect. Although Missouri Health Care quotes the italicized language, the supreme court did not interpret that section. See id. Instead, the supreme court found that the Attorney General was the proper party to defend the law at issue because that law included a section that empowered the Attorney General to enforce it. Id. A similar provision is not present here in the challenged enactments. Thus, Missouri Health Care does not support Appellants’ contention.
We next consider whether the italicized language mandates that the Attorney General is always a proper defendant in a declaratory judgment action simply because the constitutionality of a statute is challenged. In construing a statute, “[w]e have no right to read into the statute an intent which is contrary to the legislative intent made evident by the phraseology employed.” City of St. Louis v. Crowe, 376 S.W.2d 185, 190 (Mo. banc 1964). In section 527.110, the legislature required that the municipality be made a party in actions challenging the validity of ordinances, but did not employ that language when it immediately thereafter addressed actions challenging the constitutionality of laws. Instead, it provided that in those circumstances that the Attorney General “be served a copy of the proceeding and be entitled to be heard.” § 527.110. Because the legislature did not employ the phrase, “shall be made a party” in addressing the Attorney General’s role, we cannot interpret the provision to suggest otherwise. See Crowe, 376 S.W.2d at 190. We conclude that the legislative intent was to provide the Attorney General the option to intervene in such cases as a matter of right, at its discretion, by requiring the party to serve a copy of the proceeding to the Attorney General.2 Thus, the Attor*27ney General is not a necessary party to constitutional challenges under section 527.110.
In the petition, Appellants stated that they were threatened with criminal prosecution under the newly enacted provisions and were in jeopardy of being prosecuted under an unconstitutional law. As stated earlier, justiciable controversy involving the constitutionality of a statute exists between the plaintiff and the state official charged with the duty to enforce that law. See Mo. Health Care Assoc., 953 S.W.2d at 621; see also State ex rel. Reeves v. Brady, 303 S.W.2d 22, 25 (Mo. banc 1957) (finding a local government official was not a proper party because the official’s duties concerning the enforcement of the statute would not be affected by any declaration prayed for in the petition). The local prosecutor is charged with prosecuting criminal actions within its county. § 56.060.3 The Attorney General may also prosecute criminal cases in special circumstances, but these circumstances are not applicable here. See §§ 27.030, 56.110; see also State v. Becker, 938 S.W.2d 267, 268 (Mo. banc 1997) (finding that a particular offense statute gave the Attorney General concurrent jurisdiction with the local prosecutor). Because the local prosecuting attorney was the proper party to sue and a necessary party, Appellants failed to state a claim upon which relief could be granted by naming only the Attorney General. Consequently, the trial court did not err in dismissing the case. See Overall, 73 S.W.3d at 782. Appellants’ point is denied.
Conclusion
For the foregoing reasons, we affirm.
MITCHELL, P.J., and HARDWICK, J. concur.
. Statutory references are to RSMo 2000 and the Cumulative Supplement 2011, unless otherwise indicated. Rule references are to the Missouri Rules of Civil Procedure 2011.
. Our interpretation is consistent with Land Clearance for Redevelopment Authority of City of St. Louis v. City of St. Louis, 270 S.W.2d 58, 63 (Mo. banc 1954). In that case, the Missouri Supreme Court interpreted the italicized language to require that the Attorney General receive notice of declaratory judgment actions challenging the constitutionality of statutes. Id. In doing so, the supreme *27court distinguished the Attorney General's receipt of notice from the Attorney General being a party to the action. Id.; see also Reed v. City of Springfield, 758 S.W.2d 138, 145 (Mo.App. S.D.1988).
. Section 56.060 states,
Each prosecuting attorney shall commence and prosecute all civil and criminal actions in the prosecuting attorney's county in which the county or state is concerned, defend all suits against the state or county, and prosecute forfeited recognizances and actions for the recovery of debts, fines, penalties and forfeitures accruing to the state or county.