日本の法令(憲法・法律・政令・省令・規則)を e-Gov 法令API v2 から、条・項・号の単位で、法令番号と URL を添えて返す MCP サーバー。Japanese statutes from e-Gov Law API v2 — laws and ordinances per article, with law number and URL.
Strong specialized domain server for Japanese law. All 14 tools have explicit schemas and descriptions. Tool names follow verb_noun patterns (search_law, get_law, get_toc, etc.). Descriptions are detailed and domain-specific, ranging 100-450 chars, well above the 10 - 1024 baseline. Input schemas are comprehensive with proper JSON Schema typing. However, output schemas are not documented (no structured field descriptions for what these tools return). Error handling emphasizes graceful degradation (search_fulltext falls back to search_law, verify_citations returns per-item results without blanket failure) but lacks recovery guidance in descriptions. Tool parameters are well-described with constraints (enums for format/file_type, required fields clear). One composition weakness: several tools (get_law, get_law_range, get_law_revisions) operate on the same law_name resource, differentiation is clear from names but could be emphasized. Parameters like 'at' (point-in-time version) and 'depth' (hierarchical limit) show domain sophistication. Security: no credentials exposed; all read-only tools with appropriate risk classification.
法令種別の解説。法務専門家でない利用者が「政令と省令の違い」「通達は守らなくていいのか」を確認するための知識ツール。
条文本文からの参照抽出
添付ファイル 1 件または zip
条文取得。article 未指定 + format!="json" → TOC を返す、article 指定 → 該当条文を Markdown で返す、paragraph / item で粒度を指定可能
法令本文ファイル取得。xml / json / html / rtf / docx のいずれか。
編・章・節(または附則 1 本)を範囲にした条文の取得。範囲の指定は「編・章・節の番号」「path」「suppl_index」の 3 通りで、同時には 1 つだけ。文字数の上限を超える範囲は条の単位で打ち切り、続きの条番号を返す。
法令の改正履歴取得
法令名の規則で施行令・施行規則(または親の法律)を引く
Output schemas not documented. Tools return results but no description of return fields (structure, types, required fields, example values). Agents cannot reliably plan chaining or extract expected fields.
get_law_range has complex parameter interdependencies (part/chapter/section/subsection/division vs path vs suppl_index, only one allowed). Dependencies are explained in description but not formalized. LLMs may attempt to pass multiple mutually-exclusive parameters.
Parameter types not uniformly strict. article, paragraph, item in get_law accept flexible formats ('8' or '8の2' or '第8号の2') but the schema does not enforce enum or pattern. LLMs may pass invalid formats.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 52 | <=2025-11-25 | v2 |
目次取得。depth を指定すると上位 N 階層までで打ち切る。本則と附則は別に返す(#24)。suppl で附則をどこまで返すかを選ぶ。
添付ファイルの一覧
略称解決。@shuji-bonji/houki-abbreviations 経由で略称から正式法令名を解決する
全文検索。Phase 2-7 本実装。bulk DB を開いて hasAnyArticle が false (bulk DL 未実行) → search_law フォールバック + 誘導 note、searchLawsInDb (articles_fts + laws_fts → JOIN laws → scoring → limit)、freshness を付与 (outdated でも DB 結果を返す。API に倒さない)
法令検索
引用リストの実在確認。件ごとに found / not_found / ambiguous を返し、リストに存在しない引用が混ざっていてもツール全体は isError にしない。e-Gov に問い合わせられなかったときだけ全体のエラーを返す。
Error recovery guidance absent. Descriptions do not include hints for what to do if a lookup fails (e.g., 'if law_name not found, try resolve_abbreviation first'). Error responses exist in handlers (inferred from code) but descriptions do not advertise fallback paths.
Tool composition: list_attachments and get_attachment are tightly coupled (list → get). Description should state 'Call list_attachments first to discover available files, then call get_attachment with src from the list.'