
632 N.W.2d 225 (2001)
In re STATE of Minnesota, Petitioner.
State of Minnesota, Respondent,
v.
Nathaniel James Wilson, Appellant.
No. C3-00-2071.
Supreme Court of Minnesota.
September 6, 2001.
*226 John M. Stuart, State Public Defender, Scott G. Swanson, Assistant State Public Defender, for appellant.
Mike Hatch, Attorney General, Robert A. Stanich, Assistant Attorney General, for respondent.
Heard, considered and decided by the court en banc.

OPINION
RUSSELL A. ANDERSON, Justice.
While in prison, Nathaniel James Wilson requested disposition of an untried complaint against him under the Uniform Mandatory Disposition of Detainers Act (UMDDA). Minn.Stat. § 629.292 (2000). The UMDDA provides that within six months of the receipt of such request or within such additional time as the district court for good cause may grant, the complaint shall be brought to trial. Id., subd. 3. If, after such request, the complaint is not brought to trial within that period, the court no longer has jurisdiction over the complaint and shall dismiss it with prejudice. Id. Before expiration of the six-month period and without deciding whether additional time should be granted, the Stearns County District Court dismissed the complaint against Wilson for failure to timely honor his request for trial. By writ of mandamus, the court of appeals vacated the district court order and remanded for further proceedings under the UMDDA. On appeal to this court, we are asked if a writ of mandamus is available to vacate the district court order and to compel the district court to determine whether to grant additional time for the complaint to be brought to trial. We conclude that the writ of mandamus is available for these purposes. We also consider whether the six-month period is tolled pending final resolution of Wilson's motion, and subsequent appellate review, and we conclude that it is. We affirm.
Wilson was charged in Stearns County on March 30, 2000, with racketeering in violation of Minn.Stat. §§ 609.903, subd. 1(1), 609.904, subds. 1, 2 (2000).[1] On June 14, 2000, Wilson, an inmate at a Minnesota correctional facility, requested final disposition of the complaint under the UMDDA. The Stearns County District Court received the request on June 22, 2000. Wilson's request was delivered to the Stearns County Attorney, who forwarded it to the prosecuting attorney identified in the complaint, an assistant attorney general. The office of the attorney general received the request on June 26, 2000.[2]
On October 19, 2000, approximately four months after receipt of the request, Wilson was arraigned. At this first court appearance the state disclosed nearly 5,000 pages *227 of discovery documents. The following day, a public defender was appointed to represent Wilson. Approximately two weeks later, Wilson moved to dismiss the complaint because the state failed to "timely honor" his request for trial under the UMDDA. Wilson argued that the UMDDA required that he be brought to trial within six months of receipt of his request and that, because of the state's delay in arraigning him, it was impossible to complete discovery and prepare for trial within the time remaining in the six-month period.
On November 28, 2000, approximately one month before expiration of the six-month period, the district court granted Wilson's motion. The district court conceded that under the UMDDA it could not "technically" dismiss the complaint before expiration of the six-month period. The district court concluded that the state was negligent because of the delay of four months from receipt of Wilson's request to his arraignment and that Wilson could not receive a fair trial in the short time remaining in the six-month period. According to the district court, defense counsel could not adequately prepare for trial before expiration of the six-month period because of the complexity of the case and the volume of discovery. The district court rejected the state's offer either to try the case within the six-month period or to agree to a continuance. According to the district court, Wilson should not have to choose between agreeing to a continuance, thereby waiving his right to dismissal at the expiration of the six-month period, or going to trial unprepared.
The state petitioned the court of appeals for a writ of mandamus compelling the district court to reinstate the complaint and either schedule trial before expiration of the six-month period or grant a continuance. The court of appeals granted the writ "in part" by vacating the district court's order dismissing the complaint and by remanding to the district court "for further proceedings under Minn.Stat. § 629.292, subd. 3 [2000]." In its order, the court of appeals directed the district court to determine whether to grant, for good cause shown, additional time for the complaint to be brought to trial but did not direct the district court to schedule trial immediately or grant a continuance, as the state requested.
The first issues we consider are (1) whether mandamus is available to vacate a district court order, issued before expiration of the six-month period, dismissing a complaint for failure to timely comply with a request for trial, and (2) whether mandamus is available to compel the district court to determine whether, for good cause shown, to grant additional time for the complaint to be brought to trial. The issues are legal, requiring interpretation of statutes, and our review is de novo. Scott v. Minneapolis Police Relief Ass'n, Inc., 615 N.W.2d 66, 70 (Minn.2000).
The authority to issue a writ of mandamus is statutory. Minn.Stat. § 586.01 (2000);[3]McIntosh v. Davis, 441 N.W.2d 115, 118 (Minn.1989). A writ of mandamus may issue only to enforce a clear present duty.[4]State ex rel. Brenner *228 v. Hodapp, 234 Minn. 365, 370, 48 N.W.2d 519, 522 (1951). A writ of mandamus is not available to control judicial discretion, but the writ may require a lower court to exercise its judgment when there is a clear statutory duty to do so. See Minn.Stat. § 586.01.
To determine whether mandamus is available, we address whether the UMDDA imposes clear statutory duties on the district court. When the language of the statute is plain and unambiguous, we must give the statute its plain meaning. See Minn.Stat. § 645.16 (2000); Kersten v. Minn. Mut. Life Ins. Co., 608 N.W.2d 869, 874-75 (Minn.2000).
We do not read the UMDDA to impose a duty on the district court to schedule trial before expiration of the six-month period since scheduling trials is left to the sound discretion of the district court. See McIntosh, 441 N.W.2d at 119. Nor is the district court required to grant additional time for the complaint to be brought to trial. We agree with the court of appeals that, under the UMDDA, whether good cause exists to grant additional time beyond the six-month period is within the judicial discretion of the district court. State v. Miller, 525 N.W.2d 576, 580 (Minn.App.1994); see also State v. Sanders, 598 N.W.2d 650, 654 (Minn.1999).
If the district court does not schedule trial within the six-month period, however, we read the UMDDA to impose a clear statutory duty on the district court to determine whether good cause exists to grant additional time beyond that period. Minn.Stat. § 629.292, subd. 3.[5] Once the district court and prosecuting attorney have received the request, the complaint "shall be brought to trial" within six months "or within such additional time as the court for good cause shown in open court may grant." Id. (emphasis added). By use of the disjunctive or and the mandatory shall, the statute requires that the district court either set trial within six months or determine whether to grant additional time for good cause shown. Therefore, if the court does not set trial within the six-month period, it has a clear statutory duty within that six-month period to exercise its discretion in determining whether to grant additional time for good cause shown.
If, after receipt of a prisoner's request, the complaint is not brought to trial within "that period," meaning the six-month period or any additional time granted, the court shall no longer have jurisdiction over the complaint and the court shall dismiss the complaint with prejudice. Id. Thus, the court loses jurisdiction over the complaint and must dismiss with prejudice only if the complaint is not brought to trial within "that period." Id. Until that time, however, there remains an opportunity to demonstrate good cause for additional time. Therefore, we conclude that the district *229 court's failure to make a determination whether to grant additional time for the complaint to be brought to trial eliminated the state's ability within the statutory six-month period to demonstrate good cause for additional time.
We look next at the district court order to determine whether the district court acted in accordance with its clear statutory duty either to set trial within the six-month period or to determine whether to grant additional time. Wilson argues that the district court implicitly decided not to grant additional time and that it is not appropriate to order the district court again to decide it. The state argues that the district court did not decide whether to grant additional time beyond the six-month period and, therefore, mandamus is available.
Our review of the district court order reveals that its focus is on whether Wilson could receive a fair trial within the time remaining in the six-month period. The district court did not decide whether to grant additional time beyond the six-month period even though it acknowledged that it could make such a decision. The court determined that the state was negligent by delaying Wilson's arraignment for four months and that Wilson could not receive a fair trial within the time remaining in the six-month period. The court's finding of negligence because of the four-month delay, however, is not the same as a finding that good cause has not been shown to grant additional time beyond the six-month period. The court could conceivably find that despite the state's negligence, good cause for a continuance exists. In stating that, we also recognize that on this record the court could properly deny a continuance for lack of good cause. In any event, because it does not appear on this record that the court determined whether good cause for a continuance existed, and the UMDDA imposes on the court a duty to make that determination, issuance of the writ was proper.
We conclude that a writ of mandamus is available to vacate a district court order that dismisses a complaint for violation of the UMDDA's six-month period before expiration of the six-month period. We also conclude that a writ of mandamus is available to compel the district court to make a determination whether to grant additional time for the complaint to be brought to trial if the court did not schedule trial within the six-month period and did not exercise its discretion in determining whether additional time should be granted for good cause shown. We hold that the district court erred when it dismissed the complaint without deciding whether to grant additional time, for good cause shown, for the complaint to be brought to trial.
The last issue we consider is whether the UMDDA's six-month period is tolled during the pendency of a motion to dismiss the complaint for failure to comply with the time period. Determining whether the court retains jurisdiction is a legal issue and our review is de novo. State v. Pflepsen, 590 N.W.2d 759, 763 (Minn.1999).
Wilson argues that if the complaint is not brought to trial within six months of receipt of the request the plain language of the UMDDA requires that the complaint be dismissed with prejudice. Wilson further argues that appellate proceedings have no effect on the six-month period because the UMDDA makes no exceptions for appellate proceedings. The state argues that when a defendant causes a delay, the delay must be attributed to the defendant and that time must be excluded from the UMDDA's six-month period.
We have not directly addressed whether a motion to dismiss for failure to "timely *230 honor" a prisoner's request for final disposition under the UMDDA, and subsequent appellate proceedings, tolls the running of the UMDDA six-month deadline. We look to other states with laws similar to those of Minnesota to provide guidance. See Elecs. Unlimited Inc. v. Vill. of Burnsville, 289 Minn. 118, 123, 182 N.W.2d 679, 683 (1971); see also State ex rel. Kemp v. Hodge, 629 S.W.2d 353, 359 (Mo.1982) ("[C]ases which have interpreted [the UMDDA] in the other jurisdictions which have adopted the uniform act * * * are valuable for interpreting the statute.") We also look for guidance from the UMDDA's counterpart, the Interstate Agreement on Detainers (IAD).[6]Johnson, 939 P.2d at 820 ("Both the IAD and the UMDDA reflect the same policy of facilitating the speedy disposition of untried charges upon a proper request by an incarcerated person * * *.").
States that have enacted the UMDDA and IAD permit tolling of the statutory time limit when the defendant caused or created the delay. People v. Bell, 669 P.2d 1381, 1384 (Colo.1983) ("If the delay is caused by, agreed to, or created at the instance of the defendant, it will be excluded from the speedy-trial calculation made by the court."); Commonwealth v. Flores, Nos. CRIM. A. 91-493, CRIM. A. 91-494, 1998 WL 792466 at *3 (Mass.Super.Ct. Nov. 6, 1998) ("[T]he defendant filed the present motion to dismiss the indictments [under the IAD] which tolls the running of the 180 day clock until it is decided."); State v. Carlson, 258 N.W.2d 253, 258-59 (N.D.1977) (tolling the UMDDA time period when defendant delayed entry of a plea, sought a continuance, filed a habeas corpus petition and relieved and obtained counsel). To hold otherwise would allow defendants to trigger a UMDDA violation simply by pursuing a motion to dismiss the complaint.
We hold that Wilson's motion to dismiss for failure to timely honor his UMDDA request for final disposition of a criminal charge caused a delay in bringing the matter to trial, that this delay is attributable to Wilson, and that the UMDDA's six-month period is therefore tolled until final disposition of his motion.
Affirmed.
NOTES
[1]  The complaint alleges that Wilson and ten other individuals engaged in racketeering in Stearns, Clay, Benton and Hennepin Counties in Minnesota and Cass County, North Dakota, over the course of nearly four years.
[2]  Wilson claims that the six-month time limit began to run June 20, 2000, when the Stearns County Attorney received the request for disposition. The statute requires that the "prosecuting attorney" receive the request and in this case, the attorney general is the prosecuting attorney. The attorney general did not receive the request until June 26, 2000. Apparently, the district court had receipted for the request by that date. Arguably, the UMDDA six-month time limit commenced June 26, 2000. Because the district court's order dismissing this complaint occurred approximately one month before expiration of the six-month period, we need not decide when the time limit on the UMDDA began to run.
[3]  The writ of mandamus may be issued to any inferior tribunal * * * to compel the performance of an act which the law specially enjoins as a duty resulting from an office, trust, or station. It may require an inferior tribunal to exercise its judgment * * * but it cannot control judicial discretion.

Minn.Stat. § 586.01.
[4]  Where a party has an adequate remedy by appeal, ordinarily a writ of mandamus is not available. State v. Davis, 592 N.W.2d 457, 459 (Minn.1999). We question whether the state had an adequate remedy through appeal in this case; however, Wilson has not challenged issuance of the writ on this basis and we decline to address the issue.
[5]  Within six months after the receipt of the request and certificate by the court and prosecuting attorney, or within such additional time as the court for good cause shown in open court may grant, the prisoner or counsel being present, the indictment or information shall be brought to trial * * *. If, after such a request, the indictment or information is not brought to trial within that period, no court of this state shall any longer have jurisdiction thereof, nor shall the untried indictment or information be of any further force or effect, and the court shall dismiss it with prejudice.

Minn.Stat. § 629.292, subd. 3 (emphasis added).
The UMDDA also permits the parties to stipulate "for a continuance" and permits the court to grant a continuance "on notice to the attorney of record and opportunity for the attorney to be heard." Id.
[6]  Minn.Stat. § 629.294 (2000). See Johnson v. People, 939 P.2d 817, 819 (Colo.1997) (describing the UMDDA as an intrastate detainer provision involving prisoners in the custody of a state department of corrections who have charges from that state pending against them). The IAD is similar to the UMDDA but is based on federal law and applies to inmates with charges pending in another state. Johnson, 939 P.2d at 819; Minn.Stat. § 629.294.
