OPINION AND ORDER
KRAMER, JUDGE:Petitioners, Stanton Health Facilities, et al., filed a petition for writ of mandamus to require the trial court to rule upon its motion to compel arbitration and to stay pretrial discovery pending resolution of the motion to compel arbitration. Having considered the petition for writ of mandamus, the response, and being otherwise sufficiently advised, the Court ORDERS that the petition be, and it is hereby, GRANTED.
On May 29, 2013, Real Party in Interest, Taffy Alexander, filed suit against Stanton Health in Powell Circuit Court alleging negligence in the care and medical treatment provided to her father, John D. Clemons, Sr. Stanton Health denied the allegations of negligence and asserted that the dispute was governed by an arbitration agreement between Stanton Health and Clemons, Sr.
On September 25, 2013, Stanton Health filed a motion to compel arbitration. In response, Alexander claimed that Clemons, Sr. lacked -the mental capacity to enter into the arbitration agreement. Following a hearing, the trial court deferred ruling upon the motion to compel arbitration to allow limited discovery on the circumstances surrounding the signing of the agreement.
On April 15, 2014, Stanton Health filed a renewed motion to compel arbitration. On May 7, 2014, the trial court granted Alexander leave to file an amended complaint. In an order entered on June 2, 2014, the trial court again deferred ruling on the motion to compel arbitration and ordered the parties to proceed with pretrial discovery. This petition for writ of mandamus followed.
Extraordinary writs may be granted upon a showing that: (1) “the lower court is proceeding or is about to proceed outside of its jurisdiction and there is no remedy through an application to an intermediate court,” or (2) “the lower court is acting or is about to act erroneously, although within its jurisdiction, and there exists no adequate remedy by appeal or otherwise,” and “great injustice and irreparable injury will result if the petition is not granted.” Hoskins v. Maricle, 150 S.W.3d 1, 10 (Ky. 2004).
Stanton Health first argues that the trial court lacked jurisdiction to order *314pretrial discovery without ruling on its motion to compel arbitration. We disagree.
It is well established that arbitration agreements do not divest a trial court of jurisdiction. Ernst & Young, LLP v. Clark, 323 S.W.3d 682, 692 (Ky.2010). Instead, the arbitration agreement simply passes “the trial court’s broad discretion to decide all issues pertaining to pre-hearing procedures, including discovery, all issues of substantive law, and all evidentiary matters passes to the arbitrator.” Id. Then, “[t]he trial court’s function is constricted to the simple entry of a final judgment enforcing the arbitrator’s decision.” Id. Therefore, we conclude that the trial court acted within its jurisdiction.
Next, Stanton Health argues that the trial court acted erroneously within its jurisdiction by deferring its ruling on the motion to compel arbitration and allowing pretrial discovery to proceed. We agree.
We must first determine whether Stanton Health has satisfied the requirements for the issuance of a writ. Kentucky Revised Statutes (KRS) 417.220 does not provide for the appeal of an order deferring a ruling on a motion to compel arbitration. Further, our Supreme Court has recognized that “[tjhere will rarely be an adequate remedy on appeal if the alleged error is an order that allows discovery.” Grange Mut Ins. Co. v. Trude, 151 S.W.3d 803, 810 (Ky.2004).
Our Supreme Court has held that the improper denial of a motion to compel arbitration constitutes irreparable injury. North Fork Collieries, LLC v. Hall, 322 S.W.3d 98, 103 (Ky.2010). The irreparable injury does not result from the cost of litigation. Id. Instead, irreparable injury results from the denial of a party’s “bargained-for contractual right to proceed in another forum.” Id. To require a party to proceed to defend an action in the trial court would destroy the contractual right to arbitration. Id. The destruction of that right cannot “be vindicated by an ordinary appeal at the conclusion of the trial.” Id.
While the trial court did not deny the motion to compel arbitration, it required Stanton Health to engage in discovery on the merits of the claim prior to ruling on the motion to compel arbitration. Under the reasoning of North Fork Collieries, supra, we conclude that Stanton Health has demonstrated irreparable injury. Therefore, we turn to the merits of the petition.
KRS 417.060 states:
(1) On application of a party showing an agreement described in KRS 417.050, and the opposing party’s refusal to arbitrate, the court shall order the parties to proceed with arbitration. If the opposing party denies the existence of the agreement to arbitrate, the court shall proceed summarily to the determination of the issue so raised. The court shall order arbitration if found for the moving party; otherwise, the application shall be denied.
(2) On application, the court may stay an arbitration proceeding commenced or threatened on a showing that there is no agreement to arbitrate. Such an issue, when in substantial and bona fide dispute, shall be forthwith and summarily tried and the stay ordered if found for the moving party. If found for the opposing party, the court shall order the parties to proceed to arbitration.
(3) If an issue referable to arbitration under the alleged agreement is involved in an action or proceeding pending in a court having jurisdiction to hear applications under subsection (1) of this section, the application shall be made therein. Otherwise and subject to KRS 417.210, the application may be made in any court of competent jurisdiction.
*315(4) Any action or proceeding involving an issue subject to arbitration shall be stayed if an order for arbitration or an application therefor has been made under this section; or if the issue is sever-able, the stay may be with respect thereto only. When the application is made in such action or proceeding, the order for arbitration shall include such stay.
(5) An order for arbitration shall not be refused on the ground that the claim in issue lacks merit or bona fides or because any fault or grounds for the claim sought to be arbitrated have not been shown.
(Emphasis added). The plain language of KRS 417.060 directs that a trial court “shall proceed summarily” to the determination of a motion to compel arbitration. KRS 417.060(4) requires a trial court to stay “[a]ny action or proceeding” pending the determination of a motion to compel arbitration.
When confronted with a motion to compel arbitration, the task of the trial court “is simply to decide under ordinary contract law whether the asserted arbitration agreement actually exists between the parties and, if so, whether it applies to the claim raised in the complaint.” North Fork Collieries, 822 S.W.3d at 102. “If an arbitration agreement is applicable, the motion to compel arbitration should be granted.” Id. The trial court should not weigh the equities of the situation or assess the merits of the underlying controversy. Id.
Further, as stated above, requiring a party to defend an action in court irreparably destroys the right to arbitration. Id. at 108. The costs and burdens of defending an action include pretrial discovery. See generally Breathitt County Bd. of Educ. v. Prater, 292 S.W.3d 883, 886 (Ky. 2009).
The trial court appropriately ordered limited discovery on the issue of arbitrability. However, we conclude that the trial court erred by allowing discovery to proceed on the merits of the underlying claim while the motion to compel arbitration was pending. Therefore, we issue a writ of mandamus.
Accordingly, the Court ORDERS that the petition for writ of mandamus be, and it is hereby, GRANTED.
ALL CONCUR.