Janet Murphy appeals the trial court’s order dismissing with prejudice her complaint seeking a declaratory judgment against Bay Colony Property Owners Association (“Bay Colony”). Because the trial court improperly ruled on the final merits of Murphy’s claim, we reverse the trial court’s order and remand for further proceedings.
In January 2003, James Waller entered into a settlement agreement with Bay Colony that permitted Waller to construct a dock on his property. The agreement, which was binding upon the parties’ successors and assigns, placed restrictions on the construction of the dock and was to run with the land. The agreement also restricted the construction of any boat lifts on the dock without Bay Colony’s approval. Waller subsequently sold his property to Murphy, who sought to change the lift mechanism of the dock. Murphy submitted a formal request to Bay Colony to approve the new boat lift, but Bay Colony denied the request.
In September 2007, Murphy filed a complaint for declaratory relief against Bay Colony and demanded a declaration of her *926rights under the terms of the agreement. Bay Colony moved to dismiss the complaint, arguing that the agreement unambiguously gave it the power to approve or deny Murphy’s request without the requirement of following any procedure or standards in making its decision. After conducting a hearing, the trial court granted Bay Colony’s motion and dismissed Murphy’s action with prejudice on the basis that it failed to state a cause of action.
When ruling on a motion to dismiss for failure to state a cause of action, the trial court must accept the material allegations as true and is bound to a consideration of the allegations found within the four corners of the complaint. Consuegra v. Lloyd’s Underwriters at London, 801 So.2d 111, 112 (Fla. 2d DCA 2001); Davidson v. Iona McGregor Fire Prot. & Rescue Dist., 674 So.2d 858, 859 (Fla. 2d DCA 1996). Thus, the question of whether a complaint states a cause of action is one of law and the standard of review is de novo. Meadows Cmty. Ass’n v. Russell-Tutty, 928 So.2d 1276, 1278 (Fla. 2d DCA 2006).
A complaint for declaratory judgment should not be dismissed if the plaintiff established the existence of a jus-ticiable controversy cognizable under the Declaratory Judgment Act, chapter 86, Florida Statutes (2007). See Thompson v. Fla. Cemeteries, Inc., 866 So.2d 767, 769 (Fla. 2d DCA 2004). As this court has previously stated, “[t]he test for the sufficiency of a complaint for declaratory judgment is not whether the plaintiff will succeed in obtaining the decree he seeks favoring his position, but whether he is entitled to a declaration of rights at all.” X Corp. v. Y Person, 622 So.2d 1098, 1101 (Fla. 2d DCA 1993). Thus, Murphy needed to demonstrate that she “is in doubt as to the existence or nonexistence of some right, status, immunity, power, or privilege and that [s]he is entitled to have such doubt removed.” Id. Murphy must also show a “bona fide, actual, present, and practical need for the declaration.” Id. (citing Platt v. Gen. Dev. Corp., 122 So.2d 48, 50 (Fla. 2d DCA 1960)).
Here, Murphy alleged that she was uncertain as to her rights under the attached agreement because she believed her plan to add the boat lift complied with all of the agreement’s restrictions and requirements. Murphy also argued that Bay Colony’s denial of her request was arbitrary and capricious. We find Murphy established doubt as to the existence of her right to add a boat lift to her dock under the terms of the agreement, and thus demonstrated a bona fide, actual, present, and practical need for the declaration of this right. Hence, she alleged the existence of a justiciable controversy and stated a facially sufficient claim for declaratory relief. See Russellr-Tutty, 928 So.2d at 1280.
However, the trial court, in granting Bay Colony’s motion to dismiss, held that the agreement was not ambiguous because Bay Colony “must give its approval for the improvements Murphy desires.” We find the trial court improperly ruled on the final merits of Murphy’s claim rather than on the sufficiency of her complaint. See id. Therefore, the trial court’s determination was inappropriate at the motion to dismiss stage and cannot be considered a substitute for a motion for summary judgment. Id.; Consuegra, 801 So.2d at 112. Accordingly, we reverse the dismissal of Murphy’s complaint with prejudice and remand for further proceedings.
Reversed and remanded.
NORTHCUTT and VILLANTI, JJ., Concur.