MCP server for Japanese building regulations — fetches law text from e-Gov API v2 to prevent AI hallucination in building permit reviews
The server defines 10 tools for Japanese building law lookup with complete input schemas and descriptions. Naming is clear and verb-based (get_*, search_*, check_*, verify_*, suggest_*, analyze_). Descriptions are domain-specific and helpful but vary in depth. Most tools lack output schema documentation, which is a significant gap. Parameter descriptions are generally present and specific. Error handling is implemented via handleToolError with user-friendly messages and server-side logging. However, descriptions average ~100-150 chars (below the 194-char baseline for A+ tools), and output structures are not formally documented for downstream tool composition. The batch tool (get_laws_batch) and citation verification tool (verify_citation) show good composition thinking with array inputs and max item constraints.
条文の構造解析メタデータ(項数・号数・参照統計・プレビュー)をJSON形式で返す
法令の改正状況を確認する(法令名指定で単体チェック、グループ指定でバッチチェック、show_historyで改正履歴表示)
法令全文を取得(例: 建築基準法施行令)
告示の全文を国土交通省の告示データベース(PDF)から動的に取得する。正式名称またはキーワードで指定可能(例: 耐火構造の構造方法を定める件)。国交省データベースに未収録の告示は取得できません。取得失敗時は類似告示を提案します。
条番号を指定して条文を取得(例: 建築基準法 第20条、附則、別表第一)。別表: 「別表第一」「別表第二」等で数値基準を含む別表を取得可能。改正附則: 「附則(令和○年政令第○号)」で特定改正の経過措置を取得可能。
複数の法令・条文を一括取得する(最大20件、同一法令は1回のAPI呼び出しで効率処理)
サーバーの使用量メトリクスを返す(ツール呼び出し回数・APIリクエスト数・キャッシュヒット率・稼働時間)
法令名(タイトル)で建築関連法令を検索する。条文本文のキーワード検索は不可。条文内の用語(壁量、経過措置等)を探す場合は get_law で条番号を直接指定するか、get_full_law で全文取得してください。
Output schemas not documented. Tool descriptions explain inputs but do not specify what fields/types are returned. Downstream tool composition is hindered because LLMs cannot infer what data to extract and pass to subsequent tools.
get_metrics tool description is generic (45 chars) and lacks context for when/why to use it. Description says 'returns usage metrics' but does not explain what decisions an LLM should make based on those metrics or when this tool should be called.
Descriptions do not include dependency hints or prerequisites. For example, get_law mentions 'check_law_updates for confirmation of law number' but does not explain the workflow: search_law → check_law_updates → get_law. This forces LLMs to infer the correct sequence.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 51 | <=2025-11-25 | v2 |
指定した条文の関連法令・委任先・同法令内参照を自動抽出して提案する
AIの回答に含まれる法令引用を検証する(条文存在確認・テキスト照合、最大10件)
No confirmation or dry-run pattern for sensitive operations. If an LLM calls get_law for a real legal reference in a real building permit, there is no confirmation gate. For a legal tool, read-only access is safe, but future write operations (if added) must include confirmation.