Edwards asserts in his propositions of law that the court of appeals abused its discretion in sua sponte denying the writ on the basis that R.C. 3319.16 provided him an adequate remedy at law where the pertinent collective bargaining agreement was not before the court.
This court reviews the summary dismissal of a complaint upon a finding of an adequate remedy at law by determining if the court of appeals abused its discretion. State ex rel. Hipp v. N. Canton (1994), 70 Ohio St.3d 102, 103, 637 N.E.2d 317, 318, citing State ex rel. Pressley v. Indus. Comm. (1967), 11 Ohio St.2d 141, 40 O.O.2d 141, 228 N.E.2d 631, paragraph ten of the syllabus. The term “abuse of discretion” connotes more than an error of law or judgment; it implies that the court’s attitude is unreasonable, arbitrary, or unconscionable. State ex rel. Cassels v. Dayton City School Dist. Bd. of Edn. (1994), 69 Ohio St.3d 217, 223, 631 N.E.2d 150, 155.
The court of appeals entered its judgment of dismissal based only on Edwards’s complaint, without any Civ.R. 12(B) motion before it. Although appellees filed an answer on the same day the court of appeals entered judgment, the court considered only the complaint in its decision.1
*108The Rules of Civil Procedure neither expressly permit nor forbid courts to sua sponte dismiss complaints. Generally, a court may dismiss a complaint on its own motion pursuant to Civ.R. 12(B)(6), failure to state a claim upon which relief may be granted, only after the parties are given notice of the court’s intention to dismiss and an opportunity to respond. Mayrides v. Franklin Cty. Prosecutor’s Office (1991), 71 Ohio App.3d 381, 383-384, 594 N.E.2d 48, 50; Prosen v. Dimora (1992), 79 Ohio App.3d 120, 124, 606 N.E.2d 1050, 1052; Besser v. Griffey (1993), 88 Ohio App.3d 379, 623 N.E.2d 1326; Perez v. Ortiz (C.A.2, 1988), 849 F.2d 793, 797-798; Morrison v. Tomano (C.A.6, 1985), 755 F.2d 515, 516-517. However, some courts have recognized an exception to the general rule, allowing sua sponte dismissal without notice where the complaint is frivolous or the claimant obviously cannot possibly prevail on the facts alleged in the complaint. See Baker v. Dir., U.S. Parole Comm. (C.A.D.C.1990), 916 F.2d 725, and English v. Cowell (C.A.7, 1993), 10 F.3d 434, analyzing the similarly worded Fed.R.Civ.P. 12. For the reasons that follow, Edwards’s mandamus claim is not frivolous, nor would reversal necessarily be futile.
It is evident that the court of appeals dismissed Edwards’s complaint based upon Civ.R. 12(B)(6), i.e., it held that Edwards possessed an adequate legal remedy via R.C. 3319.16, which precluded mandamus relief. In determining whether a complaint states a claim upon which relief can be granted, all factual allegations of the complaint must be presumed to be true and all reasonable inférences must be made in favor of the nonmoving party. Perez v. Cleveland (1993) , 66 Ohio St.3d 397, 399, 613 N.E.2d 199, 200. Additionally, in order to dismiss a complaint under Civ.R. 12(B)(6), it must appear beyond doubt that relator can prove no set of facts warranting relief. State ex rel. Seikbert v. Wilkinson (1994), 69 Ohio St.3d 489, 490, 633 N.E.2d 1128, 1129, citing O’Brien v. Univ. Community Tenants Union, Inc. (1975), 42 Ohio St.2d 242, 71 O.O.2d 223, 327 N.E.2d 753, syllabus.
We have previously noted that Civ.R. 12(B)(6) motions attack the sufficiency of the complaint and may not be used to summarily review the merits of a cause of action in mandamus. State ex rel. Horwitz v. Cuyahoga Cty. Court of Common Pleas, Probate Div. (1992), 65 Ohio St.3d 323, 325, 603 N.E.2d 1005, 1007; Assn. for the Defense of the Washington Local School Dist. v. Kiger (1989), 42 Ohio St.3d 116, 117, 537 N.E.2d 1292, 1293. We have further stated that a claim that a *109relator possesses an adequate legal remedy precluding a writ of mandamus seeks an adjudication on the merits, which is normally improper in a Civ.R. 12(B)(6) determination. State ex rel. Birdsall v. Stephenson (1994), 68 Ohio St.3d 353, 355, 626 N.E.2d 946, 949. Nevertheless, in other cases, we have affirmed dismissals pursuant to Civ.R. 12(B)(6) based upon the existence of an adequate remedy at law. State ex rel. Sobczak v. Skow (1990), 49 Ohio St.3d 13, 14, 550 N.E.2d 455, 456; State ex rel. Daggett v. Gessaman (1973), 34 Ohio St.2d 55, 63 O.O.2d 88, 295 N.E.2d 659, paragraph three of the syllabus.
In reconciling this seeming conflict, we interpret the language of Kiger, Horwitz, and Birdsall to be limited to the precept that a Civ.R. 12(B)(6) dismissal based upon the merits is unusual and should be granted with caution, rather than setting forth a new standard. As always, the applicable standard is that set forth in O’Brien, supra. In other words, Civ.R. 12(B)(6) is appropriate in certain cases where “merits” issues are raised. For example, Civ.R. 12(B)(6) dismissal is proper where the claim for mandamus relief arises from a contract which is incorporated in and attached to the complaint, and the contract indicates that the relief requested is not warranted. See 4 Harper, supra, at 345-346, Section 152.12, fn. 8; see, also, 2A Moore’s Federal Practice (2 Ed.1994) 12-90 to 12-91, Section 12.07E2. — 5] (“material which is submitted as part of the complaint * * * may be considered by the court” [footnotes omitted] under Fed.R.Civ.P. 12[b][6]); cf. McCormac, Ohio Civil Rules Practice (2 Ed.1992) 149, Section 6.20 (statute of limitations may be raised by a Civ.R. 12[B][6] motion where the bar is apparent from the face of the complaint).
Nevertheless, despite the general rule that a plaintiff or relator is not required to prove his or her case at the pleading stage and need only give reasonable notice of the claim, “[i]n a few carefully circumscribed cases, this court has modified the standard for granting a motion to dismiss by requiring that the plaintiff plead operative facts with particularity.” York v. Ohio State Hwy. Patrol (1991), 60 Ohio St.3d 143, 145, 573 N.E.2d 1063, 1065, citing Mitchell v. Lawson Milk Co. (1988), 40 Ohio St.3d 190, 532 N.E.2d 753 (employee’s intentional tort claim against employer) and Byrd v. Faber (1991), 57 Ohio St.3d 56, 565 N.E.2d 584 (negligent hiring claim against religious institution). These cases have required “fact” rather than “notice” pleading because of important public policy considerations. York, supra, 60 Ohio St.3d at 145, 573 N.E.2d at 1065. We have also required pleading of specific facts in certain mandamus cases involving inmates, see State ex rel. Hickman v. Capots (1989), 45 Ohio St.3d 324, 544 N.E.2d 639; State ex rel. Seikbert, supra; State ex rel. Carter v. Wilkinson (1994), 70 Ohio St.3d 65, 637 N.E.2d 1, and recently, in all original actions, except habeas corpus, filed in this court. S.Ct.Prac.R. X(4)(B) (“All complaints shall contain a specific statement of facts upon which the claim for relief is based * * *.”). Similarly, for habeas corpus actions, a petitioner must disclose his *110claim with particularity in order to avoid dismissal under R.C. 2725.06. Hammond v. Dallman (1992), 63 Ohio St.3d 666, 590 N.E.2d 744.
In the case at bar, Edwards claims that he was wrongfully discharged from his employment as a teacher. The court of appeals dismissed the complaint based on the holding of this court in State ex rel. Webb v. Bryan City School Dist. Bd. of Edn. (1984), 10 Ohio St.3d 27, 32, 10 OBR 178, 183, 460 N.E.2d 1121, 1125 (since R.C. 3319.16 provides administrative and judicial remedies to review a teacher’s claim of wrongful discharge, R.C. 3319.16 is an adequate legal remedy precluding mandamus relief). However, State ex rel. Webb preceded the enactment of R.C. 4117.10(A), which allows public employment collective bargaining agreements to supersede provisions of the Revised Code.
In State ex rel. Hipp, supra, 70 Ohio St.3d at 103-104, 637 N.E.2d at 319, we recently reversed a court of appeals’ summary dismissal of a mandamus action based upon its finding of an adequate remedy at law:
“Given only the pleadings in this case, with no information as to the contents of any collective bargaining agreement, grievance procedure, or protest procedure, we fail to see how the court of appeals could have perceived that appellant had an adequate legal remedy. * * * Accordingly, we find that the court of appeals abused its discretion by summarily dismissing the case on the merits.”
Similarly, Edwards’s complaint states that he has no adequate legal remedy, and there is no collective bargaining agreement incorporated in and attached to his complaint. Even though a collective bargaining agreement and a supplemental agreement were attached to appellees’ answer, the court of appeals did not consider the answer and, further, could not in a Civ.R. 12(B)(6) determination. See, e.g., State ex rel. Freeman v. Morris (1991), 62 Ohio St.3d 107, 579 N.E.2d 702. This is not a case which falls under one of the recognized exceptions to the general requirement of notice pleading. There is a “set of facts, consistent with the [relator’s] complaint, which would allow the [relator] to recover.” York, supra, 60 Ohio St.3d at 145, 573 N.E.2d at 1065. Therefore, based solely on the complaint, it is not beyond doubt that Edwards can prove no set of facts warranting relief. Accordingly, the court of appeals abused its discretion in summarily dismissing Edwards’s mandamus claim.
The court of appeals dismissed the entire complaint, including Edwards’s declaratory judgment claim. Edwards does not contend on appeal that dismissal of this claim was improper, and it is axiomatic that courts of appeals lack original jurisdiction over declaratory judgment actions. Section 3(B), Article IV, Ohio Constitution. Since Edwards’s claim for declaratory judgment is so obviously inappropriate that remand on this claim would be an exercise in futility, the court of appeals’ sua sponte dismissal of the complaint is affirmed as to that claim.
*111Finally, appellees claim that the court of appeals did not abuse its discretion by dismissing the complaint as to appellees Ellis and Nissen because Edwards never alleged in his complaint “any action by either of them contrary to his interests” and never sought “relief with respect to either of them.” Contrary to appellees’ assertions, Edwards alleged in his complaint that “[a]s a result of Respondent/Defendants [sic ] failure to comply with O.R.C. § 3319.16, Relator/Plaintiff [sic ] is entitled to reemployment and back pay.” (Emphasis added.) Further, Edwards requested a writ of mandamus against all appellees. Therefore, appellees’ argument in this regard is without merit.
Accordingly, the judgment of the court of appeals is affirmed as to the declaratory judgment claim and is reversed and remanded for further proceedings as to the mandamus claim.
Judgment affirmed in part, reversed in part and cause remanded.
Moyer, C.J., Wright, Resnick, F.E. Sweeney, Pfeifer and Cook, JJ., concur. Douglas, J., concurs in part and dissents in part.. Even assuming, arguendo, that the answer was before the court of appeals, Civ.R. 12(D) would still have required appellees to file an application in the form of a Civ.R. 12(B) motion in order to request a pretrial adjudication on the Civ.R. 12(B) issues included in their answer. McGlone v. Grimshaw (1993), 86 Ohio App.3d 279, 286-287, 620 N.E.2d 935, 939-940 (Stephenson, J., concur*108ring); see, also, 4 Harper, Anderson’s Ohio Civil Practice (1987) 332, Section 152.07 (A Civ.R. 12[D] “ ‘application’ is a motion; hence a motion must be served and filed in order to call to the court’s attention the defenses which should be disposed of preliminarily. And therein lies the practical problem of raising a ‘motion’ defense by responsive pleading.” [Footnote omitted.]); 1 Klein, Browne & Murtaugh, Baldwin’s Ohio Civil Practice (1988) 47, Section T 15.01. Since appellees never filed a motion requesting judgment, it is manifest that the court of appeals dismissed the complaint on its own motion.