Rugg, C.J.
This is a petition for a writ of prohibition. The petitioner alleges that she is plaintiff in an action of tort now pending in the Superior Court and already assigned for trial; that the defendant therein filed a motion requesting the court to determine her mental condition in accordance with G. L. c. 123, § 99; and that the motion is being entertained and evidence heard thereon in the Superior Court. The respondents demurred.
The case comes before us on exceptions wherein it is said that at the hearing before the single justice no evidence was heard, the case being presented on statements of counsel for the petitioner and on exhibits introduced by him. That was irregular. On a demurrer only questions of law raised by the causes assigned in the demurrer are proper for consideration. No evidence by testimony, by statements of counsel or by exhibits rightly can be received. The bill of exceptions when critically analyzed sets forth nothing except matters open for consideration on the demurrer.
*437It is provided by G. L. c. 123, § 99, that "In order to determine the mental condition of any person coming before any court of the Commonwealth, the presiding judge may, in his discretion, request the department to assign a member of the medical staff of a state hospital to make such examinations as he may deem necessary. No fee shall be paid for such examination, but the examining physician may be reimbursed for his reasonable traveling expenses.” This statute, although placed in the General Laws under a heading “Insane Prisoners, etc.,” is equally applicable to civil as to criminal cases. That is apparent from the original act which was St. 1918, c. 153. It was there phrased in general terms and was not confined to criminal cases. The inclusion of this provision in said § 99 did not work any change in its scope. Main v. County of Plymouth, 223 Mass. 66. In this respect the case at bar is distinguishable from Boston & Maine Railroad v. Billerica, 262 Mass. 439, 449. The statute provides a simple, efficient and impartial method of determining a subject which apart from the statute is within the jurisdiction of the court. Whenever genuine question arises in the trial of a cause whether a party to an action is capable of conducting the litigation by reason of minority or mental incapacity, it is the duty of the court to ascertain the fact and in case a finding is made that such incapacity exists to cause some competent person to be appointed to conduct the litigation. As was said in Welch v. Fox, 205 Mass. 113, 114: "No citation of authorities is needed in support of the propositions, first, that a court may, and indeed should, appoint a guardian ad litem for a litigant in a case before it whenever by reason of minority or mental unsoundness one is required; and second, that whenever the question arises . . . whether such a guardian is required the court has jurisdiction to consider and decide it.” Denny v. Denny, 8 Allen, 311. The statute provides highly appropriate machinery for the performance of a general duty resting on the court. The circumstance that attention is directed to the mental condition of a party by the opposing party in the litigation is no reason why the court should *438not consider and cause to be investigated the matter, and act in accordance with the finding made. The single justice rightly ordered the petition dismissed.
Exceptions overruled.