japan-law-mcp
v0.2.0MCP server for Japan's e-Gov 法令API v2 — search, cite and quote Japanese statutes by article, including 附則/別表/号 and point-in-time (asof) lookups.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
search_laws Search laws by title or number
Search Japanese laws by TITLE, number or category — not by body text. Use this to find a law and its ``law_id``; use ``search_laws_by_keyword`` to search the text inside laws.
| Parameter | Type | Description |
|---|---|---|
asof | string | YYYY-MM-DD — return each law as it stood on that date. |
category_cd | string | e-Gov subject category code(s), comma-separated (e.g. "27" 労働). |
law_num | string | Part of the 法令番号, e.g. "平成十五年法律". |
law_title | string | Part of the law name, e.g. "個人情報" or "民法". |
law_type | string | One of Act, CabinetOrder, MinisterialOrdinance, Rule, Constitution. Defaults to "Act"; pass "" to search all types. |
limit | integer | Maximum laws to return (default 10). |
offset | integer | Number of results to skip, for pagination (default 0). |
order | string | Sort key, e.g. "-revision_info.amendment_promulgate_date" for most-recently-amended first. |
promulgation_date_from | string | Only laws promulgated on/after this YYYY-MM-DD. |
promulgation_date_to | string | Only laws promulgated on/before this YYYY-MM-DD. |
search_laws_by_keyword Full-text search across all laws
Full-text search across the BODY of every Japanese law. Use this when you don't know which law says something; use ``search_laws`` when you know the law's name.
| Parameter | Type | Description |
|---|---|---|
keyword * | string | Phrase to find in law text. Supports the e-Gov search syntax, including wildcards (``第*条``) and AND/OR/NOT operators. |
asof | string | YYYY-MM-DD — search the laws as they stood on that date. |
category_cd | string | e-Gov subject category code(s), comma-separated. |
law_type | string | Optional type filter, e.g. "Act" (comma-separated for several). |
limit | integer | Cap on the total number of matched sentences returned across all laws (default 50, e-Gov max 1000) — not a cap on the number of laws. Note: the e-Gov API returns no results when this is smaller than… |
offset | integer | Result offset for pagination (default 0); pass back ``next_offset``. |
sentence_text_size | integer | Characters of context per matched sentence (default 100). |
sentences_limit | integer | Max matched sentences kept per law (default 5). |
find_law_article Find one article of a law
Find a specific article within a Japanese law. Resolves common law names and abbreviations directly (e.g. "民法", "労基法"), then asks e-Gov for that one article via its element path — the whole statute is never downloaded.
| Parameter | Type | Description |
|---|---|---|
article * | string | Article number. Accepts plain numbers ("192"), branch articles ("325条の3"), kanji ("第七百九条"), a paragraph ("第9条第2項") and an item ("第24条第1項第4号"). |
law_name * | string | Law name or abbreviation, e.g. "民法", "会社法", "道交法". |
asof | string | YYYY-MM-DD — the law as it stood on that date. |
provision | string | "main" for 本則 (default) or "suppl" for 附則 (supplementary provisions). 附則 articles reuse main-body numbers, so this matters. |
revision_id | string | An exact ``law_revision_id`` from ``get_law_revisions``; overrides name resolution and ``asof``. |
get_law_element Fetch any element of a law (別表・附則・目次)
Fetch one element of a law by its element path — the raw ``elm`` escape hatch.
| Parameter | Type | Description |
|---|---|---|
elm * | string | Element path. Examples: ``AppdxTable[1]`` (別表第一), ``SupplProvision[1]`` (附則), ``Preamble[1]`` (前文), ``TOC[1]`` (目次), ``MainProvision-Article_24`` (第24条), ``MainProvision-Articl… |
law_id * | string | A ``law_id``, 法令番号 or law name (e.g. "326CO0000000319"). |
asof | string | YYYY-MM-DD — the law as it stood on that date. |
offset | integer | Character offset into the cleaned text, for paging long elements. |
revision_id | string | An exact ``law_revision_id``; overrides ``law_id``/``asof``. |
get_law_revisions List a law's amendment history
List every revision of a law, newest first — including 未施行 amendments. Use this to answer "has this law been amended?", "what changes are pending?" and "when does the amendment take effect?", and to get a ``law_revision_id`` for an exact version (pass it to ``find_law_article``/``get_law_element``).
| Parameter | Type | Description |
|---|---|---|
law_name_or_id * | string | Law name, abbreviation, ``law_id`` or 法令番号. |
unenforced_only | boolean | When True, return only revisions whose ``current_revision_status`` is "UnEnforced" (未施行 — promulgated but not yet in force). |
get_law_content Law metadata and table of contents
Fetch a law's metadata, table of contents, and optionally its full text.
| Parameter | Type | Description |
|---|---|---|
law_id * | string | A ``law_id`` or 法令番号 from ``search_laws`` (e.g. "129AC0000000089" or "明治二十九年法律第八十九号"). |
asof | string | YYYY-MM-DD — the law as it stood on that date. |
full_text | boolean | When True, include the full plain text of the law. Large laws are written to ``data/`` instead of returned inline (use a preview + ``read_saved_law``, or ``find_law_article`` for one article). |
save | boolean | When True, always write the full text to ``data/{law_num}.txt``. |
search Search (Deep Research)
Search Japanese law and return citable result ids (Deep Research convention). Runs a full-text search over every law's body, falling back to a title search when nothing matches. Each result ``id`` can be passed to ``fetch``: ``"{law_id}"`` for a whole law, ``"{law_id}::{elm_path}"`` for one provision.
| Parameter | Type | Description |
|---|---|---|
query * | string |
fetch Fetch (Deep Research)
Fetch the text behind a ``search`` result id (Deep Research convention). ``id`` is either a bare ``law_id`` (returns metadata, table of contents and the opening of the law) or ``"{law_id}::{elm_path}"`` (returns that one provision's text).
| Parameter | Type | Description |
|---|---|---|
id * | string |
get_english_law Fetch a law's official English translation
Fetch the English translation of a Japanese law, whole or by article. Source is the Ministry of Justice's Japanese Law Translation database — unofficial reference translations that often lag the Japanese text. The result states which amendment the translation reflects and warns when e-Gov shows a newer amendment in force. Use this when the user needs Japanese law *in English*; use ``find_law_article`` for the authoritative Japanese text.
| Parameter | Type | Description |
|---|---|---|
law_name * | string | Japanese law name, abbreviation or 法令番号 — "労働基準法", "労基法", "昭和二十二年法律第四十九号". English titles work too. |
article | string | Article to return, e.g. "32", "第32条", "32条の2" (条の枝番 supported). Empty returns the table of contents and structure summary instead of body text. |
offset | integer | Character offset into the returned text, for paging. |
search_english_laws Search translated laws (English catalogue)
Search the Japanese Law Translation catalogue by law title. Accepts English ("labor standards", "immigration") or Japanese ("労働基準法") keywords and returns the ``jlt_id`` plus the titles needed to pick a law, which ``get_english_law`` then fetches.
| Parameter | Type | Description |
|---|---|---|
query * | string | Title keyword(s), English or Japanese. |
include_untranslated | boolean | Also list laws whose titles are indexed but which have no translation yet — useful for confirming that a law genuinely has not been translated. |
limit | integer | Maximum matches to return (default 20). |
lookup_legal_term Look up a Japanese legal term in English
Translate a Japanese legal term using the official standard dictionary. Backed by the Ministry of Justice's Standard Legal Terms Dictionary (標準対訳辞書) — the controlled vocabulary every JLT translation is produced against, so its renderings match the statute translations.
| Parameter | Type | Description |
|---|---|---|
term * | string | The term to look up — Japanese ("善意", "労働者") or English ("good faith", "worker"). |
direction | string | "ja" (Japanese in), "en" (English in) or "auto" (default, detects from the script used). |
limit | integer | Maximum entries to return (default 15). |
compare_law_revisions Compare two versions of a law (新旧対照)
Diff two versions of a Japanese law (新旧対照), article by article. Answers "what did the 2019 reform actually change?" and "what exactly changed in 第36条?". Both versions' 本則 are fetched from e-Gov and their articles compared by number, so each provision comes back as added, deleted, modified or unchanged. 附則 (supplementary provisions) are out of scope.
| Parameter | Type | Description |
|---|---|---|
law_name_or_id * | string | Law name, abbreviation, ``law_id`` or 法令番号 (e.g. "労働基準法", "労基法", "322AC0000000049"). |
old * | string | The earlier version. Accepts a ``law_revision_id`` from ``get_law_revisions``, a date in YYYY-MM-DD form (the law as it stood then — e-Gov only serves dates from 2017-04-01 onwards, so use a ``law_r… |
article | string | Restrict the comparison to one article, e.g. "36", "第36条" or "24条の2". Returns that article's FULL old text, new text and diff — use it to drill into anything the summary flags. |
max_articles | integer | Maximum changed articles detailed in one call (default 20). |
new | string | The later version, same forms as ``old``. Defaults to "current". |
offset | integer | Number of changed articles to skip, for paging (default 0). |
scope | string | "changed" (default) lists only added/deleted/modified articles; "all" additionally returns the numbers of unchanged articles. |
get_law_definitions Defined terms in a law (定義語)
Find the terms a Japanese law defines (定義語) and where it defines them. Japanese statutes bind their own vocabulary: 「この法律において「労働者」とは …をいう」 in a (定義) article, a 各号 list where each 号 defines one term, or a parenthetical 「(以下「特定技能雇用契約」という。)」 buried in the article that first uses the term. Read an article without these and you will read it wrong — 「労働者」 does not mean the same thing in every law.
| Parameter | Type | Description |
|---|---|---|
law_name_or_id * | string | Law name, abbreviation, ``law_id`` or 法令番号 (e.g. "労働契約法", "労基法", "322AC0000000049"). |
term | string | Optional filter — return only definitions whose term contains this string. The whole law is scanned either way, so a filtered call and an unfiltered one see the same candidates. |
get_article_references Outbound references of an article (参照・準用)
List every provision one article of a Japanese law points at. Extracts absolute internal references (第三十六条第一項第二号, ranges 第三十二条から第三十二条の五まで, lists 第三十三条及び第三十六条), relative ones (前条・次条・前二項・同条), references to other laws by name plus 法令番号, and 準用 clauses ("第○条の規定は、…について準用する", with a flag when a 読み替え table is attached).
| Parameter | Type | Description |
|---|---|---|
article * | string | Article number in any form ``find_law_article`` accepts — "37", "第三十七条", "第32条の2". |
law_name_or_id * | string | Law name, abbreviation, ``law_id`` or 法令番号. |
resolve_relative | boolean | When True (default), 前条/次条/前項/前二項 are converted to absolute numbers using the article's position in the statute, and the reference is marked ``resolved_from_relative``. 同条/同項… |
find_where_cited Where an article is cited (same law)
Find which other articles of the SAME law cite a given article. The reverse of ``get_article_references``: scan every 本則 article for citations of the target and report the citing articles with the sentence each citation sits in. Useful for "what turns on 第三十六条?" — the answer is usually spread across articles that never appear in the target's own text. 枝番 are matched exactly: a search for 第二十四条 will not report 第二十四条の二. Kanji and ASCII numbering are both matched, and a ``第二十条から第三十条まで`` span that covers the target is reported a…
| Parameter | Type | Description |
|---|---|---|
article * | string | The cited article — "36", "第三十六条", "第32条の2". |
law_name_or_id * | string | Law name, abbreviation, ``law_id`` or 法令番号. |
max_results | integer | Maximum citing articles to return (default 25). |