If the court finds that the whole or part of litigation is not subject to its jurisdiction, it transfers the litigation sua sponte to the court of jurisdiction.
裁判所は、訴訟の全部又は一部がその管轄に属しないと認めるときは、申立てにより又は職権で、これを管轄裁判所に移送する。
Notwithstanding the provisions of the preceding paragraph, even if the litigation is subject to the jurisdiction of a summary court that is under its territorial jurisdiction, the district court, upon petition or sua sponte, may conduct the trial and reach a judicial decision itself for the whole or part of the litigation, if it finds this to be appropriate; provided, however, that this does not apply if the litigation is subject to the exclusive jurisdiction of such a summary court (excluding exclusive jurisdiction determined by an agreement between the parties pursuant to the provisions of Article 11).
Read this with the articles around it
summary court
簡易裁判所
One of the four kinds of lower court (下級裁判所) beneath the Supreme Court, with the high courts (高等裁判所), the district courts (地方裁判所) and the family courts (家庭裁判所) (Courts Act, Article 1, and Article 2, paragraph (1)). A summary court has jurisdiction at first instance over civil claims whose value does not exceed 1.4 million yen, other than claims in administrative cases, and over criminal cases for offences punishable by no more than a fine or for which a fine is one of the penalties the law allows, among others (Article 33, paragraph (1)). A petition for court mediation goes, unless a special rule says otherwise, to the summary court for the place where the other party lives or has its business office or other office, or to a district court or summary court the parties agree on (Civil Mediation Act, Article 3, paragraph (1)).
Written for this site using Courts Act, Arts. 1, 2, 33 and Civil Mediation Act, Art. 3 as a reference.