MCP server for accessing Japanese e-Gov law database via the e-Gov Law API v2
Server provides 6 well-structured tools with complete input schemas using Zod validation and clear descriptions in Japanese. All tools are read-only API wrappers with proper naming (verb_noun pattern). However, output schemas are not documented, responses are returned as JSON text without formal schema declarations. Parameter descriptions are present but minimal (10-30 chars), lacking guidance on format constraints, ranges, or when to use each tool. Error handling is basic (EGovApiError, EGovTimeoutError) but lacks recovery guidance for LLMs. No tool annotations (readOnlyHint, etc.) despite all being read-only. Composition is sound, tools chain naturally (search → get_law_data → download_law_file).
法令ID・法令番号・改正IDを指定して法令本文をファイル形式(xml/json/html/rtf/docx)でダウンロードし、一時ファイルに保存してそのパスを返す(e-Gov法令API v2 GET /law_file/{file_type}/{law_id_or_num_or_revision_id})
法令改正IDを指定して法令本文の添付ファイル(画像・PDF・Zipなど)を取得し、一時ファイルに保存してそのパスを返す(e-Gov法令API v2 GET /attachment/{law_revision_id})
法令ID・法令番号・改正IDを指定して法令本文をJSONで取得する(e-Gov法令API v2 GET /law_data/{law_id_or_num_or_revision_id})
指定した法令の改正履歴一覧を取得する(e-Gov法令API v2 GET /law_revisions/{law_id_or_num})
法令本文内に指定したキーワードを含む法令を検索する(e-Gov法令API v2 GET /keyword)
法令名・法令種別・時点(asof)を指定して法令一覧を検索する(e-Gov法令API v2 GET /laws)
Output schemas not documented. Tool responses return JSON text without formal schema declarations. LLMs cannot infer what fields to expect or plan downstream calls.
Parameter descriptions are minimal (10-30 chars) and lack format guidance. E.g., 'asof' is described as '法令の時点(YYYY-MM-DD)' but no guidance on what happens if date is invalid or in future. No range constraints on 'limit' or 'offset'.
No tool annotations despite all tools being read-only. Missing readOnlyHint would help LLMs understand these are safe to call without side effects.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | B | 71 | 2026-07-28+ | v2 |
Error responses (EGovApiError, EGovTimeoutError) lack recovery guidance. A 404 or timeout error does not tell the LLM what to do next, retry, try a different parameter, or give up.
No pagination guidance in descriptions. Tools accept 'limit' and 'offset' but descriptions do not explain default limits, max results, or when pagination is required.