{
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
  "name": "autonomath-mcp",
  "version": "0.5.0",
  "description": "Japan public-program MCP — subsidies, loans, tax, law, invoice & corporate data. 11,601 searchable programs + 9,484 e-Gov law metadata records + 1,185 行政処分 + 2,065 判例 + 362 入札 + 13,801 適格事業者 + corporate/entity-fact graph coverage. ¥3/billable unit, 3 free/day per IP. Evidence Packet with source_url + source_fetched_at + known gaps + 互換/排他 rules. 261 tools.",
  "author": {
    "name": "Bookyou株式会社",
    "url": "https://jpcite.com"
  },
  "license": "MIT",
  "homepage": "https://jpcite.com",
  "repository": {
    "url": "https://github.com/shigetosidumeda-cyber/autonomath-mcp",
    "source": "github"
  },
  "protocol": "mcp-2025-06-18",
  "transport": "stdio",
  "runtime": "python-3.11+",
  "install": {
    "command": "uvx autonomath-mcp",
    "install_url": "https://jpcite.com/integrations/?src=mcp_registry",
    "alt": {
      "pip": "pip install autonomath-mcp && autonomath-mcp",
      "claude_desktop": "Install the jpcite desktop extension (.mcpb bundle) from https://jpcite.com/downloads/autonomath-mcp.mcpb?src=mcp_registry"
    }
  },
  "manifest_url": "https://jpcite.com/mcp-server.json?src=mcp_registry",
  "packages": [
    {
      "registryType": "pypi",
      "registryBaseUrl": "https://pypi.org",
      "identifier": "autonomath-mcp",
      "version": "0.5.0",
      "runtimeHint": "uvx",
      "transport": {
        "type": "stdio"
      }
    }
  ],
  "tools": [
    {
      "name": "search_programs",
      "description": "INGREDIENT: returns ingredient (foundation data), client agent applies finishing. Usage model: foundation data; client agent finishes ~500 token (¥5-¥15) before showing to end user. Do not surface raw JSON. DISCOVER: Search 11,601 Japanese public programs (subsidies/loans/tax incentives/certifications) with Tier-graded data quality.\n\n    補助金・助成金・融資・税制優遇・認定制度を横断検索する (国 + 47 都道府県 + 市区町村). Returns program **definitions** (policy text, not recipients) with tier-graded quality labels and primary-source URL + fetched_at where available; aggregator domains are excluded by policy. Jグランツ 公開 API does not support this cross-ministry / cross-prefecture discovery with quality ranking; this is the canonical entrypoint for candidate-discovery questions about Japanese public programs.\n\n    Use this for program **definitions** (eligibility, amount, window, authority).\n    To find **real recipients** of a program (\"businesses like mine actually\n    received this\"), use `search_case_studies` instead — that returns applicant\n    profiles, not policy text.\n\n    Typical queries:\n      - \"この事業で確認すべき補助金候補は?\" / \"Which subsidy candidates should this business review?\"\n      - \"東京都の小規模事業者向け、上限 300 万円以下の補助金は?\"\n      - \"設備投資に使える税制優遇・税額控除は?\"\n      - \"農林水産省管轄で 認定新規就農者向けの助成金を一覧\"\n\n    Filters combine freely (AND across dimensions, OR within each list). Japanese\n    free-text search works for 3+ char queries via FTS5 trigram; shorter queries\n    fall back to LIKE substring.\n\n    Tier ranking (best→worst): S, A, B, C. S/A are verified by primary-source\n    URL + evidence on 8+/10 A-J dimensions; B is partial (4-7 dims); C is sparse\n    (1-3 dims, name+URL only). Non-public records are not exposed.\n    When presenting to an end user, default to tier ∈ {S, A, B} and mark C\n    as \"要 1 次確認\".\n\n    `fields` controls response size per row (see param description).\n\n    WHEN NOT:\n      - `search_enforcement_cases` instead if the user asks about 不正受給 / 返還命令 / 会計検査院.\n      - `search_case_studies` instead if they ask which *recipients* got the program (\"農事法人 E で使えた補助金\", \"北海道の食品製造で採択例\").\n      - `search_loan_programs` instead for 融資 filtered by 担保・保証人 axes; search_programs does surface 融資 rows but cannot filter on the 3-axis lending-condition.\n      - `enum_values(field=…)` *first* if unsure whether a target_type / funding_purpose / authority_level / prefecture value is canonical — the public index mixes \"sole_proprietor\" / \"個人事業主\", \"省エネ\" / \"energy\" etc. Prefecture uses the full suffix (\"東京都\", not \"東京\" or \"Tokyo\").\n\n    LIMITATIONS:\n      - Non-public records are excluded from the public MCP surface.\n      - `source_fetched_at` is a **uniform sentinel** across bulk-rewritten rows (<100 distinct values for thousands of programs). Render as \"出典取得日\" (when we last fetched), never as \"最終更新日\" or \"現行確認日\" — the column does not imply we verified currency.\n      - FTS5 trigram tokenizer causes false positives on single-kanji overlap. Searching `税額控除` also matches `ふるさと納税` because both contain `税`. For 2+ character kanji compounds, wrap the query in quotes (`\"税額控除\"`) to force phrase matching.\n      - `application_window` coverage is partial; many rows store 通年 / 随時 / empty — absence of a date does not mean closed. Fall back to the source URL for 募集期間 when the field is null.\n      - `amount_max_man_yen` is a 万円 unit (not 円). Filtering `amount_max_man_yen <= 300` matches programs with cap ≤ 300万円, not ≤ 300円.\n      - `as_of` (default 'today' JST) drops rows whose `application_window.end_date` is strictly past relative to the pivot. Rows lacking a structured end_date (通年 / 随時 / null) are always kept — absence of a deadline is not closure. Pass `as_of='YYYY-MM-DD'` for historical \"what was active at X\" queries; `meta.data_as_of` echoes the resolved date.\n\n    CHAIN:\n      → `get_program(unified_id=…)` for single-record detail.\n      → `batch_get_programs(unified_ids=[…])` when the user wants full shape for 2-50 rows at once.\n      → `check_exclusions(program_ids=[…])` to verify A+B 併給可否.\n      → `search_case_studies(program_used=primary_name)` to attach recipient evidence (the field does a substring match; today's data stores names, not unified_ids).\n\n    --- R1 routing block (Phase 1 — 2026-05-18) ---\n    SUMMARY: 11,601 Japanese public-program 横断検索 with Tier-graded quality.\n    WHEN TO USE:\n    - ユーザが日本の補助金 / 助成金 / 公募 を探している (国 / 都道府県 / 市区町村 横断)\n    - 回答に primary_name + 金額上限 + 申請窓口 + 採択率 + source_url が必要\n    - freshness が重要 (current open window / 2026年度公募)\n    - tier S/A 限定で 1 次情報のみ欲しい\n    WHEN NOT TO USE:\n    - 1 件の制度詳細だけ欲しい → get_program (cheaper)\n    - 今開いてる窓口だけ → list_open_programs (open-now filter)\n    - 税制 / 融資 / 認定 は対象外 → search_tax_rules / search_loan_programs\n    - 翻訳 / 数値推論のみ / world knowledge\n    EXAMPLE INPUT: {\"q\": \"IT導入\", \"tier\": [\"S\",\"A\"], \"prefecture\": \"東京都\", \"limit\": 10}\n    EXAMPLE OUTPUT: {\"total\": 12, \"results\": [{\"unified_id\": \"UNI-...\",\n                     \"primary_name\": \"...\", \"tier\": \"S\",\n                     \"amount_max_man_yen\": 4500, \"source_url\": \"https://...\",\n                     \"freshness_iso\": \"2026-05-18T03:42:00+09:00\",\n                     \"ed25519_sig\": \"...\"}],\n                     \"meta\": {\"data_as_of\": \"2026-05-18\"}}\n    COST: ¥3 (Tier B) per call"
    },
    {
      "name": "get_program",
      "description": "INGREDIENT: returns ingredient (foundation data for 1 program), client agent applies finishing. Usage model: foundation data; client agent finishes ~500 token (¥5-¥15) before showing to end user. Do not surface raw JSON. DETAIL: 1 制度の収録済みフィールドの詳細を unified_id で取得する (fetch one 補助金 / 助成金 / 融資 / 税制 / 認定 program detail). Returns application window, required documents, exclusion notes, statistics (J_*), plus source_url + fetched_at lineage.\n\n    Use when the user names a specific program (\"事業再構築補助金の要件を教えて\") or\n    after search_programs returns a candidate. For 2-50 programs at once, use\n    batch_get_programs instead (one round-trip).\n\n    Enriched fields cover application_window, documents_required, exclusions,\n    statistics (J_statistics often null for B/C tier), authority, contact,\n    subsidy_rate, target_types (detailed).\n\n    WHEN NOT:\n      - `batch_get_programs` instead if you have 2-50 unified_ids — avoid N round-trips.\n      - `search_programs` instead when the user only named the program by keyword, not unified_id.\n      - `search_case_studies(program_used=primary_name)` instead when they want recipients, not policy text.\n\n    CHAIN:\n      → `check_exclusions(program_ids=[unified_id, …])` to test 併給可否 with other candidates.\n      → `search_case_studies(program_used=primary_name)` for recipient evidence — the field substring-matches programs_used_json, which stores program names (not unified_ids).\n      → `search_enforcement_cases(q=primary_name)` for 不正 / 返還 history against this program."
    },
    {
      "name": "batch_get_programs",
      "description": "INGREDIENT: returns ingredient (foundation data for ≤50 programs), client agent applies finishing. Usage model: foundation data; client agent finishes ~500 token (¥5-¥15) before showing to end user. Do not surface raw JSON. DETAIL: 複数の制度を 1 コールで一括取得する (batch fetch up to 50 補助金 / 助成金 / 融資 / 税制 / 認定 programs). Use after search_programs returns a candidate list and the user wants full detail for comparison (\"この3つの補助金を詳しく比較して\") — 50 round-trips collapse to one.\n\n    Mirrors REST `POST /v1/programs/batch`. Each element of `results[]` has the\n    same shape as `get_program(fields=\"full\")`: Program + enriched (A-J) +\n    source_mentions + lineage.\n\n    Missing ids return in `not_found[]` — never raises on partial misses. Check\n    both `results[]` and `not_found[]` before telling the user \"not found\".\n\n    WHEN NOT:\n      - `get_program` instead for a single unified_id — simpler contract, smaller payload.\n      - `search_programs` instead when the user has not produced unified_ids yet.\n\n    CHAIN:\n      → `check_exclusions(program_ids=[…])` on the same id set to verify 併給可否.\n      → `search_case_studies(program_used=primary_name)` per row when user needs recipient evidence (substring match; data stores names)."
    },
    {
      "name": "list_exclusion_rules",
      "description": "COMPLIANCE: 補助金の併給禁止 / 前提要件ルールを列挙する (list 181 subsidy exclusion + prerequisite rules across public-program domains). Use this when the user wants to browse combination restrictions, prerequisite certifications, same-asset restrictions, or explicit combine_ok rules.\n\n    Typical queries:\n      - \"補助金の排他ルール一覧が欲しい\"\n      - \"設備投資系の併給制限を教えて\"\n      - \"IT 導入補助金の他省庁事業との重複排除ルールは?\"\n\n    Rule kinds (181 total):\n      - 125 exclude (相互排他)\n      - 17 prerequisite (A を取る前に B が必要)\n      - 15 absolute (例外なしの併給不可)\n      - 9 combine_ok (明示的に併用可と告知済み)\n      - 6 conditional_reduction (併用時に上限減額)\n      - 9 その他 (same_asset_exclusive 3 / cross_tier_same_asset 2 / area_allocation 1 / cross_tier_loan_interest 1 / entity_scope_restriction 1 / mutex_certification 1)\n\n    Each row includes rule_id, kind, severity, referenced program identifiers,\n    source_url where available, and a concise explanation. Treat this as a\n    screening aid: absence of a matching rule is not a legal guarantee that\n    every combination is allowed.\n\n    RESPONSE SIZE: default is lean (~68 KB for all 181 rows). For raw citation\n    text pass `verbose=True` (~124 KB). To narrow scope use `kind=[...]`.\n\n    WHEN NOT:\n      - `check_exclusions(program_ids=[…])` instead when the user has a specific candidate set — that returns only the triggered rules, not all 181. Do not call both back-to-back for the same question.\n      - `search_programs` / `get_program` instead for program *definitions* — this tool only returns *rules*, not program text.\n\n    CHAIN:\n      → `check_exclusions(program_ids=[…])` once the user narrows to candidates.\n      → `search_programs(q=rule.program_a)` to surface the program referenced in a rule they ask about."
    },
    {
      "name": "check_exclusions",
      "description": "COMPLIANCE: 併給可否を機械的に判定する — 候補制度セットに対して 181 本の併給禁止 / 前提要件ルールを走らせ、違反するものだけ返す (given a candidate set of program IDs, run all 181 補助金 exclusion / prerequisite rules and return only the violations). This answers the core \"can I combine A and B?\" / \"do I need certification X before applying for Y?\" question in one call — source-linked rules reduce manual PDF footnote parsing misses.\n\n    Typical queries:\n      - \"IT導入補助金と事業再構築補助金は併用できる?\"\n      - \"これら3つの補助金に同時申請できる?\"\n      - \"スーパーL資金を使う前に必要な認定は?\"\n\n    Empty `hits[]` means no registered rule fired. It does not prove that the\n    combination is allowed; important cases should still be checked against\n    the primary source and the relevant office.\n\n    WHEN NOT:\n      - `list_exclusion_rules` instead if the user wants to browse rules generally without a specific candidate set.\n      - `search_programs` first if you don't yet have program_ids — this tool requires them as input.\n\n    CHAIN:\n      ← `search_programs` / `batch_get_programs` to produce the program_ids.\n      → `get_program(unified_id=hit.program_a)` to explain a triggered rule in context.\n      → `search_case_studies(program_used=primary_name)` to check how recipients handled the restriction in practice (resolve primary_name via `get_program(unified_id=hit.program_a)` first).\n      DO NOT → `list_exclusion_rules` right after this call — each hit already embeds the rule row (rule_id / description / severity / source_url).\n\n    --- R1 routing block (Phase 1 — 2026-05-18) ---\n    SUMMARY: 候補制度セットに 181 本の併給禁止 / 前提要件 rule を機械的に走らせて違反のみ返す。\n    WHEN TO USE:\n    - ユーザが「A 補助金と B 補助金は併用できる?」\n    - 「3 つに同時申請できる?」ポートフォリオ判定\n    - 「Y の前に必要な認定 X はある?」prerequisite 確認\n    - 申請前 compliance チェック (181 rule set)\n    WHEN NOT TO USE:\n    - program_ids が無い → search_programs 先行\n    - 全 exclusion rules → list_exclusion_rules\n    - 1 件の制度の詳細 → get_program\n    - 翻訳 / 制度本文の解釈\n    EXAMPLE INPUT: {\"program_ids\": [\"UNI-itdounyu-2026\",\"UNI-jigyo-saikouchiku-2026\"]}\n    EXAMPLE OUTPUT: {\"program_ids\": [\"UNI-...\",\"UNI-...\"],\n                     \"hits\": [{\"rule_id\": \"EXC-...\", \"severity\": \"hard\",\n                               \"description\": \"...\", \"source_url\": \"https://...\",\n                               \"ed25519_sig\": \"...\"}],\n                     \"checked_rules\": 181, \"summary\": \"1 hard conflict\"}\n    COST: ¥3 (Tier B) per call"
    },
    {
      "name": "get_meta",
      "description": "UTILITY: データの鮮度・網羅件数を確認する (verify dataset freshness and scope). Returns public-searchable program count, canonical vs external-source split, 採択事例 / 融資 / 行政処分 / rule counts, tier distribution (S/A/B/C), prefecture distribution, and last_ingested_at.\n\n    **When to call:** before first `search_programs` if the user asks about\n    coverage / freshness (\"データはいつ更新された?\" / \"何件入ってる?\" /\n    \"都道府県別の分布は?\"). Otherwise skip to search — the per-row\n    `source_fetched_at` is authoritative for per-record freshness.\n\n    **Key fields to surface to the user:**\n    - `visible_programs`: rows a default search will return\n    - `tier_counts`: quality distribution; quote S/A first when the user\n      asks about \"信頼できるデータ\".\n    - `last_ingested_at`: UTC ISO-8601 of the most recent pipeline run.\n\n    WHEN NOT:\n      - `enum_values(field=…)` instead if the user wants the canonical list of filter values (target_type, funding_purpose, etc.) — get_meta only returns counts, not value lists.\n      - Per-row `source_fetched_at` via `get_program` is more authoritative than `last_ingested_at` for a single program's freshness.\n\n    CHAIN:\n      → `enum_values(field=…)` to translate \"何種類の target_type がある?\" after seeing tier_counts.\n      → `search_programs` once the user has confirmed coverage suits their query.\n      DO NOT → call `search_*` tools right after unless the user has a concrete query in hand; get_meta is a coverage/freshness probe, not a discovery hop."
    },
    {
      "name": "get_usage_status",
      "description": "META: 現在のクォータ残量を確認する (probe current API quota state without consuming a slot).\n\n    Returns the caller's quota state under the active tier:\n      - ``tier``: \"anonymous\" | \"paid\" | \"free\"\n      - ``limit``: integer cap for the period (None for paid — metered, no cap)\n      - ``remaining``: requests left this period (None for paid)\n      - ``used``: month-to-date or day-to-date count for this caller\n      - ``reset_at``: ISO 8601 timestamp of next quota reset\n      - ``reset_timezone``: \"JST\" (anonymous) or \"UTC\" (authenticated). The\n        anonymous bucket resets at JST 翌日 00:00; authenticated counters\n        reset at JST 翌日 00:00; authenticated paid usage is reported as\n        month-to-date and resets at UTC 月初.\n      - ``upgrade_url``: when relevant, the public upgrade landing.\n      - ``note``: human-readable summary.\n\n    **Why this matters for MCP callers:** the anonymous tier hands out\n    3 req/日 per IP+fingerprint. An LLM batch that does 60 small queries\n    in one session will hit the ceiling at request 4 with a hard 429.\n    Calling ``get_usage_status`` *before* a batch lets the agent tell the\n    user \"あと N 件で日次クォータに達します。継続するなら API key を発行してください。\"\n    instead of failing mid-flight.\n\n    **Caveat (MCP stdio):** the MCP transport has no client IP, so\n    anonymous calls from MCP cannot resolve the per-IP bucket — the tool\n    returns the configured ceiling and a note explaining that the actual\n    remaining is observable only from the HTTP layer (``GET /v1/usage``)\n    where the IP+fingerprint is known. With ``api_key`` supplied, the\n    response is exact (month-to-date count from usage summary).\n\n    WHEN:\n      - Before launching a batch operation that may exceed 3 anonymous calls.\n      - When a previous tool returned a 429-ish hint.\n      - To reassure the user about cost before recommending a sweep.\n    WHEN NOT: Do NOT call on every turn — once you know the remaining,\n    reuse the value across the session. Calling repeatedly is harmless\n    but noisy (each invocation still costs telemetry latency).\n\n    EXAMPLE (anonymous, MCP):\n      get_usage_status() →\n        {\"tier\":\"anonymous\",\"limit\":3,\"remaining\":null,\n         \"reset_at\":\"2026-05-02T00:00:00+09:00\",\"reset_timezone\":\"JST\",\n         \"note\":\"MCP stdio cannot resolve per-IP bucket; call GET /v1/usage for exact remaining.\"}\n\n    EXAMPLE (paid):\n      get_usage_status(api_key=\"<your-api-key>\") →\n        {\"tier\":\"paid\",\"limit\":null,\"remaining\":null,\"used\":1247,\n         \"reset_at\":\"2026-05-01T00:00:00+00:00\",\"reset_timezone\":\"UTC\"}"
    },
    {
      "name": "enum_values",
      "description": "INGREDIENT: returns ingredient (valid enum vocabulary), client agent applies finishing by selecting + relaying canonical value. Do not surface raw JSON. UTILITY: 他ツールのフィルタ値を先に検証する (probe which filter values actually exist for target_type / funding_purpose / program_kind / authority_level / event_type / ministry / loan_type / provider — call this *before* a search when unsure whether a value is canonical). Returns the live top-N distribution sorted by row-count so the agent sees realistic options.\n\n    WHAT: Reads the public index directly (no caching) and returns {field, values:[{value,count}], total_distinct, note}. Frequency-ranked. Source coverage: programs (visible rows only: excluded=0), source-derived dataset, source-derived dataset.\n\n    WHEN:\n      - Before `search_programs(target_type=[\"…\"])` if unsure of canonical spelling.\n      - When an earlier search returned 0 rows and `hint` suggested \"値が canonical でない可能性\".\n      - When the user uses a vague term (\"製造業\" / \"零細\") and you need to translate to the enum vocabulary.\n\n    WHEN NOT: Do not call if you already know the canonical value (e.g. prefecture '東京都' is free-form, not enum — use as-is). Do not call for free-text `q` queries.\n\n    CHAIN:\n      → `search_programs` / `search_enforcement_cases` / `search_loan_programs` (pass a value from the returned list).\n      DO NOT → chain enum_values on every turn — once resolved, reuse the value across the session.\n\n    EXAMPLE:\n      Input:  field=\"target_type\", limit=10\n      Output: {field: \"target_type\", values: [{value: \"sole_proprietor\", count: 2744}, ...], total_distinct: 58, note: \"...\"}"
    },
    {
      "name": "search_enforcement_cases",
      "description": "INGREDIENT: returns ingredient (foundation data for compliance audit), client agent applies finishing. Usage model: foundation data; client agent finishes ~500 token (¥5-¥15), translates to risk briefing, cites source_url. Do not surface raw JSON. SCREENING: 会計検査院 (Board of Audit) の不正・不当請求事例を検索する — 1,185 historical source-derived dataset subset findings of improper 補助金 handling (over-payment / 目的外使用 / eligibility failure / documentation defects). This is separate from the 22,258-row source-derived dataset corpus for 法人番号付き行政処分 detail. Spread across METI / MAFF / 国交省 / 厚労省; not available as a queryable list in any single public site. Essential for 不正 detection, due-diligence, and 詐欺 prevention before advising a client on a program or counterparty with prior clawback history.\n\n    Typical queries:\n      - \"法人 XXX に過去の不正受給・返還命令はある?\" (use `q=<company_name>` or `q=<13-digit houjin_bangou>` — the dedicated `recipient_houjin_bangou` column is NULL across all 1,185 source-derived dataset subset rows because 会計検査院 does not publish 法人番号)\n      - \"事業再構築補助金で過去に不正還付された事例は?\"\n      - \"農水省管轄で最も大きい不当請求額は?\"\n\n    Ordered by disclosed_date DESC (most recent first), then case_id for stability.\n\n    Empty results on `q=<company_name_or_houjin_digits>` should be cited as\n    \"会計検査院 公表分では見当たらず\" — not as \"clean record\". Private-sector\n    audits, in-progress investigations, and 不起訴 cases are not in scope.\n\n    WHEN NOT:\n      - `search_programs` instead if the user asks about the *program definition*, not 不正事例 (\"雇用調整助成金 is a program; 雇用調整助成金 不正受給 事例 is an enforcement case\").\n      - `search_case_studies` instead for 採択 (successful adoption), which is the *opposite* signal.\n      - `list_exclusion_rules` instead for 併給禁止 ルール — different dataset, different question.\n\n    LIMITATIONS:\n      - `recipient_houjin_bangou` is **100 % NULL** in the current dataset — 会計検査院 公表分 does not publish 法人番号. Filtering by this field returns 0 rows. Use `q=<company_name>` or `q=<houjin_bangou_digits>` instead (both hit source_title / reason_excerpt / program_name_hint substring).\n      - Dataset covers only **会計検査院 公表分** (annual 検査報告 + 随時報告). Private-sector audits, in-progress investigations, and 不起訴 cases are not included. \"No hits\" must be cited as \"会計検査院 公表分では見当たらず\", not \"clean record\".\n      - `ministry` uses the current ministry name; ministry restructures (e.g. 旧 通産省 → 経産省) are collapsed to the post-reform label. Historical queries should search `q=<bureau>` instead.\n      - `disclosed_date` granularity is **year+quarter** for many rows (e.g. 2023-03-31 is a placeholder for \"FY2022 検査報告\"); do not treat as a precise incident date.\n      - `as_of` (default 'today' JST) drops cases whose `disclosed_until` is past (公表 から外れた古い事例) and cases whose `disclosed_date` is future. NULL columns pass the filter. For historical 公表分 lookups pass an ISO date. `meta.data_as_of` echoes the resolved date.\n\n    CHAIN:\n      → `get_enforcement_case(case_id=…)` for the full record + legal_basis + bureau.\n      → `search_programs(q=program_name_hint)` to find the current active program referenced in the case.\n\n    `fields` controls response size per row (see param description). Default\n    is 'minimal' (token-shaping per dd_v3_09 / v7 P3-K) — pass `fields='full'`\n    when the audit detail (amount_*, reason_excerpt, legal_basis) is needed."
    },
    {
      "name": "get_enforcement_case",
      "description": "DETAIL: 会計検査院 不正・不当請求事例 1 件の詳細を取得する (fetch one enforcement case). Returns full record: event_type, ministry, recipient (name + 法人番号 + kind), bureau, prefecture, occurred_fiscal_years, all amount_* fields (improper_grant / project_cost / grant_paid), reason_excerpt, legal_basis, source_url, disclosed_date.\n\n    Example:\n        get_enforcement_case(case_id=\"ENF-2024-METI-0123\")\n        → {\"case_id\": \"ENF-2024-METI-0123\", \"event_type\": \"improper_grant\",\n           \"ministry\": \"経産省\", \"recipient_name\": \"...\", \"amount_improper_grant_yen\": 12000000,\n           \"reason_excerpt\": \"...\", \"source_url\": \"...\"}\n\n    When NOT to call:\n        - Without a case_id → use search_enforcement_cases / check_enforcement_am first.\n        - For 補助金 program definition → use get_program (this returns audit findings).\n        - For 判例 / court rulings → use get_court_decision (different table).\n        - To screen a 法人 across all enforcement → use check_enforcement_am(houjin_bangou).\n\n    CHAIN:\n      ← `search_enforcement_cases` produces the case_id.\n      → `search_programs(q=program_name_hint)` to cross-reference the current form of the program named in the case.\n\n    When to use: 会計検査院 不正・不当請求事例 1 件の詳細 for\n    grounding a 不正受給 audit reference.\n    Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest:\n    audit findings record (public); recipient profile reflects\n    as-published snapshot; amounts in 円 unit.\n    For personas: 会計士 office citing 検査院 finding in 監査\n    調書, 行政書士 office referencing 不正 case in 申請審査,\n    中小企業診断士 office reviewing 不正受給 risk for client,\n    FDE building \"show me this enforcement case\" widget, agent\n    triaging \"what's the detail of this 検査院 finding\"\n    question.\n    Example: get_enforcement_case(case_id=\"ENF-2024-METI-0123\")\n    -> {case_id: \"ENF-2024-METI-0123\", event_type:\n    \"improper_grant\", ministry: \"経産省\", recipient_name: \"…\",\n    recipient_houjin_bangou: \"…\", recipient_kind: \"…\", bureau:\n    \"…\", prefecture: \"…\", occurred_fiscal_years: [2023,2024],\n    amount_improper_grant_yen: 12000000,\n    amount_project_cost_yen: …, amount_grant_paid_yen: …,\n    reason_excerpt: \"…\", legal_basis: \"…\", source_url: \"…\",\n    disclosed_date: \"2024-11-15\"}.\n    Not for: free-text 不正 discovery without case_id (use\n    search_enforcement_cases / check_enforcement_am); 補助金\n    program definition (use get_program — this returns audit\n    findings); 判例 / court rulings (use get_court_decision —\n    different table); 法人 scan across all enforcement (use\n    check_enforcement_am); 検査院 finding interpretation /\n    法解釈 (士業法 fence — 弁護士法 §72 — substrate only,\n    NOT 法解釈 final); 不正受給 認定 (景表法 fence — audit\n    finding is historical observation, NOT 認定保証); 与信\n    判断 (信用情報法 fence — public enforcement record only,\n    NOT 信用評価); 個人情報 (recipient name is for 法人 only,\n    individual proprietor case may need PII redact at caller)."
    },
    {
      "name": "search_case_studies",
      "description": "INGREDIENT: returns ingredient (recipient evidence foundation data), client agent applies finishing. Usage model: foundation data; client agent finishes ~500 token (¥5-¥15), translates to recipient-profile narrative, cites source_url. Do not surface raw JSON. EVIDENCE: 採択事例 (recipient profiles paired with programs actually received) を検索する — 2,286 records covering Jグランツ 採択結果 + mirasapo 事業事例 + 都道府県 事例集. The Jグランツ 公開 API does not expose adoption history; cross-ministry aggregation here normally requires hand-crawling ministry PDFs. Each record has company_name + 法人番号 + prefecture + JSIC 業種 + employees + programs received + 受給額.\n\n    **Use this** when the user wants \"proof that a business like mine actually\n    got this\" — recipient profile matching, benchmarking, social proof.\n    **Use `search_programs` instead** for policy definitions (eligibility,\n    amount, window). Do not conflate the two: search_programs returns policy\n    text, search_case_studies returns real recipients.\n\n    Typical queries:\n      - \"うちと同じ規模・業種で採択された会社はある?\"\n      - \"事業再構築補助金で採択された北海道の中小企業は?\"\n      - \"この法人 (法人番号 XXX) はどの補助金を受給してる?\"\n\n    Ordered by publication_date DESC (most recent first), case_id for stability.\n\n    WHEN NOT:\n      - `search_programs` instead for policy text (eligibility / amount / window).\n      - `search_enforcement_cases` instead for 不正 / 返還 (opposite signal — this tool returns successful adoption, that one returns clawbacks).\n      - `search_loan_programs` instead for 融資 products — this dataset is grant-only.\n      - `enum_values(field=\"programs_used\")` *first* when unsure which program_used string will match — only 35 distinct values exist (all raw names, no unified_ids).\n\n    LIMITATIONS:\n      - `houjin_bangou` is populated on ~19 % of rows (mostly 事業再構築 + ものづくり disclosures). Filtering by it will miss ~81 % of records; fall back to `q=<company_name>` when houjin lookup returns 0.\n      - `total_subsidy_received_yen` is sparsely populated (<1 % of rows) — ministries publish 採択 without amounts. Do not rely on 金額 filters; surface the number only when present and omit the filter otherwise.\n      - `programs_used` stores **raw program names** (not `unified_id`). Names drift year-over-year (e.g. \"ものづくり・商業・サービス生産性向上促進補助金\" ≠ \"ものづくり補助金\"). Use `enum_values(field=\"programs_used\")` to see exact stored strings.\n      - `is_sole_proprietor` is nullable. `NULL` ≠ \"not a sole proprietor\" — it means unknown. Treat the filter tri-value: true / false / unknown.\n      - Source ratio is ~70 % Jグランツ 採択結果 (機械的) + ~30 % 都道府県 / mirasapo 事業事例 (文章). Text-search hits (`q=`) on the latter give softer match quality than houjin / industry filters.\n\n    CHAIN:\n      → `get_case_study(case_id=…)` for full recipient detail (outcomes, patterns, summary).\n      → `search_programs(q=programs_used[i])` to pull the current form of the program the recipient used.\n      → `search_enforcement_cases(q=<company_name>)` to run a 詐欺 / 不正 check on the same 法人 — `recipient_houjin_bangou` on the enforcement dataset is 100 % NULL, so search by name/digits in `q` instead.\n\n    `fields` controls response size per row (see param description). Default\n    is 'minimal' (token-shaping per dd_v3_09 / v7 P3-K) — call sites that need\n    the full recipient profile must pass `fields='full'`."
    },
    {
      "name": "get_case_study",
      "description": "DETAIL: 採択事例 1 件の収録済みフィールドの詳細を取得する (fetch one case study). Returns recipient profile (company_name, 法人番号, prefecture, industry_jsic, employees, founded_year, capital_yen), case_title / case_summary, programs_used (list of 受給した補助金), subsidy amount, outcomes / patterns (JSON), source_url + publication_date.\n\n    WHEN NOT:\n      - `search_case_studies` instead if you don't have a case_id yet.\n      - `get_program` instead for program policy detail — this returns recipient profile, not policy text.\n\n    CHAIN:\n      ← `search_case_studies` produces the case_id.\n      → `search_programs(q=programs_used[i])` to resolve each program the recipient used to its current definition.\n      → `search_enforcement_cases(q=<company_name>)` for an integrity check on the same 法人 — `recipient_houjin_bangou` on the enforcement dataset is 100 % NULL, so search by name/13-digit substring in `q` instead.\n\n    When to use: 中小企業診断士 / FDE / agent triaging a single\n    採択事例 for grounding a similar-pattern application.\n    Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest: recipient profile is as-published (株式公開時点 / 採択\n    時点 snapshot); 法人番号 / employee count may be stale relative\n    to current registry.\n    For personas: 中小企業診断士 office prepping 経営革新計画 with\n    benchmark cases, 行政書士 office citing similar 採択事例 in\n    申請書, FDE building \"show me 5 similar past adoptions\" widget,\n    agent triaging \"has anyone in industry X / prefecture Y won\n    補助金 Z before?\" question.\n    Example: get_case_study(case_id=\"mirasapo_case_118\") →\n    {case_id:\"mirasapo_case_118\", company_name:\"...\",\n    houjin_bangou:\"...\", prefecture:\"東京\", industry_jsic:\"...\",\n    employees:42, founded_year:1998, capital_yen:10000000,\n    case_title:\"...\", case_summary:\"...\",\n    programs_used:[\"持続化補助金\", \"ものづくり\"],\n    subsidy_amount_yen:5000000, source_url:\"...\",\n    publication_date:\"2024-03-15\"}.\n    Not for: free-text discovery without case_id (use\n    search_case_studies); 採択保証 / 採択率予測 (景表法 fence —\n    historical observation only, not 未来予測); recipient credit\n    judgment (信用情報法 fence — public adoption record only, not\n    与信判断); 行政書士 申請書面作成 (行政書士法 §1 fence —\n    agent surfaces the case, final 書面 belongs to 行政書士)."
    },
    {
      "name": "search_loan_programs",
      "description": "INGREDIENT: returns ingredient (foundation data for loan decomposition), client agent applies finishing. Usage model: foundation data; client agent finishes ~500 token (¥5-¥15), translates to lending-option narrative, cites source_url. Do not surface raw JSON. DISCOVER: 無担保・無保証 の融資を 1 クエリで抽出する — 108 日本の融資プログラム (日本政策金融公庫 / 自治体融資 / 信用金庫 etc.) with three-axis lending-condition filters. Headline feature: 担保 (collateral) / 個人保証人 (personal guarantor) / 第三者保証人 (third-party guarantor) are each a **separate enum axis** — \"無担保・無個人保証\" filtering is one query, not multi-turn natural-language parsing of each provider's prose. No single public site offers this 融資 decomposition.\n\n    Typical queries:\n      - \"無担保・無個人保証で通せる公庫融資は?\"\n      - \"運転資金で金利 1.5% 以下・5000万以上の融資は?\"\n      - \"10 年返済可能な設備資金融資は?\"\n\n    Example filter combination for 無担保・無保証人:\n\n        collateral_required=\"not_required\" AND\n        third_party_guarantor_required=\"not_required\"\n\n    Each axis value is one of: required | not_required | negotiable | unknown.\n    Invalid values return an envelope with code='invalid_enum' + hint (not silent-fail).\n\n    Ordered by amount_max_yen DESC, id. limit clamped to [1, 100]; default 20.\n\n    WHEN NOT:\n      - `search_programs` instead for 補助金 / 助成金 / 税制 (this dataset is 融資 only — 108 rows).\n      - `search_enforcement_cases` instead for 不正 / 返還 against a lender or borrower.\n      - `enum_values(field=\"loan_type\"|\"provider\")` *first* if unsure which loan_type / provider strings are canonical.\n\n    LIMITATIONS:\n      - Coverage is 108 rows: 日本政策金融公庫 (国民 + 中小) + 信用保証協会 + 自治体制度融資 + 主要信金. **Commercial-bank proprietary loans** (メガバンク プロパー融資, 地銀 事業融資) are not indexed — providers keep conditions in branch-level discretion, not published schedules.\n      - **No prefecture filter.** 自治体 rows mention the 自治体 in `provider` / `program_name` / `target_conditions` — use `q=<都道府県名>` or `provider=<自治体名>` for regional filtering.\n      - `personal_guarantor_required=\"not_required\"` typically means 2024-04 以降 公庫 原則不要 ルール applied; confirm against the lender's current 要項 because 保証料 / 信用保証 料率 is priced separately and not surfaced here.\n      - `interest_rate_base` is the **base rate**; `interest_rate_special` covers 特別利率 tiers. The lender's actual offer depends on 信用 / 担保 / 期間, which the dataset records only as target_conditions text.\n      - Every 3-axis value can be `unknown` when the 要綱 is silent. Treat `unknown` as \"調査必要\", not as a permissive default — 不記載 in 要綱 often means 原則 required.\n\n    CHAIN:\n      → `get_loan_program(loan_id=…)` for the full record (target_conditions, official_url, lineage).\n      → `search_programs(q=…)` to compare against 補助金 options for the same purpose (借入 vs 補助金 decision)."
    },
    {
      "name": "get_loan_program",
      "description": "DETAIL: 融資プログラム 1 件の詳細を取得する (fetch one 融資 program by numeric id). Returns full record including three-axis lending-condition (担保 / 個人保証人 / 第三者保証人), interest rates (base + special), loan period, grace period, target_conditions, official_url + fetched_at lineage, and the legacy security_required free-text kept for audit.\n\n    Example:\n        get_loan_program(loan_id=42)\n        → {\"id\": 42, \"loan_program_name\": \"...\", \"collateral_required\": \"条件付\",\n           \"personal_guarantor_required\": \"不要\", \"interest_rate_base\": \"1.50%\", ...}\n\n    When NOT to call:\n        - Without a numeric loan_id → use search_loan_programs / search_loans_am first.\n        - For 補助金 / 助成金 detail → use get_program (this dataset is 融資 only).\n        - For 信用保証協会 enforcement / 取消 → use get_enforcement_case instead.\n        - To screen co-applicable subsidies → use subsidy_combo_finder, not this.\n\n    When to use: 中小企業診断士 / 税理士 / FDE / agent pulling a\n    single 融資 program detail (公庫 / 信用保証 / 地銀) with the\n    three-axis lending-condition surfaced (担保 / 個人保証人 / 第三者保証人)\n    + base/special interest + loan/grace period.\n    Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest: legacy security_required free-text is kept for\n    audit but new code should use the structured collateral_required\n    / personal_guarantor_required / third_party_guarantor_required\n    triple.\n    For personas: 中小企業診断士 office prepping 融資 application\n    DD, 税理士 office assessing 顧問先 cash-flow with loan stack,\n    FDE building \"show me 担保不要 / 第三者保証不要 公庫融資\"\n    widget, agent triaging \"what's the rate + period for this\n    loan?\" question.\n    Example: get_loan_program(loan_id=42) → {id:42,\n    loan_program_name:\"...\", provider:\"日本政策金融公庫\",\n    collateral_required:\"条件付\",\n    personal_guarantor_required:\"不要\",\n    third_party_guarantor_required:\"不要\",\n    interest_rate_base:\"1.50%\", interest_rate_special:\"0.50%\",\n    loan_period_years_max:10, grace_period_years_max:2,\n    target_conditions:\"...\", official_url:\"...\", fetched_at:\"...\",\n    security_required:\"<legacy free-text>\"}.\n    Not for: 補助金 / 助成金 (get_program); 信用保証協会 取消\n    (get_enforcement_case); subsidy combo (subsidy_combo_finder);\n    与信判断 (信用情報法 fence — public program record only, not\n    与信決定); 融資審査通過予測 (景表法 fence — terms only, not\n    審査結果保証); 担保評価 final (士業 / 金融機関 担当 — agent\n    surfaces the policy, final 評価 belongs to lender)."
    },
    {
      "name": "prescreen_programs",
      "description": "DISCOVER-JUDGE: profile → ranked eligible programs (fit-based discovery, NOT keyword search).\n\n    Complements search_programs: search = \"find programs mentioning X\", prescreen = \"find programs I\n    plausibly fit, ranked by fit, with reasons + caveats\". Use this first when the caller describes\n    a business (\"茨城 5ha 稲作 個人事業主、8000万円の設備投資予定\"); use search_programs when the\n    caller names a known program or theme (\"IT導入補助金\").\n\n    Each row returns:\n      - fit_score: positive-match count in v1 (0..~5). Compare within one response only.\n      - match_reasons[]: why the row scored (prefecture match, target_type match, amount sufficiency).\n      - caveats[]: missing prerequisites, undersized amount, or tagging gaps.\n\n    LIMITATIONS:\n      - v1 does not enforce source-derived dataset `exclude`/`combine_ok` — those need an\n        'applying_for' list we don't accept yet. Use `check_exclusions` on pairs you plan to apply.\n      - target_types has EN/JP drift in the public index. Unrecognized tokens don't penalize rows.\n\n    WHEN NOT:\n      - `search_programs(q=…)` for keyword-based discovery.\n      - `search_case_studies` for \"who like me received X?\" social-proof discovery.\n\n    CHAIN:\n      → `get_program(unified_id)` for full row of a short-listed match.\n      → `check_exclusions(program_a, program_b)` to validate combined-application feasibility.\n      → `search_case_studies(prefecture=…, industry_jsic=…)` for adoption evidence of top matches."
    },
    {
      "name": "smb_starter_pack",
      "description": "ONE-SHOT DISCOVERY: 1 call で SMB 経営者が「今日何できる?」を返す。\n\n    ChatGPT / Claude と同じ感覚の 1-question-1-answer 体験のための primitive。\n    `search_programs` → `prescreen_programs` → `search_loan_programs` →\n    `search_tax_rules` → `upcoming_deadlines` → `search_enforcement_cases`\n    の 6 ツール分を 1 call で返す (≤ 4 KB payload)。\n\n    入力は一般的な企業プロファイル (都道府県 / 業種 / 従業員 / 売上 / 投資予定):\n      - prefecture: '愛知' / '愛知県' / 'Aichi' 自動正規化\n      - industry_jsic / jsic: 英 letter と 和名 両対応\n      - employees / employee_count: alias 両方受ける\n      - planned_investment_man_yen: あれば 金額不足 (undersized) 警告\n\n    返り値 (compact):\n      {\n        \"profile\": {正規化後の入力},\n        \"top_subsidies\": [{unified_id, name, amount_max_man_yen, end_date, fit_score, why_fit}, ...N],\n        \"top_loans\": [{loan_id, program_name, provider, collateral_required, rate, amount_max_yen}, ...N],\n        \"applicable_tax_hints\": [{keyword, measure}] — 税制は profile だけでは確定判定不能なので hints のみ\n        \"urgent_deadlines_30d\": [{unified_id, name, end_date, days_left}, ...up to 5],\n        \"same_industry_enforcement_count\": int — 同業種で過去3年の行政処分件数 (DD 参考)\n        \"next_actions\": [\"GビズID取得\", \"経営計画書草案\", ...] — 人が1日で動けるステップ\n        \"source\": {\"generated_at\": ISO8601, \"coverage\": \"...\"},\n      }\n\n    空 hit は `hint` / `retry_with` 付きで返す (0 件でも迷わせない)。\n\n    CHAIN (深掘り時):\n      → `get_program(unified_id)` で top_subsidies の詳細\n      → `check_exclusions(a, b)` で併用可否\n      → `search_case_studies(prefecture, industry_jsic)` で採択事例\n      → `get_loan_program(loan_id)` で融資 要項"
    },
    {
      "name": "upcoming_deadlines",
      "description": "DISCOVER-CALENDAR: list 補助金 / 助成金 / 融資 / 税制 programs whose application deadline (application_window.end_date) falls within the next N days.\n\n    Use when the caller frames the question time-first: \"来月締切の支援制度を一覧で\" / \"茨城で今月締切を迎えるもの\".\n    One call replaces the keyword-guess + per-program get_program dance. Rows are ordered by\n    `end_date ASC`, so index 0 is always the most urgent.\n\n    Each row returns: unified_id, primary_name, tier, prefecture, end_date, days_remaining,\n    amount_max_man_yen, application_url.\n\n    LIMITATIONS:\n      - Only reads `application_window.end_date`. Programs without a structured end_date\n        (roughly 60% of the corpus — most rolling / 随時 programs) are silently skipped.\n      - Multi-round 公募 where each round has its own window are represented by a single\n        end_date today; richer multi-round support is pending an enriched-schema stabilisation.\n\n    WHEN NOT:\n      - `search_programs(q=…)` for keyword discovery (no deadline filter).\n      - `get_program(unified_id)` for a single program's full window + multi-round detail.\n\n    CHAIN:\n      → `get_program(unified_id)` for required documents / full policy on the most urgent row.\n      → `check_exclusions([…])` before recommending the caller apply for multiple urgent ones."
    },
    {
      "name": "deadline_calendar",
      "description": "ONE-SHOT CALENDAR: 今後 N ヶ月 (1..6) の締切を月別グルーピングで 1 call。\n\n    税理士・行政書士 が顧問先に配る月次ブリーフィング用。per-program `get_program`\n    チェーンを潰す: 1 call で `{\"2026-05\": [...5件], \"2026-06\": [...3件], ...}` を返す。\n\n    返り値 (compact):\n      {\n        \"months_ahead\": 3,\n        \"total\": N,\n        \"by_month\": {\n          \"2026-05\": [{unified_id, name, end_date, days_left, amount_max_man_yen, tier}, ...],\n          \"2026-06\": [...],\n          \"2026-07\": [...]\n        },\n        \"urgent_next_7_days\": N,  # quick flag\n        \"empty_months\": [\"2026-08\"] | [],  # \"今月締切なし\" hint\n        \"source\": {...}\n      }\n\n    WHEN NOT:\n      - `upcoming_deadlines(within_days=N)` for flat (ungrouped) time-ordered list.\n      - `list_open_programs` for pure \"今開いてる\" (募集中) framing, no deadline sort.\n\n    LIMITATIONS:\n      - Same as upcoming_deadlines: 60% 程度の 随時 / rolling 制度 は structured\n        end_date を持たないため対象外。\n\n    When to use: 税理士 / 行政書士 / FDE office assembling a monthly\n    deadline briefing for client portfolio.\n    Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest: rolling / 随時 制度\n    are dropped because structured end_date is missing; absence does\n    NOT mean unrestricted.\n    For personas: 税理士 office monthly client newsletter, 行政書士\n    office peer group calendar pre-fill, FDE building \"next-3-month deadline\n    alert\" widget, agent triaging \"client X is in prefecture Y — which\n    deadlines hit in 60 days?\".\n    Example: deadline_calendar(months_ahead=3, prefecture=\"東京\") →\n    {months_ahead:3, total:42, by_month:{\"2026-06\":[{unified_id, name,\n    end_date, days_left, amount_max_man_yen, tier}, ...], \"2026-07\":\n    [...], \"2026-08\":[...]}, urgent_next_7_days:5, empty_months:[],\n    source:{...}}.\n    Not for: > 6 月先のスキャン (upcoming_deadlines を使え);\n    随時 / rolling 制度 の網羅 (structured end_date 欠如で対象外);\n    申請書面作成 / 申請代理 (行政書士 §1 / 税理士法 §52 fence —\n    agent scaffolds the deadline calendar, final 書面 / 代理 belongs\n    to 士業); 締切 = 採択保証ではない (景表法 fence — substrate only)."
    },
    {
      "name": "subsidy_combo_finder",
      "description": "ONE-SHOT COMBO: 補助金+融資+税制 の 非衝突組合せ TOP N を 1 call で。\n\n    Japanese SMB の典型シナリオ:\n      「ものづくり補助金」申請予定 → 残りの投資資金をどう賄うか？\n      → このツールは source-derived dataset を参照し、seed 補助金と同時利用可能な\n         融資 + 税制 を自動で見つけて 組合せとして返す。\n\n    LLM が手動で (search_programs → get_program → list_exclusion_rules →\n    search_loans → get_tax_rule) を 5 回チェーンする必要がなくなる。\n\n    入力:\n      - `unified_id`: seed 補助金 (例: 'UNI-xxxxxxxxxx')、最も確実\n      - `keyword`:    seed 補助金キーワード (例: 'ものづくり')、fuzzy\n      - `prefecture`: 融資の地域絞り込み (optional)\n      - `limit`:      返す組合せ数 (default=3, max=5)\n\n    返り値 (compact, ≤ 3 KB):\n      {\n        \"seed\": {\"unified_id\", \"name\", \"amount_max_man_yen\"},\n        \"combos\": [\n          {\n            \"rank\": 1,\n            \"subsidy\": {\"unified_id\", \"name\", \"amount_max_man_yen\"},\n            \"loan\":    {\"loan_id\", \"program_name\", \"provider\", \"amount_max_man_yen\", \"rate\"},\n            \"tax\":     {\"unified_id\", \"ruleset_name\", \"tax_category\"},\n            \"combined_max_benefit_man_yen\": <int>,\n            \"blocked_by\": [],               # 非衝突なら空\n            \"why_combo\": \"補助金で初期投資、融資で運転資金、税制で減価償却加速\"\n          },\n          ...\n        ],\n        \"blocked_names\": [\"他の助成金\", \"中小企業生産性革命推進事業\", ...],\n        \"source\": {...}\n      }\n\n    WHEN NOT:\n      - `check_compat(a, b)` — 既に 2 つ特定制度があって「これ併給できる？」だけ聞きたい時\n      - `prescreen_programs` — プロファイル→候補リスト、組合せはまだ要らない時\n      - `smb_starter_pack`   — 補助金/融資/税制/期限 の 汎用ダッシュボード"
    },
    {
      "name": "dd_profile_am",
      "description": "ONE-SHOT DD: 法人番号 → 公表コンプライアンス + 採択実績 + インボイス登録 を 1 call.\n\n    M&A 仲介 / 銀行 DD / VC の投資前調査 / 士業の顧問先調査 の定番チェーン\n    (search_enforcement → check_enforcement → search_acceptance_stats_am →\n     list_adoptions → invoice_registrants) を houjin_bangou 一発で返す。\n\n    入力:\n      - houjin_bangou: 13 桁 (T 付き インボイス番号、ハイフン、全角 全て OK。NFKC + 非数字除去で 13 桁化)\n\n    返り値 (≤ 3 KB 目安):\n      {\n        \"houjin_bangou\": \"...\",          # 正規化後\n        \"entity\": {                       # 法人マスタ (収録があれば)\n          \"name\", \"category\", \"prefecture\", \"municipality\", \"certified_at\"\n        },\n        \"adoptions_summary\": {\n          \"total\": int,\n          \"programs_list\": [...]          # 採択された補助金 名 unique\n        },\n        \"adoptions\": [                    # include_adoptions=True の時のみ\n          {\"canonical_id\", \"program_name\", \"adopted_at\", ...}\n        ],\n        \"enforcement\": {                  # check_enforcement の戻り\n          \"found\", \"currently_excluded\", \"active_exclusions\", \"recent_history\", \"all_count\"\n        },\n        \"invoice_registration\": {\n          \"status\": \"registered\" | \"revoked\" | \"unknown_in_mirror\",\n          \"invoice_registration_number\": \"T...\", \"registered_date\", \"trade_name\"\n        },\n        \"dd_flags\": [                     # agents が要注意点を一覧で取れる bullet\n          \"currently_excluded\", \"no_adoption_history\", \"clean_enforcement_record\",\n          \"invoice_mirror_miss\", \"unknown_company\"\n        ],\n        \"coverage_scope\": \"...\",          # 与信/反社/信用情報には一切該当せず、公的補助金/税制 due diligence 専用\n        \"source\": {...}\n      }\n\n    DATA HONESTY GATES (誤解防止):\n      - adoptions.amount_granted_yen is 100% NULL in current snapshot —\n        total_amount_man_yen は返しません (虚偽の数字を作らない)。\n      - invoice_registrants の \"unknown\" は \"国税庁に未登録\" ではない。\n        重要な確認では国税庁の公式検索も確認してください。\n      - enforcement.found=false は source-derived dataset 22,258 行政処分 detail\n        corpus 外であって、反社\n        チェック / 信用情報 / 帝国データバンク は別途必要 (範囲外)。\n\n    WHEN NOT:\n      - `check_enforcement_am` — 法人番号ピンポイント で 行政処分 だけ欲しい時\n      - `search_acceptance_stats_am` — 特定 program に対する採択率だけ欲しい時\n      - `search_enforcement_cases(keyword=…)` — 名称部分一致 or 法人番号無し の時\n\n    CHAIN:\n      → `check_enforcement_am(houjin_bangou)` で active_exclusions の詳細\n      → `search_enforcement_cases(houjin_bangou)` で行政処分 source_url へ\n      → `get_invoice_registrant(registration_number)` で登録履歴の詳細"
    },
    {
      "name": "similar_cases",
      "description": "CASE-STUDY-LED DISCOVERY: 採択事例 を seed に「似た事例 + その制度」を返す。\n\n    `search_case_studies` の逆方向 entry point。条件→事例 ではなく、事例 (or 自由文) →\n    類似事例 のグルーピング を返し、各 similar case の programs_used を programs テーブルへ\n    best-effort で解決する。「この事例 良いな」→ 似た事例 + その制度 が 1 call で揃う。\n\n    Resolution rules:\n      - case_id 指定: その case を fetch、industry/prefecture/programs_used を seed vector に。\n      - description 指定 (case_id 無し): source-derived dataset を LIKE 検索して top 1 を seed に採用。\n      - 両方無し: empty_input error envelope (hint: \"case_id か description を渡してください\").\n\n    Scoring (Jaccard 型):\n      - industry JSIC full match = +2 / 1文字prefix match = +1\n      - prefecture exact = +1\n      - programs_used overlap = +3 * Jaccard\n      - max_score で正規化 → similarity_score ∈ [0, 1]\n      - 降順 sort、seed 自身は除外。\n\n    返り値:\n      {\n        \"seed\": {\"case_id\", \"title\", \"industry_jsic\", \"prefecture\", \"programs_used\"},\n        \"similar_cases\": [\n          {\n            \"case_id\", \"title\", \"company_name\", \"outcome\", \"prefecture\",\n            \"industry_jsic\", \"similarity_score\",\n            \"match_reasons\": [\"same industry\", \"shared 2 programs\"],\n            \"supporting_programs\": [{\"unified_id\", \"source_name\", \"tier\", ...}, ...]\n          }, ...\n        ],\n        \"total_found\": int,                # similar_cases の長さ\n        \"source\": {...}\n      }\n\n    WHEN NOT:\n      - `search_case_studies` instead — 条件 (prefecture/industry) で事例リストが\n        欲しい時 (こちらは事例 seed が必要)。\n      - `smb_starter_pack` instead — プロファイル (都道府県+業種+従業員) から制度を\n        探したい時。\n      - `dd_profile_am` instead — 法人番号で 1 社の DD だけ欲しい時。\n\n    LIMITATIONS:\n      - programs_used の name → unified_id 解決は LIKE substring (best-effort)。\n        年度更新で名称変わっていると null = ``\"matched\": false`` になる。\n      - source-derived dataset の programs_used は < 35 種しか登録なし (採択 corpus 全体で\n        sparse). 多くの seed では programs overlap = 0 になり、industry+prefecture\n        だけで rank される。\n      - description LIKE は FTS5 ではなく単純 substring。3 文字未満は filter 外し。\n\n    CHAIN:\n      → `get_case_study(case_id=…)` で各 similar case の outcomes/patterns 詳細\n      → `get_program(unified_id=…)` で supporting_programs の制度詳細\n      → `check_exclusions(a, b)` で複数制度の併給可否"
    },
    {
      "name": "subsidy_roadmap_3yr",
      "description": "ONE-SHOT 3-YEAR ROADMAP: industry × prefecture × size × purpose で\n    今後 N ヶ月の application window を JST 会計年度 quarter にバケット。\n    Sort = opens_at ASC, deadline ASC tiebreak. tier S/A/B/C, excluded=0 のみ.\n    deadline past + start future なら start を採用. cycle=annual の past start\n    は +1 year に project. Errors: ``{\"error\": {\"code\",\"message\",\"hint\"}}``.\n\n    Example:\n        subsidy_roadmap_3yr(industry=\"製造業\", prefecture=\"東京都\",\n                            company_size=\"small\", funding_purpose=\"equipment\",\n                            horizon_months=36, limit=20)\n        → {\"timeline\": [{\"quarter\": \"2026Q2\", \"items\": [...]}, ...], \"total\": N}\n\n    When NOT to call:\n        - For a SINGLE program detail → use get_program (much cheaper).\n        - For free-text keyword search → use search_programs.\n        - For currently-open windows only (not 3-year horizon) → use list_open_programs.\n        - For 融資 / 補助金 dual-use combo → use subsidy_combo_finder.\n        - For tax incentive timing → use search_tax_incentives + cliff dates.\n\n    LIMITATIONS: 随時/rolling で start/end がない制度は timeline に出ない場合があります。\n    業種 filter は補助的な絞り込みです。\n\n    --- R1 routing block (Phase 1 — 2026-05-18, alias of `program_window`) ---\n    SUMMARY: industry × prefecture × size × purpose で 3 年先まで application window を quarter 単位で bucket する composer。\n    WHEN TO USE:\n    - 3 年先までの 補助金 timeline を 4-axis で欲しい\n    - 経営計画 / 中期事業計画への補助金組込み\n    - 「24/25/26 年度の四半期別に並べてくれ」\n    - quarter bucket + tier S/A 限定 + opens_at ASC sort\n    WHEN NOT TO USE:\n    - 今開いてる窓口 → list_open_programs (cheaper)\n    - 1 件の制度詳細 → get_program\n    - free-text keyword → search_programs\n    - 融資・補助金 dual-use → subsidy_combo_finder\n    EXAMPLE INPUT: {\"industry\": \"製造業\", \"prefecture\": \"東京都\",\n                    \"company_size\": \"small\", \"funding_purpose\": \"equipment\",\n                    \"horizon_months\": 36, \"limit\": 20}\n    EXAMPLE OUTPUT: {\"timeline\": [{\"quarter\": \"2026Q2\",\n                     \"items\": [{\"unified_id\": \"UNI-...\", \"primary_name\": \"...\",\n                                \"opens_at\": \"2026-04-01\", \"deadline\": \"2026-07-15\",\n                                \"tier\": \"S\", \"amount_max_man_yen\": 4500,\n                                \"source_url\": \"https://...\", \"ed25519_sig\": \"...\"}]}],\n                     \"total\": 47, \"meta\": {\"data_as_of\": \"2026-05-18\"}}\n    COST: ¥9 (Tier A) per call — composer"
    },
    {
      "name": "search_laws",
      "description": "INGREDIENT: returns ingredient (foundation legal corpus data), client agent applies finishing. Usage model: foundation data; client agent finishes ~500 token (¥5-¥15), translates to legal brief, cites source_url + 8-fence disclaimer. Do not surface raw JSON. DISCOVER-LAW: search e-Gov 法令 catalog (~3,400 憲法 / 法律 / 政令 / 勅令 / 府省令 / 規則 / 告示 / ガイドライン harvested under CC-BY 4.0). Primary surface for \"what is the 根拠法 of 補助金 X\" and \"which statute does this article cite\" questions. Returns law_title + number + enforced_date + ministry + summary + lineage.\n\n    CHAIN:\n      → `get_law(unified_id)` for full detail on a single row.\n      → `list_law_revisions(unified_id)` to walk superseded_by_law_id chain.\n      → `find_cases_by_law(law_unified_id)` for 判例 citing this statute.\n      → `trace_program_to_law(program_unified_id)` for the reverse edge.\n\n    WHEN NOT:\n      - `search_programs` instead for 補助金 discovery — laws is statute-only.\n      - `search_tax_rules` instead for 税制 Q&A / decision rulesets.\n\n    LIMITATIONS:\n      - Same FTS5 trigram single-kanji false-positive gotcha as search_programs.\n      - `currently_effective_only=True` hides superseded rows; disable for diachronic analysis.\n\n    --- R1 routing block (Phase 1 — 2026-05-18) ---\n    SUMMARY: ~3,400 e-Gov 法令 (憲法 / 法律 / 政令 / 府省令 / 規則 / 告示) 横断検索。\n    WHEN TO USE:\n    - ユーザが「X の根拠法は?」「Y 法第 N 条」を探している\n    - 回答に law_title + 法令番号 + 施行日 + 所管府省 + summary が必要\n    - freshness 重要 (改正情報 / 現行 vs 旧法 / 廃止リスク)\n    - 弁護士 / 司法書士 / 行政書士 / 弁理士 peer group の statute-first query\n    WHEN NOT TO USE:\n    - 判例検索 → search_court_decisions\n    - 補助金検索 → search_programs\n    - 税制 Q&A → search_tax_rules\n    - 翻訳 / 外国法\n    EXAMPLE INPUT: {\"q\": \"中小企業等経営強化法\",\n                    \"currently_effective_only\": true, \"limit\": 5}\n    EXAMPLE OUTPUT: {\"total\": 1, \"results\": [{\"unified_id\": \"LAW-...\",\n                     \"law_title\": \"...\", \"law_number\": \"平成11年法律第18号\",\n                     \"ministry\": \"経済産業省\", \"revision_status\": \"current\",\n                     \"source_url\": \"https://elaws.e-gov.go.jp/...\",\n                     \"freshness_iso\": \"...\", \"ed25519_sig\": \"...\"}]}\n    COST: ¥3 (Tier B) per call"
    },
    {
      "name": "get_law",
      "description": "INGREDIENT: returns ingredient (foundation legal record), client agent applies finishing. Usage model: foundation data; client agent finishes ~500 token (¥5-¥15) before showing to end user. Do not surface raw JSON. DETAIL-LAW: fetch a single 法令 row by LAW-<10 hex> unified_id. Returns full record with summary, article_count, ministry, enforced_date, superseded_by_law_id lineage, plus source_url + fetched_at. Provenance: e-Gov 法令 API V2 (CC-BY 4.0).\n\n    Example:\n        get_law(unified_id=\"LAW-1a2b3c4d5e\")\n        → {\"unified_id\": \"LAW-1a2b3c4d5e\", \"law_name\": \"...\", \"ministry\": \"...\",\n           \"article_count\": 213, \"revision_status\": \"current\", \"source_url\": \"...\"}\n\n    When NOT to call:\n        - Without a LAW-<10 hex> unified_id → use search_laws first.\n        - For full article text → use get_law_article_am (this returns law metadata).\n        - For 判例 / case detail → use get_court_decision instead.\n        - For tax rulesets derived from a law → use get_tax_rule.\n\n    CHAIN:\n      ← `search_laws` produces the unified_id.\n      → `list_law_revisions(unified_id)` when revision_status != 'current'.\n      → `find_cases_by_law(law_unified_id)` for 判例 citing this law.\n\n    When to use: 1 法令 row detail (法令名 + 所管省庁 + 施行日 +\n    revision lineage + 条文数 + source_url) by LAW-<10 hex>\n    unified_id.\n    Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest: provenance is e-Gov 法令 API V2\n    (CC-BY 4.0); law metadata only (NOT full article text).\n    For personas: 弁護士 / 司法書士 / 行政書士 office citing\n    法令 metadata in 申請書面 / 訴訟資料, 税理士 office\n    referencing 税法 metadata in 月次顧問業務, 中小企業診断士\n    office linking 制度 to 法令根拠, FDE building \"show me\n    法令 detail\" widget, agent triaging \"what's the metadata\n    of this law\" question.\n    Example: get_law(unified_id=\"LAW-1a2b3c4d5e\") -> {unified_id:\n    \"LAW-1a2b3c4d5e\", law_name: \"中小企業基本法\", law_type:\n    \"act\", ministry: \"経産省\", article_count: 213,\n    promulgated_date: \"1963-07-20\", enforced_date: \"1963-07-20\",\n    revision_status: \"current\", superseded_by_law_id: null,\n    summary: \"…\", source_url:\n    \"https://elaws.e-gov.go.jp/document?lawid=…\",\n    fetched_at: \"…\"}.\n    Not for: free-text 法令 discovery (use search_laws first);\n    full article text (use get_law_article_am — this returns\n    法令 metadata only); 判例 / case detail (use\n    get_court_decision); 税制 derived from law (use\n    get_tax_rule); 法解釈 / 訴訟戦略 (士業法 fence — 弁護士法\n    §72 — substrate only, NOT 法解釈 / 監査意見 / 申請書面\n    final); 法令有効性 / 施行 認定 (景表法 fence — metadata\n    only, NOT 法的有効性 判定 — verify e-Gov); revision_status\n    interpretation as \"current at any date\" (status reflects\n    current snapshot; for historical state use\n    list_law_revisions / query_at_snapshot_v2); 法令 license\n    redistribution (CC-BY 4.0 — caller must preserve\n    attribution); 法令 改正 prediction (use track_amendment_\n    lineage_am or policy_upstream_watch)."
    },
    {
      "name": "list_law_revisions",
      "description": "LINEAGE-LAW: trace the revision chain for a 法令 — walks `superseded_by_law_id` forward and backward to reconstruct (predecessors → this → successors → current). Essential for diachronic legal analysis (\"which law was in force on 2023-06-01?\").\n\n    Returns:\n      - predecessors[]: rows where superseded_by_law_id == given unified_id, recursively\n      - self: the starting row\n      - successors[]: forward chain through superseded_by_law_id pointers\n      - current_id: terminal row in the successor chain (revision_status='current' or chain tail)\n\n    CHAIN:\n      ← `search_laws` / `get_law` produces the unified_id.\n      → `find_cases_by_law(law_unified_id=current_id)` to run 判例 against the current form.\n\n    LIMITATIONS:\n      - Chain integrity depends on ingest; orphan pointers return an empty successors list without error.\n      - Cycles are prevented by max_hops + a visited-set.\n\n    When to use: 弁護士 / 税理士 / FDE doing diachronic legal\n    analysis — \"which version of the law was in force on date X?\".\n    Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest: chain integrity depends on ingest; orphan pointers\n    return empty successors without error (NOT \"no revisions\n    happened\").\n    For personas: 弁護士 office doing 過去法令適用 brief (which law\n    applied on incident date), 税理士 office tracking 税制改正\n    timeline, FDE building \"law version history\" sidebar, agent\n    triaging \"find the 2018 form of this law\" query.\n    Example: list_law_revisions(unified_id=\"LAW-0123abcdef\") →\n    {predecessors:[{...older versions...}], self:{...},\n    successors:[{...newer versions...}], current_id:\n    \"LAW-fedcba9876\"}.\n    Not for: 法令本文 lookup (get_law); 判例 検索 (find_cases_by_law);\n    法解釈 final ruling (弁護士法 §72 fence — agent surfaces\n    revision chain, final 法解釈 belongs to 弁護士); cycle guarantee\n    beyond max_hops (visited-set + max_hops is best-effort, very\n    long chains may truncate)."
    },
    {
      "name": "search_court_decisions",
      "description": "INGREDIENT: returns ingredient (foundation court-decision data), client agent applies finishing. Usage model: foundation data; client agent finishes ~500 token (¥5-¥15), translates to case-law brief, cites source_url + 8-fence disclaimer. Do not surface raw JSON. DISCOVER-CASE: search 判例 (courts.go.jp hanrei_jp primary source). Ordered by precedent_weight (binding > persuasive > informational), then court_level (supreme > high > district …), then most-recent decision_date. Commercial aggregators (D1 Law / Westlaw / LEX/public index) are banned at ingest.\n\n    CHAIN:\n      → `get_court_decision(unified_id)` for full record.\n      → `find_precedents_by_statute(law_unified_id)` for statute→rulings.\n      → `find_cases_by_law(law_unified_id, include_enforcement=True)` to combine with 会計検査院.\n\n    WHEN NOT:\n      - `search_enforcement_cases` instead for 会計検査院 reports (not court rulings).\n      - `search_laws` instead for statute text.\n\n    LIMITATIONS:\n      - DATA AVAILABILITY: 0 rows loaded as of 2026-04-24. Schema and ingest infrastructure are pre-built; initial data load is coming post-launch. Queries will return empty results until then.\n      - Same FTS trigram single-kanji false-positive gotcha.\n      - `references_law_id` is a JSON-array substring LIKE — accurate because unified_ids are fixed-width."
    },
    {
      "name": "get_court_decision",
      "description": "DETAIL-CASE: fetch a single 判例 with full source lineage (courts.go.jp primary). Returns case_name, court, decision_date, key_ruling, impact_on_business, related_law_ids, precedent_weight, source_url + source_excerpt + fetched_at.\n\n    Example:\n        get_court_decision(unified_id=\"HAN-0123abcdef\")\n        → {\"unified_id\": \"HAN-0123abcdef\", \"case_name\": \"...\", \"court\": \"...\",\n           \"key_ruling\": \"...\", \"related_law_ids\": [\"LAW-...\"], \"source_url\": \"...\"}\n\n    When NOT to call:\n        - Without a HAN-<10 hex> unified_id → use search_court_decisions first.\n        - For 行政処分 / 会計検査院 audit findings → use get_enforcement_case instead.\n        - For statutory text itself → use get_law (this returns the ruling, not the law).\n        - To trace ALL precedents citing one statute → use find_precedents_by_statute.\n\n    CHAIN:\n      ← `search_court_decisions` or `find_precedents_by_statute` produces the unified_id.\n      → `get_law(law_unified_id)` for each related_law_ids entry.\n\n    When to use: 弁護士 / 弁理士 / 司法書士 / FDE pulling a single\n    判例 with full courts.go.jp source lineage — case_name, court,\n    decision_date, key_ruling, impact_on_business, related_law_ids,\n    precedent_weight.\n    Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest: court_decisions\n    substrate, NOT 法解釈; precedent_weight is an as-published\n    label (上告審 / 下級審) not a 拘束力 verdict.\n    For personas: 弁護士 office building 訴訟 brief grounded in\n    既判決, 弁理士 office citing 判例 in 拒絶査定不服 / 無効審判,\n    司法書士 office referencing 判例 in 登記・供託 dispute, FDE\n    building \"show me the leading 判例 on this issue\" widget.\n    Example: get_court_decision(unified_id=\"HAN-0123abcdef\") →\n    {unified_id:\"HAN-0123abcdef\", case_name:\"...\", court:\"...\",\n    decision_date:\"2023-06-15\", key_ruling:\"...\",\n    impact_on_business:\"...\", related_law_ids:[\"LAW-...\"],\n    precedent_weight:\"最高裁判決\", source_url:\n    \"https://www.courts.go.jp/...\", source_excerpt:\"...\",\n    fetched_at:\"...\"}.\n    Not for: 行政処分 / 会計検査院 検査結果 (get_enforcement_case);\n    statutory text (get_law); free-text discovery\n    (search_court_decisions); precedent census on one law\n    (find_precedents_by_statute); 法解釈 / 訴訟戦略 final\n    (弁護士法 §72 fence — agent surfaces the ruling, final\n    interpretation belongs to 弁護士); 拘束力評価 (precedent_weight\n    is label only, not 法的拘束力 verdict)."
    },
    {
      "name": "find_precedents_by_statute",
      "description": "TRACE-STATUTE: given a LAW-<10 hex> unified_id, return 判例 citing that statute via related_law_ids_json. Ordered by precedent_weight → court_level → decision_date. When `article_citation` is set, we additionally require the article string to appear in key_ruling or source_excerpt (best-effort narrowing).\n\n    Example:\n        find_precedents_by_statute(law_unified_id=\"LAW-1a2b3c4d5e\",\n                                   article_citation=\"第22条\", limit=20)\n        → {\"results\": [{\"unified_id\": \"HAN-...\", \"case_name\": \"...\",\n                        \"precedent_weight\": 0.82, ...}], \"total\": N}\n\n    When NOT to call:\n        - For full free-text 判例 search → use search_court_decisions.\n        - To fetch ONE 判例's full record → use get_court_decision (this returns a list).\n        - To pull 会計検査院 audit hits too → use find_cases_by_law(include_enforcement=True).\n        - Without a LAW-<10 hex> id → use search_laws to resolve a name to id first.\n\n    CHAIN:\n      ← `search_laws` / `get_law` produces the law_unified_id.\n      → `get_court_decision(unified_id)` for each hit's full record.\n      → `find_cases_by_law(law_unified_id, include_enforcement=True)` to also pull 会計検査院.\n\n    LIMITATIONS:\n      - Article narrowing is best-effort (string contains), not a structured (law_id, article) FK join."
    },
    {
      "name": "search_bids",
      "description": "INGREDIENT: returns ingredient (foundation procurement-notice data), client agent applies finishing. Usage model: foundation data; client agent finishes ~500 token (¥5-¥15), translates to bid-brief, cites source_url. Do not surface raw JSON. DISCOVER-BID: search 入札 (GEPS 政府電子調達 CC-BY 4.0 + self-gov top-7 JV flows + ministry *.go.jp). Primary-source only — NJSS-style aggregators are banned at ingest. Headline query: \"vendors that won 5000万円+ 公募型補助 in 2025\".\n\n    CHAIN:\n      → `get_bid(unified_id)` for full record.\n      → `bid_eligible_for_profile(unified_id, business_profile)` to screen an applicant.\n      → `search_programs(unified_id=program_id_hint)` to tie a bid to the funded 補助事業.\n\n    WHEN NOT:\n      - `search_programs` instead for 補助金 募集 — bids is procurement (after-the-fact), not funded-program discovery.\n\n    LIMITATIONS:\n      - DATA AVAILABILITY: 0 rows loaded as of 2026-04-24. Schema and ingest infrastructure are pre-built; initial data load is coming post-launch. Queries will return empty results until then.\n      - Same FTS trigram gotcha; quote 2+ char kanji compounds.\n      - `program_id_hint` is a soft ref (no FK) — may be NULL on 公募型補助 / stale."
    },
    {
      "name": "get_bid",
      "description": "DETAIL-BID: fetch a single 入札案件 (procurement notice / 落札結果). Returns bid_title, bid_kind, procuring_entity + houjin_bangou, ministry, prefecture, program_id_hint, all deadline + amount + winner fields, eligibility_conditions, classification_code (役務/物品/工事), and full lineage.\n\n    Example:\n        get_bid(unified_id=\"BID-9f8e7d6c5b\")\n        → {\"unified_id\": \"BID-9f8e7d6c5b\", \"bid_title\": \"...\", \"bid_kind\": \"役務\",\n           \"procuring_entity\": \"...\", \"deadline\": \"...\", \"winner_name\": \"...\"}\n\n    When NOT to call:\n        - Without a BID-<10 hex> id → use search_bids first.\n        - For 補助金 / 助成金 program detail → use get_program (bids are procurement, not subsidies).\n        - To screen applicability → use bid_eligible_for_profile (this is just the raw record).\n        - For tax / law / 判例 detail → use get_tax_rule / get_law / get_court_decision.\n\n    CHAIN:\n      ← `search_bids` produces the unified_id.\n      → `bid_eligible_for_profile(unified_id, business_profile)` to screen applicability.\n      → `search_programs(unified_id=program_id_hint)` when the bid links to a funded 補助事業.\n\n    When to use: 行政書士 / 中小企業診断士 / FDE / agent\n    triaging a single 入札案件 detail for grounding an\n    applicability check.\n    Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest: 落札結果 +\n    procurement notice substrate only; eligibility_conditions\n    is free text (caller must parse).\n    For personas: 行政書士 office citing 入札条件 in 申請書面,\n    中小企業診断士 office prepping 落札可能性 audit, FDE\n    building \"show me 入札案件 detail\" widget, agent triaging\n    \"what are the bid terms for procurement X\" question.\n    Example: get_bid(unified_id=\"BID-9f8e7d6c5b\") -> {unified_id:\n    \"BID-9f8e7d6c5b\", bid_title: \"…\", bid_kind: \"役務\",\n    procuring_entity: \"…\", procuring_houjin_bangou: \"…\",\n    ministry: \"…\", prefecture: \"東京都\", program_id_hint: \"…\",\n    deadline: \"…\", amount_yen: …, winner_name: \"…\",\n    eligibility_conditions: \"…\", classification_code: \"役務\",\n    source_url: \"…\", fetched_at: \"…\"}.\n    Not for: free-text 入札 discovery without unified_id (use\n    search_bids); 補助金 / 助成金 program detail (use\n    get_program; bids are procurement, not subsidies);\n    applicability screening (use bid_eligible_for_profile —\n    this is raw record only); 落札保証 / 入札保証 (景表法\n    fence — historical record only, NOT 未来予測);\n    eligibility_conditions empty == \"unknown\" NOT\n    \"unrestricted\"; 経営審査 / 指名停止 / 建設業許可 verification\n    (verify with primary source_url); 与信判断 (信用情報法\n    fence — public procurement record only); 行政書士 申請書面\n    作成 (行政書士法 §1 fence — substrate only)."
    },
    {
      "name": "bid_eligible_for_profile",
      "description": "SCREEN-BID: compare a business profile against bid.eligibility_conditions. Honest substring scan — not a structured eligibility engine. Returns `possibly_eligible` (bool, True unless a hard mismatch is found) + matched_signals + unmatched_signals + caveats.\n\n    Signals:\n      - prefecture: \"当県内\" / prefecture string LIKE match\n      - rating_grade: '等級' / 'A等級' etc. present + matches profile.rating_grade\n      - industry_jsic: JSIC label substring\n      - houjin_bangou: exact 13-digit match against procuring_houjin_bangou (conflict-of-interest marker)\n\n    WHEN NOT:\n      - Treat an empty eligibility_conditions as \"unknown\" — absent text does not mean unrestricted.\n      - This tool does not verify 経営審査 / 指名停止 / 建設業許可 status. Always confirm with the primary source_url before bidding.\n\n    CHAIN:\n      ← `search_bids` / `get_bid` produces the bid_unified_id.\n      → `search_court_decisions(q='指名停止')` for 指名停止 jurisprudence if profile hits a conflict.\n\n    When to use: 行政書士 / 中小企業診断士 / FDE / agent doing\n    pre-bid sanity check against a single 入札公告 — substring scan\n    against eligibility_conditions + COI flag (法人番号 vs\n    procuring_houjin_bangou).\n    Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest: pure substring; absent text ≠\n    unrestricted; does NOT verify 経営審査 / 指名停止 / 建設業\n    許可 status (always confirm via source_url).\n    For personas: 行政書士 office screening clients before 入札参加\n    申請, 中小企業診断士 office building \"shortlist 10 bids my\n    client can plausibly win\" widget, FDE building bid-matching\n    pipeline, agent triaging \"can profile X bid on tender Y?\"\n    question.\n    Example: bid_eligible_for_profile(bid_unified_id=\"BID-...\",\n    profile={prefecture:\"東京\", rating_grade:\"A\", industry_jsic:\n    \"F\"}) → {possibly_eligible:true, matched_signals:[\"prefecture\n    LIKE 当県内\", \"rating_grade A 等級 hit\", \"JSIC F\"],\n    unmatched_signals:[], caveats:[\"empty eligibility_conditions =\n    unknown, not unrestricted\"]}.\n    Not for: 経審 / 指名停止 / 建設業許可 真値判定 (source_url 確認\n    必須); 申請書面作成 (行政書士法 §1 fence — agent surfaces the\n    sanity flag, final 書面 belongs to 行政書士); 入札落札予測\n    (景表法 fence — eligibility ≠ 落札確率); empty\n    eligibility_conditions interpretation (treat as \"unknown\",\n    NOT \"unrestricted\" — always reconfirm at source)."
    },
    {
      "name": "search_tax_rules",
      "description": "DISCOVER-TAX: search 税務判定ルールセット (国税庁 タックスアンサー + 電帳法一問一答 + インボイス Q&A). Each row pairs narrative `eligibility_conditions` with a machine-readable predicate tree for `evaluate_tax_applicability`.\n\n    CHAIN:\n      → `get_tax_rule(unified_id)` for a single row.\n      → `evaluate_tax_applicability(business_profile, target_ruleset_ids)` to run the predicate engine.\n\n    WHEN NOT:\n      - `search_laws` instead for the underlying statute (related_law_ids links to LAW-*).\n      - `search_programs` instead for 補助金 / 助成金.\n\n    LIMITATIONS:\n      - This is NOT tax advice. `evaluate_tax_applicability` only matches declared JSON predicates — it does not interpret tax law.\n      - Cliff dates: 2026-09-30 (2割特例 終了), 2027-09-30 (80% 経過措置), 2029-09-30 (50% 経過措置 / 少額特例 終了). Use `effective_on` to snapshot.\n      - COVERAGE (35 rows live): インボイス制度 / 電子帳簿保存法 / 中小企業 法人税・消費税 特例. 相続税 / 贈与税 / 事業承継税制 / 組織再編税制 は未収載 — broader tax-rule lookup が必要な場合は `get_am_tax_rule` を併用してください.\n\n    --- R1 routing block (Phase 1 — 2026-05-18, closest equivalent of `corporate_tax_rate`) ---\n    SUMMARY: 国税庁 タックスアンサー + 電帳法一問一答 + インボイス Q&A の決定ルール検索。\n    WHEN TO USE:\n    - ユーザが法人税 / 所得税 / 消費税 / 地方税の決定ルールを探している\n    - 「法人税の実効税率は?」「軽減税率の閾値は?」「インボイス2割特例の期間は?」\n    - 税理士 peer group 月次質問\n    - freshness 重要 (税制改正 / 経過措置 / 防衛特別法人税)\n    WHEN NOT TO USE:\n    - プロファイル → 適用判定 → evaluate_tax_applicability\n    - 1 件の税制 ruleset 本体 → get_tax_rule\n    - 税額控除など incentive 中心 → search_tax_incentives\n    - 翻訳 / 外国税制\n    EXAMPLE INPUT: {\"q\": \"法人実効税率\", \"limit\": 5}\n    EXAMPLE OUTPUT: {\"total\": 3, \"results\": [{\"unified_id\": \"TAX-...\",\n                     \"name\": \"...\", \"tax_kind\": \"corporate\", \"rate\": \"23.2%\",\n                     \"effective_from\": \"2025-04-01\",\n                     \"source_url\": \"https://www.nta.go.jp/...\",\n                     \"freshness_iso\": \"...\", \"ed25519_sig\": \"...\"}]}\n    COST: ¥3 (Tier B) per call"
    },
    {
      "name": "get_tax_rule",
      "description": "DETAIL-TAX: fetch a single 税務判定ルールセット by TAX-<10 hex>. Returns ruleset_name, tax_category, ruleset_kind, effective_from / effective_until (watch cliff dates), related_law_ids, narrative eligibility_conditions, predicate JSON, rate_or_amount, calculation_formula, filing_requirements, authority + URL, full lineage.\n\n    Example:\n        get_tax_rule(unified_id=\"TAX-0a1b2c3d4e\")\n        → {\"unified_id\": \"TAX-0a1b2c3d4e\", \"ruleset_name\": \"...\", \"tax_category\": \"法人税\",\n           \"effective_from\": \"2025-04-01\", \"rate_or_amount\": \"...\", \"predicate_json\": {...}}\n\n    When NOT to call:\n        - Without a TAX-<10 hex> id → use search_tax_rules / search_tax_incentives first.\n        - To EVALUATE applicability against a profile → use evaluate_tax_applicability.\n        - For statutory text → use get_law (this returns the predicate, not the law).\n        - For 補助金 / grant programs → use get_program (different table; tax rulesets are tax-only).\n        - For sunset alerts only → use list_tax_sunset_alerts.\n\n    CHAIN:\n      ← `search_tax_rules` produces the unified_id.\n      → `evaluate_tax_applicability(business_profile, target_ruleset_ids=[unified_id])` to run the predicate.\n      → `get_law(law_unified_id)` for each related_law_ids entry."
    },
    {
      "name": "evaluate_tax_applicability",
      "description": "JUDGE-TAX: evaluate eligibility predicates for tax rulesets against a caller business_profile. Walks `eligibility_conditions_json` per row and returns per-ruleset `applicable` + reasons + matched / unmatched predicate lists. Does NOT interpret tax law — pure JSON predicate matching.\n\n    Supported ops: eq / gte / lte / in / has_invoice_registration / all / any / not.\n    Missing profile field => False with reason \"field missing from profile: X\".\n    Malformed JSON or unsupported op => applicable=False with error code.\n\n    Example:\n        evaluate_tax_applicability(\n            business_profile={\"annual_revenue_yen\": 80000000, \"employees\": 12,\n                              \"invoice_registration_number\": \"T1234...\"},\n            target_ruleset_ids=[\"TAX-0a1b2c3d4e\", \"TAX-9f8e7d6c5b\"])\n        → {\"results\": [{\"unified_id\": \"TAX-0a1b2c3d4e\", \"applicable\": true,\n                        \"matched\": [...], \"unmatched\": []}, ...]}\n\n    When NOT to call:\n        - To find candidate rulesets first → use search_tax_rules / search_tax_incentives.\n        - For raw ruleset detail → use get_tax_rule (this evaluates; that returns the rule).\n        - As a final tax filing decision — always confirm with source_url + a tax professional.\n        - For 補助金 / loan / bid eligibility → use the matching domain-specific eligibility tool.\n\n    CHAIN:\n      ← `search_tax_rules` / `get_tax_rule` surfaces candidate TAX-<10 hex> ids.\n      → `get_law(law_unified_id)` for statute behind an applicable ruleset.\n\n    --- R1 routing block (Phase 1 — 2026-05-18) ---\n    SUMMARY: business_profile を入力に tax_rulesets の predicate を機械的に評価し、applicable + matched/unmatched + reasons + source を返す。\n    WHEN TO USE:\n    - ユーザが business_profile を持ち、適用税制を一括判定したい\n    - 「うちの会社にインボイス 2 割特例は当てはまる?」決定的判定\n    - 税理士 peer group: 顧問先プロファイル → 適用税制 fanout\n    - 回答に matched / unmatched predicate + reason + source 必要\n    WHEN NOT TO USE:\n    - 候補税制をまず探したい → search_tax_rules / search_tax_incentives\n    - 税制本文 → get_tax_rule\n    - 税額シミュレーション (numeric) → 本 tool は predicate matching のみ\n    - 最終申告判断 — 必ず source_url + 税理士確認\n    EXAMPLE INPUT: {\"business_profile\": {\"annual_revenue_yen\": 80000000,\n                                          \"employees\": 12,\n                                          \"invoice_registration_number\": \"T1234...\"},\n                    \"target_ruleset_ids\": [\"TAX-0a1b2c3d4e\"]}\n    EXAMPLE OUTPUT: {\"results\": [{\"unified_id\": \"TAX-0a1b2c3d4e\",\n                                  \"applicable\": true,\n                                  \"matched\": [\"annual_revenue_yen lte 1e9\",\n                                              \"has_invoice_registration\"],\n                                  \"unmatched\": [], \"reasons\": [\"...\"],\n                                  \"source_url\": \"https://www.nta.go.jp/...\",\n                                  \"ed25519_sig\": \"...\"}]}\n    COST: ¥9 (Tier A) per call — predicate composer"
    },
    {
      "name": "compose_audit_workpaper",
      "description": "[KAIKEI] 監査ワークペーパー (PDF/CSV/MD/DOCX) を 1 件の client + ruleset セットに対して生成する。corpus_snapshot_id + sha256 + §47条の2 wording を全 surface に埋め込む。WeasyPrint レンダ → published artifact/ に stored result、再 pull は無料。¥3 × N + ¥30 export fee。§47条の2 + §52 sensitive — 監査意見の代替ではない。\n\n    When to use: 公認会計士 / 監査法人 agent needs an audit\n    work-paper deliverable bound to a specific corpus snapshot\n    + sha256 hash. One call hydrates 1..100 TAX-* ruleset rows\n    against the client's business profile and renders to\n    PDF/CSV/MD/DOCX with §47条の2 wording embedded in every\n    surface. Cached by client_id+ruleset+snapshot tuple, so\n    re-pull is ¥0.\n    For personas: 公認会計士 doing client 監査意見 prep;\n    監査法人 staff aggregating ruleset coverage; AX engineer\n    building an audit drafter; FDE designing a multi-tenant\n    audit firm that needs immutable corpus-bound artifacts.\n    Example: client_id=\"ACME-2026-Q4\",\n    target_ruleset_ids=[\"TAX-0a1b2c3d4e\",\"TAX-...\"],\n    business_profile={\"jsic\":\"E29\",\"revenue_yen\":850000000,\n    \"employee_count\":42}, output_format=\"pdf\" → returns\n    {\"workpaper_url\": \"/workpapers/ACME-2026-Q4-...pdf\",\n    \"corpus_snapshot_id\": \"2026-05-28T15:00:00Z\",\n    \"sha256\": \"...\", \"ruleset_count\": 12, \"_billing_unit\": 12,\n    \"_export_fee\": 30, \"schema_version\": \"kaikei.workpaper.v1\"}.\n    Not for: 監査意見 final 表明 (§47条の2 fence — 公認会計士\n    signs; this is scaffold + evidence retrieval substrate);\n    税務助言 final 判断 (§52 fence); >100 ruleset fan-out\n    (split into multiple calls); free-form 監査 narrative\n    composition (the work-paper carries citation rows only,\n    not opinion text)."
    },
    {
      "name": "audit_batch_evaluate",
      "description": "[KAIKEI] Batch evaluation across an audit firm's client population. ¥3 × N profiles billing (K=10 fan-out → 5,000×100=50,000 units / ¥150,000). Returns per-profile results + anomalies (population-deviation flags) + kaikei_fields (調書記載要否 / 重要性閾値 / 監査リスク評価) per cell. §47条の2 + §52 sensitive — checklist, not 監査意見.\n\n    When to use: 公認会計士 / 監査法人 agent has a population of client profiles (up to\n    5,000) and a set of target tax ruleset IDs (up to 100), and wants per-cell evaluation\n    + population-deviation anomalies + kaikei scaffolding fields (調書記載要否 / 重要性閾値\n    / 監査リスク評価) in one fan-out call. Billing is ¥3 × N profiles. The output is a\n    structured checklist scaffold for the 監査調書 — NOT 監査意見 emission.\n    For personas: 公認会計士 partner running 年次監査 across an audit-firm client\n    population (final §47条の2 監査意見 belongs to 公認会計士); 税理士 batch-evaluating tax\n    rulesets across a TKC-style client book (final §52 税務代理 belongs to 税理士); AX_engineer\n    wiring an \"audit firm batch check\" widget; researcher producing audit-population baseline\n    studies.\n    Example: audit_firm_id=\"firm:XYZ\", profiles=[{client_id:\"C001\", profile:{...}}, ...],\n    target_ruleset_ids=[\"TAX-abcdef0123\", ...] → per-profile results + anomalies (population\n    deviation flags) + kaikei_fields per cell.\n    Not for: 監査意見 emission (this is checklist scaffold, final §47条の2 監査意見 belongs\n    to 公認会計士); single-profile evaluation (use evaluate_tax_applicability); free-text\n    監査調書 drafting (use kaikeishi peer group artifact builders). NO LLM inference inside\n    this tool."
    },
    {
      "name": "resolve_citation_chain",
      "description": "[KAIKEI] tax_ruleset → 法令 article → 通達 → 質疑応答 → 文書回答 の citation chain を auto-resolve する。国税庁・法令・判例の公表情報をつなぎ、監査調書の索引に貼りやすい tree を返す。¥3/billable unit。§47条の2 + §52 sensitive — 税務助言ではなく出典確認用。\n\n    When to use: when the agent has a ``TAX-<hex>`` ruleset_id (from\n    ``search_chunks`` / ``outcome_tax_ruleset_phase_change`` / 監査\n    調書 indexing) and needs the FULL transitive citation tree —\n    法令 article → 通達 → 質疑応答 → 文書回答 — for one call to\n    paste into an 監査調書 audit index. deterministic retrieval over published\n    国税庁 / e-Gov / 判例 sources + 3-axis citation envelope per\n    node. ¥3/billable unit. NO LLM. 出典確認用 ONLY (NOT 税務助言).\n    For personas: 税理士 / 会計士 peer group agents building 監査調書\n    cite index from a known ruleset; 弁護士 peer group agents tracing\n    税制 case-law roots; AX_engineer building a 税制 evidence tree\n    viewer.\n    Example: ruleset_id=\"TAX-abc1234def\" →\n    {\"root\": {\"ruleset_id\": \"...\", \"title\": \"...\"},\n    \"tree\": [{\"node_kind\": \"law_article\", \"law_id\": \"...\",\n    \"article\": \"...\", \"url\": \"...\", \"retrieved_at\": \"...\",\n    \"children\": [{\"node_kind\": \"tsutatsu\", ...}, ...]}],\n    \"audit_disclaimer\": \"...\"}. deterministic retrieval, no LLM.\n    Not for: 助言-style 税制解釈 generation (士業法 fence — agent\n    composes the user-facing memo from the cite tree); free-text\n    ruleset discovery (use ``search_chunks`` first to find the\n    ruleset_id); 通達 keyword search (use ``search_tsutatsu``); cross-\n    ruleset comparison (call this tool per ruleset_id and compose)."
    },
    {
      "name": "search_invoice_registrants",
      "description": "INGREDIENT: returns ingredient (foundation invoice-registrant data), client agent applies finishing. Usage model: foundation data; client agent finishes ~500 token (¥5-¥15), translates to registrant brief, cites source_url. Do not surface raw JSON. LOOKUP-INVOICE: search 適格請求書発行事業者 (国税庁 bulk, PDL v1.0). Returns {total, limit, offset, results, attribution} — covered responses include the mandatory 出典明記 + 編集・加工注記 block per PDL v1.0.\n\n    CHAIN:\n      → (verify invoice_registration_number) for T<13 digits> validation in downstream flows.\n      → `search_court_decisions(q='適格請求書')` for 判例 on 適格請求書 / 仕入控除.\n\n    WHEN NOT:\n      - Do NOT call with empty q + empty filters to enumerate the 4M-row master — the hard 100-row cap plus the PDL attribution on every page prevent scraping. Use NTA's own bulk download.\n      - Do NOT append name-matching logic on top — sole-proprietor rows are only present because ingest pre-filtered to NTA's consent model.\n\n    LIMITATIONS:\n      - Coverage: 13,801 current mirror rows are loaded. A `total=0` response is not a final registration verdict. Always point the user at 国税庁 適格事業者公表サイト (https://www.invoice-kohyo.nta.go.jp/) for the 確定 lookup.\n      - 法人 rows carry houjin_bangou; sole-proprietors do NOT (soft-FK to houjin_master).\n      - `active_only=True` hides revoked/expired; required for \"is this invoice number currently valid?\".\n      - `q` is prefix LIKE on normalized_name, NOT FTS — kana variants are not synthesized at the MCP layer."
    },
    {
      "name": "trace_program_to_law",
      "description": "TRACE-PROGRAM-LAW: given a program unified_id, return its 根拠法 / 関連法 chain — joins `source-derived dataset` → `laws`. Each entry reports ref_kind (authority / eligibility / exclusion / reference / penalty), article_citation, law title, and (when follow_revision_chain=True) the current form of the law after walking superseded_by_law_id.\n\n    Returns:\n      - program_id\n      - legal_basis_chain[]: list of {law_id, ref_kind, article_citation, title, law_number, revision_status, current_law_id?, current_title?}\n\n    CHAIN:\n      ← `search_programs` / `get_program` produces the program_unified_id.\n      → `get_law(law_unified_id)` for full law detail.\n      → `find_cases_by_law(current_law_id)` to run 判例 against the live version.\n\n    LIMITATIONS:\n      - Only surfaces links the ingest layer recorded. Programs without populated `source-derived dataset` return an empty `legal_basis_chain`.\n\n    When to use: 行政書士 / 中小企業診断士 / FDE doing 制度→根拠\n    法令 traceback — \"what statute backs this 補助金?\".\n    Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest: only surfaces links the ingest\n    layer recorded; empty `legal_basis_chain` ≠ \"no legal basis\"\n    — it may simply mean source-derived dataset is not yet populated for\n    that program.\n    For personas: 行政書士 office prepping 認定申請 (citing 根拠法\n    in cover letter), 中小企業診断士 office mapping 補助金 ladder\n    to 中小企業基本法 / 経営強化法 hierarchy, FDE building \"show\n    me the laws behind this 補助金\" widget, agent triaging\n    \"is this program backed by 法令 or 通達 only?\".\n    Example: trace_program_to_law(program_unified_id=\n    \"UNI-jigyou-saikouchiku\", follow_revision_chain=true) →\n    {program_id:\"...\", legal_basis_chain:[{law_id:\"LAW-...\",\n    ref_kind:\"authority\", article_citation:\"第3条\", title:\"...\",\n    revision_status:\"superseded\", current_law_id:\"LAW-newer\",\n    current_title:\"...\"}]}.\n    Not for: full statutory text (get_law / get_law_article_am);\n    法解釈 / 認定可否判定 (弁護士法 §72 / 行政書士法 §1 fence —\n    agent surfaces the chain, final 解釈 / 認定 belongs to 士業);\n    revision chain for laws without program ref (use\n    list_law_revisions directly)."
    },
    {
      "name": "find_cases_by_law",
      "description": "TRACE-LAW-CASES: given a LAW-<10 hex>, return (court_decisions citing it) + optionally (source-derived dataset linked to those decisions via enforcement_decision_refs). Essential for \"which rulings + 会計検査院 findings interpret 補助金適正化法 第22条\" in one call.\n\n    Returns:\n      - law_id\n      - court_decisions[]: direct citers via related_law_ids_json\n      - source-derived dataset[]: linked via enforcement_decision_refs (when include_enforcement=True)\n      - totals: {court_decisions, source-derived dataset}\n\n    CHAIN:\n      ← `trace_program_to_law` or `get_law` produces the law_unified_id.\n      → `get_court_decision(unified_id)` for detail.\n      → `get_enforcement_case(case_id)` for each enforcement hit.\n\n    LIMITATIONS:\n      - enforcement_decision_refs coverage depends on manual curation — absence is not proof of no litigation.\n\n    When to use: 弁護士 / 司法書士 / 補助金適正化 office triaging \"what\n    rulings + 会計検査院 enforcement findings interpret this 法令 article\"\n    in ONE call — pairs court_decisions citing the LAW-<id> with the\n    source-derived dataset linked via enforcement_decision_refs.\n    Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest: manual-curation gap on\n    enforcement_decision_refs → absence is NOT proof of no litigation.\n    For personas: 弁護士 office building a 法解釈 brief surfacing\n    interpretive case-law + enforcement priors for a specific 法令\n    article, 補助金適正化 office triaging audit-cite chain, 司法書士\n    office checking 登記 / 供託 法令 interpretation history, FDE\n    building a regulator-grade legal-research panel.\n    Example: law_unified_id=\"LAW-0123456789\",\n    include_enforcement=true, limit=20 → returns {law_id:\n    \"LAW-0123456789\", court_decisions:[{unified_id:\"…\",\n    decision_date:\"…\", court:\"…\", short_summary:\"…\",\n    weight_rank:\"最高裁\"}, …], source-derived dataset:[{case_id:\"…\",\n    venue:\"会計検査院\", finding:\"…\", linked_decision_id:\"…\"}, …],\n    totals:{court_decisions:N, source-derived dataset:M}}.\n    Not for: law_unified_id outside the LAW-<10 hex> regex (rejected);\n    law id not in laws table (seed_not_found); 法解釈 final emission\n    (弁護士法 §72 fence — substrate only); 監査結論 / 検査結果 final\n    (会計検査院 / 監査主体 fence); cross-jurisdiction case retrieval\n    (single law per call); proof of \"no litigation\" claim\n    (enforcement_decision_refs has manual-curation coverage gaps —\n    absence is NOT exhaustive)."
    },
    {
      "name": "combined_compliance_check",
      "description": "OMNIBUS-COMPLIANCE: one-shot compliance report combining (a) source-derived dataset check for the named program, (b) tax_rulesets evaluation against business_profile, (c) top-N relevant bids (filtered by program_id_hint when program_unified_id is set, otherwise by business_profile.prefecture), and (d) when `candidate_program_ids` ≥ 2: pairwise source-derived dataset lookup + source-derived dataset member-containment match. Use when the caller says \"check everything for this business/program at once\".\n\n    DEPRECATED (2026-04-25): superseded by `rule_engine_check` (R9 unified rule\n    engine, 49,247 rows across 6 corpora incl. the 48,815-row dark inventory\n    source-derived dataset). Retained for backward compatibility and for the bid\n    filtering / tax_ruleset evaluation legs which `rule_engine_check` does not\n    yet cover. New integrations SHOULD prefer `rule_engine_check`.\n\n    Returns:\n      - program_id (echo)\n      - exclusion_check: {hits[], checked_rules} (empty when program_unified_id is None)\n      - tax_evaluation: {results[], applicable_count, applicable_ruleset_ids} — results is applicable-only by default; set tax_verbose=True to include non-matching rulesets.\n      - relevant_bids: [BidOut …] (up to top_bids)\n      - compat_matrix: {pairs[], incompatible_count, case_by_case_count, unknown_count, missing_count, include_inferred, inferred_excluded_count} (only when candidate_program_ids has ≥2 entries; reads source-derived dataset in native key shape; pairs[] filtered to inferred_only=0 by default — set include_inferred=True to widen).\n      - combo_calculator: {matched_combos[], unmatched_count} (only when candidate_program_ids has ≥2 entries; member-containment match against source-derived dataset).\n      - data_quality: {exclusion_join_coverage_pct, compat_unknown_bucket_pct, compat_inferred_pct} — honest data-coverage surface so the LLM does not silently treat dark-inventory gaps as \"all clear\".\n      - summary: terse natural-language roll-up.\n\n    CHAIN:\n      ← `search_programs` / `search_tax_rules` / `search_bids` / `subsidy_combo_finder` supply the inputs.\n      → `rule_engine_check` for unified rule evaluation across all 6 corpora (preferred).\n      → `evaluate_tax_applicability` for more targeted tax evaluation with explicit ids.\n      → `check_exclusions([program_a, program_b, …])` for pairwise 併給 checks.\n\n    LIMITATIONS:\n      - Not legal/tax advice — see each sub-tool's LIMITATIONS.\n      - `relevant_bids` ordering is best-effort; empty program_id_hint + empty prefecture reverts to recency ordering.\n      - When `program_unified_id` is supplied but does not exist in the `programs` table, `exclusion_check` silently returns empty — callers should pre-verify via `get_program(unified_id)` for hard-validation."
    },
    {
      "name": "regulatory_prep_pack",
      "description": "ONE-SHOT DISCOVERY: 業種 + 都道府県 (+ 規模) で「コンプラ pack」を 1 call で。\n\n    新規事業立ち上げ / 新規進出時に必要な regulatory コンテキストを 4 セクション\n    一括で返す。これがないと search_laws → programs(certification) → search_tax_rules →\n    search_enforcement_cases の 4-5 往復が必要。\n\n    返り値:\n      {\n        \"industry\": JSIC letter,\n        \"prefecture\": normalized name | None,\n        \"laws\":              [{law_id, canonical_name, scope_summary, source_url}, ...],\n        \"certifications\":    [{program_id, name, issuer, validity_years, url}, ...],\n        \"tax_rulesets\":      [{ruleset_id, name, effective_from, effective_until, url}, ...],\n        \"recent_enforcement\":[{case_id, authority, action, published_at, url}, ...],\n        \"generated_at\": ISO 8601 UTC,\n        \"hint\": str   # only when at least one section is empty\n      }\n\n    LIMITATIONS:\n      - laws.subject_areas_json / tax_rulesets.industry_scope は未populated のため、\n        業種 filter は 法令名・要件本文への kanji LIKE substring で best-effort 解決。\n        FP (false positive) を許容する代わりに 0 件を避ける設計。\n      - certifications テーブルは未存在 → programs(program_kind LIKE 'certification%') で代替。\n      - source-derived dataset に industry FK は無い。reason_excerpt / program_name_hint\n        への LIKE で粗く絞り、ヒット 0 件なら都道府県だけ で fallback。\n      - company_size は今 release では echo のみ (将来 tax cliff date filter に使う予定).\n\n    CHAIN:\n      → `get_law(unified_id)` で laws[i] の詳細\n      → `get_program(unified_id)` で certifications[i] の詳細\n      → `get_tax_rule(unified_id)` で tax_rulesets[i] の詳細\n      → `get_enforcement_case(case_id)` で recent_enforcement[i] の詳細"
    },
    {
      "name": "list_active_disaster_programs",
      "description": "DISASTER: 過去 12 ヶ月の災害復興・特例制度を 1 コールで surface する (list disaster-recovery programs surfaced in the rolling N-month window). Use as the 発災後 immediate-surface entry point — a 都道府県 LP team can call it within minutes of 災害指定 and get back the union of (subsidy + loan + tax特例 + セーフティネット保証) rows that now apply.\n\n    When to use: post-disaster (発災後) agent needs the active set of disaster-recovery\n    programs surfaced in the past N months — subsidies / loans / tax特例 / セーフティネット\n    保証 — filtered by prefecture / disaster_type / program_kind. Use this when 災害指定 has\n    just been declared and 都道府県 LP / 中小企業診断士 / 行政書士 want a single-call window\n    of \"what is currently applicable\". Pure index lookup; 1 ¥3 unit.\n    For personas: 都道府県 LP teams surfacing programs immediately after 災害指定; 中小企業\n    診断士 doing 経営改善 plan triage for affected SMEs; 行政書士 scaffolding 申請書面 under\n    §1 (final 申請代理 emission belongs to 行政書士); AX_engineer wiring a \"disaster surface\"\n    widget; researcher producing disaster-program coverage maps.\n    Example: window_months=12, prefecture=\"石川県\", disaster_type=\"earthquake\" → returns\n    union of disaster-eligible programs in the last 12 months keyed on program_kind with\n    eligibility metadata.\n    Not for: per-disaster instance match (use match_disaster_programs); pre-disaster\n    preparedness checklist (use disaster_catalog for category-level rollup); free-text\n    申請書面 drafting (use 行政書士 peer group artifact builders). NO LLM inference inside this\n    tool."
    },
    {
      "name": "match_disaster_programs",
      "description": "DISASTER: 発災後 prefecture+災害種別+日付 から該当制度を一括返却 (match every applicable subsidy / loan / tax特例 for a given disaster instance). Returns buckets keyed on program_kind, tier-sorted (S→A→B→C). Use this when the caller already knows the disaster facts and wants a one-shot 'what can my client apply for' answer.\n\n    When to use: agent has the full disaster context (prefecture_code + disaster_type +\n    incident_date) and wants a one-shot, tier-sorted (S→A→B→C) inventory of every applicable\n    subsidy / loan / tax特例 / セーフティネット保証 — bucketed by program_kind. Pure index\n    lookup over disaster-eligibility metadata; 1 ¥3 unit.\n    For personas: 行政書士 / 中小企業診断士 doing immediate post-disaster scaffolding for\n    affected SMEs (final 申請代理 under §1 belongs to 行政書士); 都道府県 LP teams producing\n    \"what your client can apply for\" briefing for stakeholders; AX_engineer wiring a\n    \"disaster match\" widget; researcher producing per-incident program inventories.\n    Example: prefecture_code=\"17\", disaster_type=\"earthquake\", incident_date=\"2026-01-01\" →\n    returns buckets keyed on program_kind with S/A/B/C tier sort.\n    Not for: prefecture-wide rolling window (use list_active_disaster_programs); free-text\n    申請書面 drafting (use 行政書士 peer group artifact builders under §1); category-level\n    rollup without an instance (use disaster_catalog). NO LLM inference inside this tool."
    },
    {
      "name": "disaster_catalog",
      "description": "DISASTER: 過去 N 年の災害指定 history を programs.primary_name から再構成 (walk programs.primary_name for 「令和N年…豪雨」 / 「令和N年…地震」 patterns and surface one event row per detected disaster). Useful for retrospective comparison: 能登半島地震 / 山形豪雨 / 熊本豪雨 / 令和2年7月豪雨 etc., each with up to 5 sample programs.\n\n    When to use: agent wants a retrospective catalog of\n    past 災害指定 events (能登半島地震 / 山形豪雨 / 熊本\n    豪雨 / 令和2年7月豪雨 ...) reconstructed from the\n    programs corpus by walking primary_name for\n    「令和N年…豪雨」 / 「令和N年…地震」 patterns. Each\n    event row carries up to 5 sample 制度 so the caller\n    can study historic response patterns. deterministic retrieval\n    pattern walk; no LLM; descriptive historical catalog,\n    NOT live disaster registry.\n    For personas: 中小企業 経営者 with 被災 history\n    researching past 制度 response; 中小企業診断士 /\n    経営コンサル building 災害復興 briefing material;\n    AX engineer wiring a 災害復興制度 historic catalog\n    widget; FDE composing 災害 / BCP risk surfaces;\n    researcher producing reproducible disaster-response\n    corpora.\n    Example: years=5, sample_per_event=5 → returns\n    {\"window_years\":5, \"events\":[{\"disaster\":\"令和6年\n    能登半島地震\",\"detected_year\":2024,\"sample_programs\":\n    [{\"unified_id\":...,\"primary_name\":...,\"prefecture\":\n    \"石川県\",\"tier\":\"A\",\"amount_max_man_yen\":1500,\n    \"official_url\":...}, ...]}, ...], \"schema_version\":\n    \"disaster.catalog.v1\", \"no_llm\": true}.\n    Not for: live disaster alert / real-time 災害指定\n    registry (this is historic catalog from programs corpus —\n    use 内閣府 / 気象庁 公式 feed for live data); 申請可否\n    final 判定 (use apply_eligibility_chain_am — sample\n    programs are descriptive only); 採択保証 (景表法 fence);\n    申請代理 (行政書士法 §1 fence — catalog is substrate)."
    },
    {
      "name": "search_tax_incentives",
      "description": "DISCOVER (Tax): Search 50 Japanese tax rulesets — corporate deductions (減価償却/試験研究費), tax credits (雇用/エネルギー/DX), special measures (租税特別措置).\n\n    WHEN TO USE: User asks about 税額控除 / 租税特別措置 / 法人税 / 所得税 deductions or credits.\n    WHEN NOT: For broader subsidies/grants → use search_programs. For specific tax rule lookup → use get_am_tax_rule.\n\n    Returns rulesets with eligibility, applicable years, citation to NTA / 国税通達 / 措置法.\n\n    [DISCOVER-TAX] Returns matching tax_measure records from the source-derived dataset table with primary source URL. ~271 structured rows across 法人税 / 所得税 / 地方税 / 消費税. ¥3/billable unit metered.\n    Search Japanese tax incentives across 法人税 / 所得税 / 地方税 / 消費税 with structured amount_or_rate, root_law, application_period, prerequisite_certification.\n\n    WHAT: ~271 structured records in source-derived dataset where record_kind='tax_measure'\n    (aggregated from invoice, income tax, corporate tax, local tax, and\n    agriculture-related tax source groups). Key columns: `amount_or_rate` (即時償却 vs 税額控除% vs\n    非課税率), `root_law`, `application_period_from/to`, `prerequisite_certification`,\n    `eligible_assets`. Every row cites 国税庁 / e-Gov / 財務省主税局 primary source.\n\n    WHEN:\n      - \"事業承継税制の特例措置はいつまで適用できる?\"\n      - \"中小企業経営強化税制 A 類型の税額控除率は?\"\n      - \"インボイス制度の 2 割特例はいつ終わる?\"\n      - \"農業経営基盤強化準備金の要件を教えて\"\n      - \"経産省の中小製造業向け令和 8 年度の税制優遇は?\" (natural_query 可)\n\n    WHEN NOT:\n      - `search_programs` instead for 補助金 / 助成金 (policy text, not tax rule).\n      - `search_loan_programs` instead for 融資 (lending terms, not tax).\n      - `search_certifications` instead for 認定制度 (cert may be a *prerequisite* for some\n        tax incentives; this tool returns the tax rule itself).\n      - `search_by_law` instead when the user names the **law** (租税特別措置法 etc.) and\n        wants *all* program/tax/cert rows under it.\n\n    RETURN: {total, limit, offset, results[], hint?, retry_with?}.\n\n    LIMITATIONS:\n      - FTS5 trigram causes single-kanji false hits (`税額控除` also matches rows mentioning\n        only `税`). Wrap 2+ char kanji queries in quotes (`\"税額控除\"`) to force phrase match.\n      - `target_year` filter uses `application_period_from/to`; rows lacking a window are\n        excluded. 「適用期限なし (恒久措置)」 rows have `application_period_to=NULL` —\n        they pass the filter but absence of a hard sunset is not guaranteed.\n      - `amount_or_rate` is free-text (\"7% 税額控除\" / \"即時償却\" / \"5年間 1/2 非課税\"\n        etc.); do not attempt numeric comparison. Surface verbatim.\n      - `natural_query` scalar-extracts into region/industry/size/authority/fiscal_year but\n        defers to explicit args. Scoped extraction (not full NLU).\n      - `as_of` (default 'today' JST) drops sunset-expired rules; pass an ISO date\n        (`as_of='2026-04-01'`) for historical \"what was active at X\" lookups. NULL-to\n        rows (恒久措置) are always kept. `meta.data_as_of` echoes the resolved date.\n\n    CHAIN:\n      ← `intent_of` / `reason_answer` may route a tax-intent query here.\n      → `search_certifications(query=prerequisite_certification)` when a row requires cert.\n      → `search_by_law(law_name=root_law)` to see all co-governed rules.\n      → `active_programs_at(date=pivot)` to check applicability at a specific date.\n      DO NOT → chain `enum_values` after this; 本 tool の列は free-text が多い.\n\n    EXAMPLE:\n      Input:  query=\"事業承継\", target_entity=\"中小企業\", target_year=2026\n      Output: {total: 2, limit: 20, offset: 0,\n               results: [{name: \"事業承継税制 特例措置\",\n                          amount_or_rate: \"相続税・贈与税の猶予/免除\",\n                          application_period_to: \"2027-12-31\",\n                          root_law: \"租税特別措置法\", ...}, ...]}\n\n    0 件の場合は `hint` (再検索の提案) と `retry_with` (関連 tool 候補) を返します。\n\n    --- R1 routing block (Phase 1 — 2026-05-18) ---\n    SUMMARY: 50+ Japanese tax-incentive rulesets を amount_or_rate / root_law / application_period 軸で検索。ed25519-signed citation。\n    EXAMPLE INPUT: {\"query\": \"事業承継\", \"target_entity\": \"中小企業\", \"target_year\": 2026}\n    EXAMPLE OUTPUT: {\"total\": 2, \"results\": [{\"unified_id\": \"...\",\n                     \"name\": \"事業承継税制 特例措置\",\n                     \"amount_or_rate\": \"相続税・贈与税の猶予/免除\",\n                     \"application_period_to\": \"2027-12-31\",\n                     \"root_law\": \"租税特別措置法\",\n                     \"source_url\": \"https://www.nta.go.jp/...\",\n                     \"freshness_iso\": \"...\", \"ed25519_sig\": \"...\"}]}\n    COST: ¥3 (Tier B) per call"
    },
    {
      "name": "search_certifications",
      "description": "DISCOVER (Certifications): Search 66 Japanese certification programs (経営革新等支援機関認定 / 経営力向上計画 / 中小企業等経営強化法 etc.).\n\n    WHEN TO USE: User asks about 認定制度 / 認定支援機関 / 経営革新承認.\n    WHEN NOT: For non-certification subsidies → use search_programs. For specific authority data → use search_by_law.\n\n    Returns certifications with issuing authority, eligibility, validity period.\n\n    [CERT] Returns matching certification records (~53 rows: 健康経営優良法人 / えるぼし / くるみん / SDGs 未来都市 / 経営革新計画 / 経営力向上計画 等) with pre-joined linked_subsidies + linked_tax_incentives + benefits_after_certification. Output is search-derived; verify primary source for application requirements.\n    Search Japanese business certifications with pre-joined linked_subsidies + linked_tax_incentives + benefits_after_certification.\n\n    WHAT: ~53 records in source-derived dataset where record_kind='certification'\n    (aggregated from 09_certification_programs + 62_health_management_certification +\n    sector-specific bundles). Key columns: `program_name`, `authority`, `requirements`,\n    `benefits_after_certification[]`, `linked_subsidies[]`, `linked_tax_incentives[]`,\n    `application_window`. Each row cites the issuing body's primary URL.\n\n    WHEN:\n      - \"健康経営優良法人を取ると何が変わる?\"\n      - \"えるぼし認定の要件は?\"\n      - \"経営革新計画を取ったら使える補助金一覧\"\n      - \"くるみん認定と健康経営、中小企業に向いてるのはどっち?\"\n\n    WHEN NOT:\n      - `search_programs` instead for 補助金 / 助成金 definitions (cert is a prerequisite\n        axis, not a funding program).\n      - `search_tax_incentives` instead when the user already knows the tax rule and\n        only needs the numeric rate.\n      - `search_by_law` instead when the user names the **law** grounding the cert\n        (e.g. 「中小企業等経営強化法に基づく認定」).\n\n    RETURN: {total, limit, offset, results[], hint?, retry_with?}.\n\n    LIMITATIONS:\n      - `size` and `industry` are LIKE substring over `raw_json` (no normalized schema);\n        typos silently skip matches. Prefer canonical tokens (`中小企業`, `製造業`).\n      - `linked_subsidies[]` / `linked_tax_incentives[]` are **frozen at ingest time**;\n        a new 補助金 citing this cert as prerequisite may not appear until the next\n        nightly rebuild. Verify via `search_programs(query=cert_name)` reverse lookup.\n      - Coverage is biased toward national certs (健康経営 / えるぼし / くるみん / 経営\n        革新 / 経営力向上) — 自治体独自の認定 is sparse.\n\n    CHAIN:\n      ← `search_programs` / `search_tax_incentives` when a row has\n        `prerequisite_certification` set — pass that name into `query` here.\n      → `related_programs(program_id=cert_canonical_id)` for the full graph of linked\n        programs (beyond the in-row snapshot).\n      → `search_by_law(law_name=root_law)` when certs cluster under one law.\n\n    EXAMPLE:\n      Input:  query=\"健康経営\", size=\"sme\"\n      Output: {total: 3, limit: 20, offset: 0,\n               results: [{program_name: \"健康経営優良法人 中小規模法人部門\",\n                          authority: \"経済産業省 / 日本健康会議\",\n                          linked_subsidies: [\"...\", \"...\"],\n                          linked_tax_incentives: [...], ...}],\n               meta: {data_as_of: \"2026-04-25\"}}\n\n    `as_of` is informational here (certifications are durable, no window\n    column) — pass for parity with sibling search_* tools and to surface\n    the snapshot date in `meta.data_as_of`.\n\n    0 件の場合は `hint` (再検索の提案) と `retry_with` (関連 tool 候補) を返します。"
    },
    {
      "name": "list_open_programs",
      "description": "[TIMELINE] Returns programs whose application window covers the given date (default=今日 JST), sorted by days-until-close ascending. Output is search-derived; verify primary source (source_url) for the actual deadline before submission.\n    List programs whose application window covers a given date, sorted by days-until-close ascending.\n\n    WHAT: source-derived dataset where record_kind='program', filtered by JSON\n    `application_period_from/to` (or `application_open/close` /\n    `application_window_open/close`). Rows with **no** window field at all are\n    EXCLUDED (emits `hint` when coverage is partial). Returns `days_left` per row.\n\n    WHEN:\n      - \"今開いてる補助金は?\"\n      - \"2026-05-01 時点で応募できる補助金は?\"\n      - \"関東の中小製造業で、今週締切の補助金は?\"\n      - \"今開いてる関東の中小製造業補助金\" (natural_query 可)\n\n    WHEN NOT:\n      - `search_programs` instead for the full catalog regardless of 募集窓口.\n      - `active_programs_at` instead when the user asks 「〜時点で **有効だった**」\n        (effective window, not application window — past tense historical queries).\n      - `search_acceptance_stats` instead for 「採択された件数 / 採択率」(past\n        adoption data, not current open calls).\n\n    RETURN: {total, limit, offset, results[], pivot_date, hint?, retry_with?}.\n    Each result row adds `days_left` (float; negative means past-due if edge case).\n\n    LIMITATIONS:\n      - **Coverage is partial**. Many program rows store 通年 / 随時 / empty or leave\n        the window fields NULL — those rows are silently dropped. Missing rows do\n        NOT mean the program is closed; verify via source URL.\n      - Window is encoded in **>= 3 different JSON keys** across ingest topics\n        (`application_period_*`, `application_open/close`,\n        `application_window_open/close`). We COALESCE but schema drift may still\n        hide rows — flag as `retry_with: [\"search_programs\"]` when hit=0.\n      - `pivot_date` defaults to **JST today** (server-side). If the caller's\n        timezone differs from JST, explicitly pass `on_date`.\n      - `region=\"national\"` means non-prefecture programs; passing a prefecture\n        string narrows to that prefecture **only** (does not include national rows).\n\n    CHAIN:\n      → `get_program(unified_id=row.item_id)` for full detail of a candidate.\n      → `search_acceptance_stats(program_name=row.item_name)` to gauge competitiveness.\n      → `check_exclusions(program_ids=[...])` before the user commits to multiple\n        simultaneous applications.\n      DO NOT → loop `list_open_programs` on different dates; use a single\n        `active_programs_at` call instead for historical sweeps.\n\n    EXAMPLE:\n      Input:  on_date=\"2026-05-01\", region=\"関東\", size=\"sme\"\n      Output: {total: 12, limit: 20, offset: 0, pivot_date: \"2026-05-01\",\n               results: [{item_id: \"...\", item_name: \"...\",\n                          days_left: 7.0, region: \"東京都\", ...}, ...]}\n\n    0 件の場合は `hint` (再検索の提案) と `retry_with` (関連 tool 候補) を返します。\n\n    --- R1 routing block (Phase 1 — 2026-05-18) ---\n    SUMMARY: as-of-date 時点で application window が開いている program を days_left 昇順で返す。\n    WHEN TO USE:\n    - ユーザが「今開いてる補助金は?」(as-of today JST)\n    - 「2026-05-01 時点で応募できる補助金?」historical pivot 可\n    - deadline 早い順に並べて欲しい (sort by days_left)\n    - region / industry / size で絞り込みたい\n    WHEN NOT TO USE:\n    - 未来日の roadmap → subsidy_roadmap_3yr (3-year horizon)\n    - 1 件の制度詳細 → get_program\n    - free-text keyword → search_programs\n    - deadline 過ぎたものも含む全 catalog → search_programs\n    EXAMPLE INPUT: {\"region\": \"関東\", \"industry\": \"製造業\",\n                    \"size\": \"sme\", \"limit\": 20}\n    EXAMPLE OUTPUT: {\"total\": 18, \"results\": [{\"unified_id\": \"UNI-...\",\n                     \"primary_name\": \"...\", \"days_left\": 47,\n                     \"deadline\": \"2026-07-04\",\n                     \"source_url\": \"https://...\",\n                     \"ed25519_sig\": \"...\", \"freshness_iso\": \"...\"}]}\n    COST: ¥3 (Tier B) per call"
    },
    {
      "name": "enum_values_am",
      "description": "[UTILITY] Returns the canonical enum values + source coverage for filter arguments used by other tools (target_type / authority_level / funding_purpose / prefecture / program_kind 等), so callers can avoid typos that cause 0-hit searches.\n    Probe canonical enum values with live row-count, so downstream search_* filters never silently drop matches from typos.\n\n    WHAT: Live aggregation over source-derived dataset.raw_json` (no materialized view; each\n    call < 200ms thanks to `functools.lru_stored result` per process). Returns per-value\n    frequency; values are ranked descending by count so top-N is representative.\n\n    WHEN:\n      - \"target_type の指定可能値は?\"\n      - \"authority_level は何を受け付ける?\"\n      - After a zero-hit `search_*` call, to confirm the filter value was canonical.\n      - 新しい session で初回 search の前に一度だけ呼んで vocabulary を確認.\n\n    WHEN NOT:\n      - Skip if you already know the canonical value (don't re-call each turn).\n      - For **free-text** (prefecture 都道府県フル名, program name, 法人番号 等)\n        の verification には使うな — enum は有限集合のみ。\n      - `get_meta` instead when the user asks \"データはいつ更新された / 何件ある?\"\n        (coverage / freshness, not enum values).\n\n    RETURN: {enum_name, values[], frequency_map: {value: count}, last_updated, description}.\n    NOTE: envelope shape **differs** from search_* tools — this is a utility, not a list.\n\n    LIMITATIONS:\n      - Values are de-duplicated across EN/JP synonyms (`個人事業主` vs `sole_proprietor`\n        may both appear). Prefer the JP form for JP-facing copy; matcher side\n        normalizes on search.\n      - `frequency_map` reflects the **current** public index snapshot. Long-tail values with\n        count=1 are not reliable filter targets.\n      - Invalid `enum_name` returns the hybrid shape with `error` populated and\n        `values=[]` — do not treat `values=[]` as \"no data\".\n\n    CHAIN:\n      → any `search_*` tool with a verified value.\n      DO NOT → call `enum_values` more than once per enum per session; stored result the\n        result client-side. Do not chain `enum_values → enum_values` for different\n        enums unless actually needed.\n\n    EXAMPLE:\n      Input:  enum_name=\"target_type\"\n      Output: {enum_name: \"target_type\",\n               values: [\"中小企業\", \"個人事業主\", ...],\n               frequency_map: {\"中小企業\": 3124, \"個人事業主\": 2744, ...},\n               last_updated: \"2026-04-24\",\n               description: \"Applicant type tag; JP / EN synonyms coexist.\"}"
    },
    {
      "name": "search_by_law",
      "description": "[DISCOVER-LAW] Returns programs / tax_measures / certifications / law rows linked to a given law name (canonical or colloquial). Uses source-derived dataset + source-derived dataset.short_name` for alias resolution. Output is search-derived; verify primary source (source_url) for legal interpretation.\n    Cross-kind enumeration of programs / tax_measures / certifications / law entries grounded in a single 法令.\n\n    WHAT: Joins across source-derived dataset (record_kind IN program / tax_measure /\n    certification / law) on the `root_law` / `references_law` JSON fields plus a\n    graph-table `references_law` edge walk. Alias resolution uses source-derived dataset +\n    source-derived dataset tables (`law_aliases_tried` 配列を返り値に含める — 検索対象が透明).\n\n    WHEN:\n      - \"大店立地法に基づく届出が必要な制度は?\"\n      - \"租税特別措置法 第 42 条の 12 の 4 関連の制度を一覧\"\n      - \"中小企業等経営強化法で使える支援策は?\"\n      - \"省エネ法改正後に新しく出た補助金は?\"\n\n    WHEN NOT:\n      - `search_programs` instead when the user names a **program** directly (not a law).\n      - `search_tax_incentives` instead when the user names a **tax measure** directly.\n      - `related_programs` instead when the user asks 「A の前提になる / A と併用可能な」\n        (program-to-program graph walk, not law-based enumeration).\n\n    RETURN: {total, limit, offset, results[], law_aliases_tried[], hint?, retry_with?}.\n    Each result has `item_kind` (program / tax_incentive / certification / law),\n    `item_id`, `item_name`, `root_law`, `article`, `law_no`, `amendment_date`,\n    `match_method` (exact / alias).\n\n    LIMITATIONS:\n      - `article` filter is LIKE substring on `raw_json`; **most rows lack 条項\n        metadata** — a specific article filter frequently drops all rows. When\n        result=0 with article, the `hint` surfaces the advice to retry without.\n      - `amendment_date` filter accepts rows with `amendment_date IS NULL`\n        (恒久法) to avoid false-dropping.\n      - Alias expansion is lexical (LIKE), so 「公害防止法」 like colloquial names\n        may over-match. Review `law_aliases_tried` in the response to verify intent.\n      - Hit counts are **biased toward national programs** — 自治体 条例 coverage\n        is sparse.\n\n    CHAIN:\n      → `search_programs(query=item_name)` / `search_tax_incentives(query=item_name)` /\n        `search_certifications(query=item_name)` for full detail per hit.\n      → `active_programs_at(date=amendment_date)` to see 施行時点の有効制度.\n      → `related_programs(program_id=item_id)` to see a specific row's relation graph.\n\n    EXAMPLE:\n      Input:  law_name=\"中小企業等経営強化法\"\n      Output: {total: 18, limit: 20, offset: 0,\n               law_aliases_tried: [\"中小企業等経営強化法\", \"経営強化法\"],\n               results: [{item_kind: \"program\", item_id: \"...\",\n                          item_name: \"中小企業経営強化税制\", match_method: \"exact\", ...}, ...]}\n\n    0 件の場合は `hint` (再検索の提案) と `retry_with` (関連 tool 候補) を返します。"
    },
    {
      "name": "active_programs_at",
      "description": "[TIMELINE] 任意の ISO 日付 pivot で **effective window (施行〜廃止) が及ぶ** 制度 + 税制を列挙する — `list_open_programs` が 募集窓口 を、本 tool は 制度の **存在期間** を見る (歴史的 \"XX年時点で有効だった制度\" の効力期間 lookup 用途).\n    Return programs and tax_measures whose effectivity window (not application window) spans a given ISO date, with on_date_status hints (active / about_to_close / just_started).\n\n    WHAT: source-derived dataset where record_kind IN ('program', 'tax_measure'),\n    filtered by effective_from / effective_to (falls back to application_period_*).\n    Required: at least one temporal field is non-null on the row (otherwise\n    EXCLUDED; avoids false-positive sweep). Adds `on_date_status` per row:\n    `active` / `about_to_close` (≤30 days to close) / `just_started` (≤30 days\n    from open).\n\n    WHEN:\n      - \"2020-04-01 時点で有効だった 雇用調整助成金 特例措置は?\"\n      - \"2023-10-01 のインボイス開始時点で申請可能だった税制は?\"\n      - \"コロナ特例 (2020-2023) の 制度スナップショットを比較したい\"\n      - \"今日時点で有効な 省エネ税制 を全部出して\"\n\n    WHEN NOT:\n      - `list_open_programs` instead when the user asks 「今 / 募集中 / 締切が\n        近い」(application window, not effectivity — 募集窓口のみ).\n      - `search_programs` instead for the full catalog regardless of date.\n      - `search_by_law(amendment_date=...)` instead when the pivot is a **law\n        amendment date** and the user wants programs amended *after* it.\n\n    RETURN: {total, limit, offset, results[], pivot_date, hint?, retry_with?}.\n    Each row: `item_kind` (program / tax_incentive), `item_id`, `item_name`,\n    `effective_from`, `effective_to`, `on_date_status`, `region`,\n    `target_industries`, `authority_level`, source lineage.\n\n    LIMITATIONS:\n      - **Effectivity coverage is partial**. We fall back to `application_period_*`\n        when `effective_*` is missing — the two concepts **can differ** for 恒久\n        制度 that were amended but not re-scoped. Cross-check via `search_by_law`\n        for amendment detail.\n      - Certifications and loan programs are OUT OF SCOPE (record_kind filter).\n      - `on_date_status=about_to_close` threshold is ±30 days; adjust downstream if\n        the user needs a different horizon.\n      - 法律改正による 経過措置 (grandfathering) は JSON schema で表現していない —\n        rows that **officially expired** but still applicable to pre-expiry\n        applicants may not show here.\n\n    CHAIN:\n      ← `search_by_law` produces `amendment_date` → pivot this tool.\n      → `get_program(unified_id=row.item_id)` / `search_tax_incentives(query=...)`\n        for full detail.\n      → `search_enforcement_cases(disclosed_from=date)` to cross-check what went\n        wrong during that window.\n\n    EXAMPLE:\n      Input:  date=\"2020-04-01\", region=\"national\", size=\"sme\"\n      Output: {total: 42, limit: 20, offset: 0, pivot_date: \"2020-04-01\",\n               results: [{item_kind: \"program\", item_name: \"雇用調整助成金 特例\",\n                          effective_from: \"2020-02-14\", effective_to: \"2023-03-31\",\n                          on_date_status: \"active\", ...}, ...]}"
    },
    {
      "name": "search_acceptance_stats_am",
      "description": "[EVIDENCE] Returns adoption statistics (応募件数 / 採択件数 / 採択率 / 予算額) per (program × fiscal_year × round). Aggregated from METI / MAFF published sources. Output is search-derived; verify primary source for figures cited in business decisions.\n    Search adoption statistics (applications / acceptances / acceptance rate / budget) per program × fiscal_year × round.\n\n    WHAT: source-derived dataset rows where `source_topic IN\n    ('01_meti_acceptance_stats', '02_maff_acceptance_stats',\n    '05_adoption_additional')`. Grain: (program × 第N次 × 年度). Key fields on\n    row: `program_name`, `fiscal_year`, `round_number`, `application_count`,\n    `acceptance_count`, `acceptance_rate`, `budget_yen`, `announced_date`.\n\n    WHEN:\n      - \"ものづくり補助金の第 14 次の採択率は?\"\n      - \"事業再構築補助金 2024 年度の採択件数推移\"\n      - \"IT 導入補助金 過去 3 年の倍率変化\"\n      - \"農水省系補助金で採択率が一番高いのは?\"\n\n    WHEN NOT:\n      - `search_case_studies` (public corpus) instead when the user wants **具体 採択\n        企業** (recipient profiles) — this tool returns aggregate counts, not\n        individual recipient names.\n      - `search_programs` instead for 制度定義 (eligibility / amount / window).\n      - `search_enforcement_cases` (public corpus) instead for 不正受給 / 返還 history\n        — opposite signal to adoption.\n\n    RETURN: {total, limit, offset, results[], hint?, retry_with?}.\n    Each result row has the key fields above plus source_url + fetched_at for\n    lineage.\n\n    LIMITATIONS:\n      - Coverage is **skewed toward METI / MAFF** publishable 採択発表 — 自治体\n        単独事業や 新しい公募 (未発表) は空である。Missing rounds do NOT mean\n        the program was unpopular.\n      - `acceptance_rate` is computed `acceptance_count / application_count` when\n        both are present; for rows with only 採択件数 公表 (分母が非公開) it is NULL.\n      - `program_name` matching is LIKE substring on `primary_name` +\n        `raw_json.program_name` + `canonical_id`. Name drift year-over-year\n        (「ものづくり・商業・サービス生産性向上促進補助金」 ≠ 「ものづくり補助金」)\n        — consider passing the shorter form.\n      - `year` filter matches both `fiscal_year` and first 4 chars of\n        `announced_date` — 発表 遅延があると year 1 ずれる。ピンポイントは避ける。\n\n    CHAIN:\n      ← `search_programs` produces the canonical program name → this call.\n      → `search_case_studies(program_used=program_name)` (public corpus) for actual\n        recipient examples to pair with stats.\n      → `list_open_programs(on_date=today)` to see whether the program is still\n        active for future applications.\n\n    EXAMPLE:\n      Input:  program_name=\"ものづくり補助金\", year=2024\n      Output: {total: 3, limit: 20, offset: 0,\n               results: [{program_name: \"ものづくり補助金\", fiscal_year: 2024,\n                          round_number: 17, application_count: 6589,\n                          acceptance_count: 3970, acceptance_rate: 0.602, ...}],\n               meta: {data_as_of: \"2026-04-25\"}}\n\n    `as_of` is informational here (acceptance stats are historical /\n    immutable) — pass for parity with sibling search_* tools.\n\n    0 件の場合は `hint` (再検索の提案) と `retry_with` (関連 tool 候補) を返します。"
    },
    {
      "name": "related_programs",
      "description": "[DISCOVER-GRAPH] Returns related programs along 6 relation axes (prerequisite / compatible / incompatible / successor / predecessor / similar), 1-2 hops from a seed program / tax / cert. Walks source-derived dataset (18,489 edges / ~13K nodes). Output is search-derived; verify primary source for compatibility decisions.\n    Graph walk over source-derived dataset (18,489 edges) seeded on one program/tax/cert, returning up to 6 relation axes and 2-hop neighbors.\n\n    WHAT: relation relation graph — 18,489 directed edges across ~13K nodes.\n    Public relation axis → canonical relation label:\n      prerequisite → prerequisite\n      compatible → compatible\n      incompatible → incompatible\n      successor → replaces (reverse edge walk)\n      predecessor → replaces (forward edge walk)\n      similar → related\n    Seed resolution: accepts `canonical_id` from any `search_*`, or display name;\n    falls back to LIKE match on source-derived dataset.display_name when exact fails.\n\n    WHEN:\n      - \"事業再構築補助金の前提になる認定は?\"\n      - \"IT 導入補助金と併用可能な補助金は?\"\n      - \"持続化補助金が 2026 年度で何に変わった?\" (successor 取得)\n      - \"この税制と似た制度 (other ministries) は?\"\n\n    WHEN NOT:\n      - `search_by_law` instead when the user names a **law** (not a program).\n      - `check_exclusions(program_ids=[...])` instead when the user already has\n        a candidate set and asks 「併給可否」 — that runs the 181 rule engine,\n        which is more authoritative than `relation_type='incompatible'`.\n      - `search_programs` instead when the user has only a keyword, not a seed id.\n\n    RETURN: {seed_id, seed_kind, seed_name?, relations: {relation_type: [{from_id,\n    to_id, relation_type, confidence, evidence}, ...]}, nodes: [...], total_edges,\n    depth, hint?, retry_with?, error?}.\n    NOTE: envelope shape **differs** from search_*; this is a graph result.\n\n    LIMITATIONS:\n      - **Hub explosion**: `has_authority` hub 単体で 4,541 edges out — `max_edges`\n        (default 100, hard cap 500) で強制切り詰め、`edge_cap_hit=True` で通知。\n        密な node を seed に置くと打ち切られる前提で扱うこと。\n      - `depth` is capped at 2. Deeper graph exploration should be done in\n        multiple calls with the next frontier as a seed.\n      - `incompatible` edges are **provisional** — authoritative 併給可否 判定は\n        必ず `check_exclusions` (public corpus) に回せ。This tool's edges are derived\n        from 要綱 extraction and may miss 相互排他 rules.\n      - Seed resolution by display name is LIKE — wrong LIKE hits return edges\n        for an unintended node. Prefer canonical_id.\n\n    CHAIN:\n      ← `search_programs` / `search_tax_incentives` / `search_certifications`\n        produces the `canonical_id` → pass to `program_id`.\n      → `get_program(unified_id=edge.to_id)` for the neighbor's detail.\n      → `check_exclusions(program_ids=[seed, *compatible_ids])` to validate\n        併給 可否 against the authoritative 181 rule set.\n      DO NOT → call `related_programs` recursively with each neighbor — walk\n        in single hop, process with `check_exclusions`, then decide.\n\n    EXAMPLE:\n      Input:  program_id=\"it-dounyu-2026\",\n              relation_types=[\"prerequisite\", \"compatible\"]\n      Output: {seed_id: \"it-dounyu-2026\", seed_kind: \"program\",\n               seed_name: \"IT 導入補助金\",\n               relations: {prerequisite: [...], compatible: [...]},\n               nodes: [...], total_edges: 12, depth: 1}"
    },
    {
      "name": "get_annotations",
      "description": "[ANNOTATION] Return public annotation rows for a given entity_id.\n\n    WHAT: `source-derived dataset` table (data update で導入された汎用注釈\n    レイヤー) を ``entity_id`` で絞って返す。public visibility の kind /\n    severity / text_ja / score / meta + supersede chain + effective window\n    を 1 行ずつ。\n\n    WHEN:\n      - 「この program はなぜ品質スコアが低いと判断された?」\n      - 「採択事例 X に紐付く public warning を全部見たい」\n      - 「過去の validation_issue 履歴を確認したい」(include_superseded=True)\n\n    WHEN NOT:\n      - 全 entity 横断で「最も警告が多い program」を探したい → 別 tool を\n        新設 (現状未実装、search_top_warnings 等)。get_annotations は\n        single-entity 専用。\n      - entity の本体属性 (primary_name / authority / amount) → search_programs\n        / search_case_studies 等を直接呼ぶ。\n\n    RETURNS (envelope):\n      {\n        total: int,\n        limit: int,\n        offset: 0,\n        results: [\n          {\n            annotation_id, entity_id, kind, severity, text_ja, score,\n            meta (dict, parsed JSON), visibility, source_id,\n            effective_from, effective_until, supersedes_id, superseded_at,\n            observed_at,\n          }, ...\n        ],\n        entity_id: <echo>,\n        filters: {kinds, visibility, include_superseded},\n      }\n\n    LIMITATIONS:\n      - public visibility の注釈だけを返す。internal / private のレビュー\n        メモは公開 API / MCP からは返さない。\n      - meta_json の schema は kind 依存。caller 側で kind を見て分岐する。"
    },
    {
      "name": "check_answer_freshness",
      "description": "[P4 FRESHNESS] Verify whether a precomputed answer is still fresh against the latest law / 税制 / 制度 amendment sweep. Pure metadata lookup. NO LLM. Returns freshness_state ('fresh' / 'stale' / 'expired' / 'unknown') + last_validated_at + invalidation_reason + amendment_diff_ids lineage.\n\n    When to use: agent just fetched a precomputed answer\n    envelope (P2/P3 stored resultd response) and wants to verify it\n    is still fresh against the latest amendment sweep BEFORE\n    surfacing it to the end-user. freshness_state surfaces\n    fresh / stale / expired / unknown and the\n    amendment_diff_ids lineage shows which 改正 invalidated\n    the stored result. Pure metadata lookup; no LLM; descriptive\n    stored result hygiene signal.\n    For personas: AX engineer wiring a \"is this stored resultd\n    answer still valid\" gate before showing P2 response;\n    FDE building stored result-hygiene dashboard; researcher\n    auditing answer-stored result staleness curves; 行政書士 /\n    税理士 verifying stored briefing is up to date before\n    re-using (NOT replacement for primary source check);\n    中小企業 経営者 confirming saved 補助金 summary is\n    current.\n    Example: question_id=\"qa:zeirishi:adv_fees_2024\" →\n    returns {\"question_id\":..., \"freshness_state\":\"stale\",\n    \"last_validated_at\":\"2026-05-12T03:11:00Z\",\n    \"invalidation_reason\":\"措置法 §42-4 R&D rate revised\n    2026-04-01\",\"amendment_diff_ids\":[\"amd_2026_002\",\n    \"amd_2026_011\"],\"version_seq\":7, \"schema_version\":\n    \"p4.freshness.v1\", \"no_llm\": true}.\n    Not for: re-composing the answer (use P2 composer if stale);\n    法解釈 of the invalidating amendment (弁護士法 §72 fence); 採択\n    保証 (景表法 fence — freshness is metadata, not predictive);\n    申請代理 (行政書士法 §1 fence); 税務代理 (税理士法 §52 fence)."
    },
    {
      "name": "compose_audit_workpaper_v2",
      "description": "Roll up intel_houjin_full + apply_eligibility_chain + cross_check_jurisdiction + amendment_alert for one 法人 in one FY into a 税理士/会計士 audit workpaper. ¥15 / call (5 units). NO LLM, deterministic retrieval. §52 / §47条の2 / §72 / §1 sensitive.\n\n        When to use: agent serving a 税理士 / 会計士 / FDE persona needs a\n        single-call workpaper bundle (intel_houjin_full + 補助金 / 制度\n        eligibility chain + jurisdiction cross-check + amendment alert) for\n        one 法人 × one FY. ¥15 vs ~5-turn 外部 LLM multi-source roll-up\n        (¥360). Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. NO LLM at request time.\n        For personas: 税理士 (月次顧問先 workpaper substrate gathering),\n        会計士 (期末監査 workpaper context pack), AX_engineer wiring a\n        workpaper pipeline for a 税理士 firm, FDE auditing 顧客 data flow\n        with a single deterministic SQL surface.\n        Example: client_houjin_bangou=\"1234567890123\", fiscal_year=2025 →\n        returns {intel_full: {…}, eligibility_chain: [10 program rows],\n        jurisdiction_crosswalk: [税務署+地方税 rows], amendment_alerts: […],\n        _billing_unit: 5, _disclaimer: \"…\"} envelope. Verify each citation\n        against primary source before workpaper signoff.\n        Not for: 税務代理 (税理士法 §52) / 監査意見 (公認会計士法 §47条の2) /\n        法解釈 (弁護士法 §72) / 行政書類作成 (行政書士法 §1) emission — final\n        書面 / 意見 / 提出代理 belongs to 士業; this is read-only scaffold.\n        Do not use for 顧問契約代替 (workpaper substrate ≠ 顧問業務 完結)."
    },
    {
      "name": "search_gx_programs_am",
      "description": "DISCOVER (GX/Green): Search Green Transformation subsidies — emissions reduction, renewable energy, EV adoption, ZEB/ZEH (net-zero buildings), carbon credits. Returns curated programs with eligibility summaries.\n\n    [DISCOVER-GX] Returns matching GX program records (脱炭素 / 再エネ / EV / ZEB-ZEH / carbon_credit) from the source-derived dataset table (program:gx:% rows), filtered by theme × company_size. Output is search-derived; verify primary source (source_url) for application requirements.\n\n    WHAT: source-derived dataset rows with canonical_id matching 'program:gx:%', joined\n    with source-derived dataset for currently_open_rounds[]. eligibility_quick_summary\n    is a 1-line string mashing target_types + rate + amount for LLM fast-scan.\n\n    WHEN:\n      - 「GX 脱炭素補助金で SME が使えるものは?」\n      - 「ZEB-ZEH 補助金の公募中 round は?」\n      - 「EV 法人購入補助金の一覧」\n\n    WHEN NOT:\n      - Non-GX themes (DX / 生産性 / 創業) → search_programs instead.\n      - 税制ベースの脱炭素インセンティブ → search_tax_incentives / get_am_tax_rule.\n\n    RETURN: {total, results[{canonical_id, program_name, theme, agency, program_kind,\n             amount_max_yen, subsidy_rate, currently_open_rounds, past_rounds_count,\n             target_types, eligibility_quick_summary, source_url, references_law[]}]}\n\n    0 件の場合は `hint` (再検索の提案) と `retry_with` (関連 tool 候補) を返します。"
    },
    {
      "name": "search_loans_am",
      "description": "[DISCOVER-LOAN] Returns matching loan products from source-derived dataset, filtered by 3 independent axes (担保 / 個人保証 / 第三者保証). Spans 公庫 / 自治体制度融資 / 商工中金. Output is search-derived; verify primary source (source_url) for the actual lending terms.\n\n    WHAT: source-derived dataset rows. Each row has 3-axis structured flags:\n    collateral_required / personal_guarantor / third_party_guarantor ∈\n    {required, not_required, case_by_case, exception, unknown}. ResponseRow\n    also exposes `flags{no_collateral, no_personal_guarantor, no_third_party_guarantor}`\n    so LLMs can reason without re-checking the enum.\n\n    WHEN:\n      - 「無担保・無保証人で借りられる公庫融資は?」\n      - 「災害融資 で 担保不要 の制度」\n      - 「中小企業庁 セーフティネット 4号 の限度額」\n\n    WHEN NOT:\n      - search_loan_programs covers the curated public loan catalog; this\n        tool is broader (公庫 + 自治体制度融資 + 商工中金) and may overlap.\n        When precision matters, compare both result sets and cite sources.\n\n    RETURN: {result_count, results[{canonical_id, primary_name, lender_entity_id,\n             loan_program_kind, limit_yen, limit_yen_special, interest_rate_base_pct,\n             interest_rate_special_pct, term_years_max, grace_period_months,\n             collateral_required, personal_guarantor, third_party_guarantor,\n             eligibility_cond{…}, flags{no_collateral, no_personal_guarantor,\n             no_third_party_guarantor}, source_url}]}\n\n    0 件の場合は `hint` (再検索の提案) と `retry_with` (関連 tool 候補) を返します。"
    },
    {
      "name": "check_enforcement_am",
      "description": "[ENFORCEMENT] Returns 行政処分 records from source-derived dataset for a 法人番号 or 企業名, including currently_excluded flag (active 排除期間 at as_of_date) and 5-year history. Coverage is the 1,185-row corpus only — absence of records does NOT prove a clean record. Verify primary source (source_url) for due-diligence decisions.\n\n    WHAT: source-derived dataset (structured 行政処分 ledger). Either houjin\n    or target_name required. Returns:\n      - currently_excluded: bool  (排除期間内か at as_of_date)\n      - active_exclusions: list[row] (いま効いている排除)\n      - recent_history:    list[row] (past 5 years regardless of active)\n      - all_count:         int\n\n    WHEN:\n      - 「この法人は今補助金を受給できる状態か?」(due diligence before 商談)\n      - 「○○株式会社 の 行政処分 履歴」\n      - 「名前で検索 (法人番号が手元に無い)」\n\n    WHEN NOT:\n      - prod search_enforcement_cases covers a different 独禁法 / 景表法 slice\n        — use it for 広告表示違反 / 排除措置命令 一覧. Use this tool specifically\n        for 補助金 / 助成金 排除期間 判定.\n\n    RETURN: {queried{houjin_bangou, target_name, as_of_date}, found, currently_excluded,\n             active_exclusions[…], recent_history[…], all_count}.\n             When found=False, the canonical envelope is returned with\n             ``error.code`` = ``no_matching_records`` (or ``invalid_input``\n             for missing identifiers); ``error.coverage_scope`` echoes the\n             1,185-row corpus scope so DD agents don't read absence as 与信.\n\n    0 件の場合は `hint` (再検索の提案) と `retry_with` (関連 tool 候補) を返します。"
    },
    {
      "name": "search_mutual_plans_am",
      "description": "[DISCOVER-MUTUAL] Returns matching 共済 / 年金 / 労災 records (小規模企業共済 / 倒産防止共済 / iDeCo+ / public index / DC / 労災特別加入 等) from source-derived dataset, filtered by plan_kind × premium range × tax_deduction_type × provider. Output is search-derived; verify primary source (source_url) for actual contract terms.\n\n    WHAT: source-derived dataset structured ledger, joined with source-derived dataset via\n    heuristic linking (tax_deduction_type → tax_measure canonical_id). Each\n    row carries eligibility_cond JSON + linked_tax_rules list.\n\n    WHEN:\n      - 「小規模企業共済 と 倒産防止共済 の違い」\n      - 「月 3 万 で入れる退職金 共済」\n      - 「iDeCo+ の対象従業員要件」\n\n    WHEN NOT:\n      - 単独 税制だけ知りたい → get_am_tax_rule.\n      - 助成金 (雇用関連) → search_programs.\n\n    RETURN: {result_count, results[{canonical_id, primary_name, provider_entity_id,\n             plan_kind, premium_min_yen, premium_max_yen, tax_deduction_type,\n             benefit_type, eligibility_cond{…}, linked_tax_rules[…], source_url}]}.\n\n    0 件の場合は `hint` (再検索の提案) と `retry_with` (関連 tool 候補) を返します。\n\n    When to use: 税理士 / 中小企業診断士 / 社労士 office or agent\n    triaging 共済 / 年金 / 労災 plan candidates for a 中小企業\n    顧客 — by plan_kind × monthly_premium range × tax_deduction_\n    type × provider — surfacing eligibility_cond JSON + linked\n    tax rules — ¥3 vs ~7-turn 外部 LLM \"search 小規模企業共済 +\n    倒産防止共済 + iDeCo+ + 労災特別加入 + cross-link tax rules\"\n    chain (¥420). Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest: search-derived\n    candidates; actual contract terms / 加入要件 must be\n    re-verified via source_url; eligibility_cond is JSON shape\n    that may include `applicability_note` placeholder requiring\n    士業 review.\n    For personas: 税理士 office triaging \"small-enterprise\n    deduction\" 共済 stack for SME client, 中小企業診断士 office\n    surfacing 倒産防止共済 for cash-flow buffer, 社労士 office\n    citing 労災特別加入 for 一人親方 client, FDE building \"show\n    me 月3万円で入れる退職金共済\" widget, agent triaging\n    \"iDeCo+ の対象従業員要件\" question.\n    Example: search_mutual_plans_am(plan_kind=\"retirement_mutual\",\n    premium_monthly_yen=30000,\n    tax_deduction_type=\"small_enterprise_deduction\", limit=5) →\n    {result_count:3, results:[{canonical_id:\"plan:smrj:smec\",\n    primary_name:\"小規模企業共済\", provider_entity_id:\n    \"authority:smrj\", plan_kind:\"retirement_mutual\",\n    premium_min_yen:1000, premium_max_yen:70000,\n    tax_deduction_type:\"small_enterprise_deduction\",\n    benefit_type:\"...\", eligibility_cond:{...},\n    linked_tax_rules:[...], source_url:\"https://...\"}, ...]}.\n    Not for: 単独 税制 lookup (get_am_tax_rule); 助成金 (雇用関連\n    — search_programs); 共済 加入手続代行 (社労士 §27 / 税理士\n    §52 fence — agent surfaces candidates, final 加入 belongs to\n    士業 + 顧客); 給付金額シミュレーション (substrate only — 計算\n    は caller 側 finishing); 与信 / 保証 判定 (信用情報法 fence\n    — public plan record only)."
    },
    {
      "name": "get_law_article_am",
      "description": "[LAW-ARTICLE] Returns the article text from source-derived dataset for a (law name, article number) pair. Accepts natural notation like '租税特別措置法 第41条の19' and normalizes to canonical form. Includes last_amended + source_url. Output is search-derived; verify primary source (e-Gov) for legal interpretation.\n\n    WHAT: source-derived dataset structured ledger. Law resolution order:\n      1. canonical_id ('law:sozei-tokubetsu')\n      2. Exact canonical_name or short_name\n      3. LIKE fallback on name (shortest match wins)\n\n    Article normalization: '41の19' / '41-19' / '41.19' → '第41条の19'.\n\n    WHEN:\n      - 「租税特別措置法 第41条の19 の条文」\n      - 「法人税法 施行令 5条 の本文」\n      - 「措置法 41 条の 19 (原本)」\n\n    WHEN NOT:\n      - 全条文の横断 検索 → search_laws (prod).\n      - 法律 メタ (施行日 / 最終改正) だけ → get_law (prod).\n\n    RETURN: {found, law{canonical_id, canonical_name}, article_id, article_number,\n             article_number_sort, title, text_summary, text_full, effective_from,\n             effective_until, last_amended, source_url, source_fetched_at}.\n             When not found, the canonical envelope is returned with\n             ``error.code`` ∈ {seed_not_found, no_matching_records,\n             missing_required_arg} and ``error.queried`` echoing the input."
    },
    {
      "name": "benchmark_cohort_average_am",
      "description": "[BENCHMARK] 業種 (JSIC) × 規模 × 地域 平均採択額 / 採択件数 / hit数 (制度数) / outlier 法人 (top 10%) over source-derived dataset + source-derived dataset. Single ¥3/billable unit. NO LLM. §52 / §47条の2 / §1 sensitive — directional benchmark, not 採択保証 / 経営助言.\n\n        When to use: agent wants a peer group-average benchmark (avg\n        amount, count, program-hit rate, top-10% outliers) for a JSIC\n        × size × prefecture slice — typical \"how does my client\n        compare to peers\" data point during 経営診断 / 補助金 strategy\n        / 取引先 due-diligence. Single-call aggregate, no LLM.\n        For personas: 中小企業診断士 producing peer-comparison page\n        in 経営診断書; 経営コンサル sizing 補助金 opportunity per\n        peer group; AX engineer wiring a peer group-benchmarks dashboard; FDE\n        designing a peer-comparison UX surface; researcher producing\n        reproducible peer group baselines.\n        Example: industry_jsic=\"D\", size_band=\"medium\",\n        prefecture=\"東京都\" → returns {\"peer group\":{...filters...},\n        \"avg_adoption_amount_yen\": 8_900_000, \"adoption_count\": 412,\n        \"program_hit_count\": 27, \"outlier_top10\": [{\"houjin_bangou\":\n        ..., \"amount\":...}, ...], \"schema_version\":\n        \"benchmark.peer group.v1\", \"no_llm\": true, \"_disclaimer\":\n        \"directional benchmark — not 採択保証\"}.\n        Not for: 採択 forecast for a specific applicant (this is\n        peer group aggregate, not per-applicant); 経営助言 / 経営判断\n        emission (税理士法 §52 / §47条の2 / 行政書士法 §1 fence\n        — benchmark is directional only); 与信 / 信用調査\n        (信用情報法 fence); 法解釈 of 補助金 鈎裕件 (弁護士法\n        §72 fence)."
    },
    {
      "name": "predictive_subscriber_fanout_chain",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1] release chain B — predictive_subscriber_fanout (dim K). Registers the supplied Subscription, enqueues the supplied PredictionEvent, then runs due_events_for_subscriber to confirm the event lands inside the 24h notification KPI window. Returns ComposedEnvelope with composed_steps (predictive_service.register_subscription + enqueue_event + due_events_for_subscriber) + target_event_in_due_window. NO LLM, no HTTP, 3 ¥3 units (heavy compound tier).\n\n        --- R1 routing block (Phase 1 — 2026-05-18) ---\n        SUMMARY: dim K composer — 3 primitive (subscription register + event enqueue + due_events lookup) を 1 envelope に圧縮。\n        WHEN TO USE:\n        - agent が 'event 発生 → 配信 → ack' の 3 primitive を 1 call で済ませたい\n        - 「houjin_watch 通知 → 制度差分計算 → 通知配信」を 1 トランザクションで\n        - subscriber 集合への fanout を atomic 3 回 (¥9) ではなく composer 1 回 (¥9) で\n        - release dim K の primitive chain を 1 envelope で\n        WHEN NOT TO USE:\n        - 1 primitive だけ → atomic predictive_service tools (cheaper)\n        - Multi-peer group fanout — 各 peer group 別 composer call\n        - session 軸 (dim L) なら session_multi_step_eligibility_chain\n        - 翻訳 / world knowledge / LLM 推論 (本 tool は no-LLM)\n        EXAMPLE INPUT: {\"subscription_json\": {\"subscription_id\": \"SUB-...\",\n                          \"subscriber_id\": \"agent-001\",\n                          \"watch_targets\": [\"houjin:1234567890123\"],\n                          \"channel\": \"mcp_resource\",\n                          \"created_at\": \"2026-05-18T03:42:00Z\"},\n                        \"event_json\": {\"event_id\": \"EVT-...\",\n                          \"event_type\": \"houjin_watch\",\n                          \"target_id\": \"houjin:1234567890123\",\n                          \"scheduled_at\": \"2026-05-18T04:00:00Z\",\n                          \"detected_at\": \"2026-05-18T03:42:00Z\",\n                          \"payload\": {}}}\n        EXAMPLE OUTPUT: {\"envelope\": {\"evidence\": {\n                         \"primitive_chain\": [\"register_subscription\",\n                                              \"enqueue_event\",\n                                              \"due_events_for_subscriber\"],\n                         \"outcome_contract\": {\"target_event_in_due_window\": true,\n                                               \"ed25519_sig\": \"...\"},\n                         \"citations\": [{\"source\": \"predictive_service\",\n                                         \"source_url\": \"https://...\"}],\n                         \"composed_steps\": 3,\n                         \"disclaimer\": \"§52 / §47条の2 / §72 / §1\"}},\n                         \"_billing_unit\": 3}\n        COST: ¥9 (Tier A) per call — heavy-tier composer"
    },
    {
      "name": "session_multi_step_eligibility_chain",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1] release chain B — session_multi_step_eligibility (dim L). Opens a fresh 24h session, persists each supplied step in order, then closes the session and returns the terminal SavedContext snapshot. Surfaces per-step status (persisted / failed / skipped) so the agent can audit which actions landed. Returns ComposedEnvelope with composed_steps (session_context.open + step_batch + close). NO LLM, 3 ¥3 units (heavy compound tier).\n\n        When to use: agent needs to replay a multi-step eligibility\n        determination as one atomic 24h session (open → N steps → close)\n        and want per-step persistence audit. ¥9 vs N × atomic\n        session_context_* calls + manual open/close. Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published.\n        of 2+N.\n        For personas: 税理士 (顧問先 月次 eligibility walkthrough audit\n        trail), 会計士 (control walkthrough 1-call snapshot),\n        AX_engineer wiring a session-recorded eligibility flow, FDE\n        building deterministic replay for 顧客 audit.\n        Example: subject_id=\"agent-run-2026-05-29-001\",\n        steps=[{action: \"load_houjin\", payload: {…}}, {action:\n        \"match_program\", payload: {…}}, {action: \"compute_verdict\",\n        payload: null}] → returns ComposedEnvelope with composed_steps:\n        session_context.open + step_batch (per-step status: persisted /\n        failed / skipped) + close, plus terminal SavedContext.\n        Not for: subject_id に PII (氏名 / 法人番号 / mynumber) を渡す\n        (dim N redact rule で reject); 32 steps を超える session\n        (MAX_STEPS=32 hard cap); 16 KiB payload を超える step (per-step\n        cap); 助言 emission (audit trail only)."
    },
    {
      "name": "rule_tree_batch_eval_chain",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1] release chain B — rule_tree_batch_eval (dim M). Evaluates N RuleTrees over a single context dict in 1 call and returns every verdict + rationale_path + source_doc_ids in parallel index order. Replaces N atomic rule_engine_check round-trips with one composed call. Returns ComposedEnvelope with composed_steps (rule_tree.evaluate_tree:batch). NO LLM, 3 ¥3 units (heavy compound tier).\n\n        When to use: agent needs to evaluate the same context dict against\n        many independent dim M RuleTrees (eligibility / 適合性 / compliance\n        gate batteries) in one round trip. ¥9 vs N × atomic\n        rule_engine_check ¥3 each + N network round trips. Saving scales\n        linearly with N (typical: 10 trees → 1/3 cost + 1 RTT).\n        For personas: 税理士 (顧問先 multi-program 同時 eligibility),\n        会計士 (期末 multi-control evaluation), AX_engineer wiring a\n        batch eligibility scanner, FDE multi-tenant rule-tree pipeline.\n        Example: rule_tree_jsons=[tree_a, tree_b, tree_c],\n        context={houjin_bangou: …, revenue: …, employee_count: …} →\n        returns ComposedEnvelope with composed_steps:\n        rule_tree.evaluate_tree:batch + per-tree verdict + rationale_path\n        + source_doc_ids in same index order. Per-tree failure is reported\n        in verdict, never raises.\n        Not for: 与信判断 / 監査意見 / 税務代理 / 法解釈 emission (dim M\n        scaffold only — final 助言 / 意見 belongs to 士業); RuleTree\n        schema generation (use rule_tree_create atomic upstream); free-\n        form 自然言語 rule (dim M expects structured RuleTree envelope)."
    },
    {
      "name": "anonymized_cohort_query_with_redact_chain",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1] release chain B — anonymized_cohort_query_with_redact (dim N). Fuses the three dim N primitives (redact_pii_fields over the sample row, check_k_anonymity over the cohort_size, write_audit_entry for the APPI-grade audit row) into one composed call. Returns ComposedEnvelope with composed_steps (anonymized_query.redact_pii_fields + check_k_anonymity + write_audit_entry) + redacted_sample + audit_entry. NO LLM, 3 ¥3 units (heavy compound tier).\n\n        When to use: agent needs to surface a candidate row + peer group\n        verdict + APPI audit trail in one composed call, with k=5\n        anonymity floor and PII whitelist enforced. ¥9 vs 3 atomic dim N\n        round trips. Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published.\n        For personas: 会計士 (peer group aggregate disclosure substrate with\n        APPI redaction), AX_engineer wiring a privacy-safe analytics\n        surface for 顧客 ETL, FDE multi-tenant aggregate with auditable\n        redaction, 個人情報保護委員会 audit trail builder.\n        Example: sample={houjin_bangou: \"1234567890123\", 氏名: \"山田\",\n        revenue: 50000000}, cohort_size=12, industry=\"製造業\",\n        region=\"東京都\", size=\"sme\" → returns ComposedEnvelope with\n        composed_steps: redact_pii_fields (houjin_bangou + 氏名 stripped)\n        + check_k_anonymity (12 >= 5 → supported) + write_audit_entry\n        (one APPI-grade JSONL row), plus redacted_sample +\n        audit_entry envelope.\n        Not for: cohort_size < 5 (envelope returns absent — agent must\n        not surface; downstream tools should respect support_state);\n        free-form PII tokens outside whitelist (use redact_text upstream);\n        個人特定 / 名寄せ用途 (purpose violates dim N spec)."
    },
    {
      "name": "time_machine_snapshot_walk_chain",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1] release chain B — time_machine_snapshot_walk (dim Q). Walks one snapshot per month between start_as_of_date and end_as_of_date (capped at month_count_cap) and emits pairwise counterfactual_diff results so the agent can trace how the dataset evolved over the window. Returns ComposedEnvelope with composed_steps (time_machine.query_as_of:walk + counterfactual_diff:pairs) + diffs[] + resolved_snapshot_ids[]. NO LLM, 3 ¥3 units (heavy compound tier).\n\n        When to use: agent needs to trace dataset evolution month-by-month\n        between two anchor dates (e.g. \"programs catalog の 2024-04 と\n        2025-04 の差分は?\") and emit pairwise counterfactual_diff in one\n        call. ¥9 vs M months × atomic query_as_of + (M-1) diff calls\n        (typically ~¥36 for 12 months). Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published.\n        For personas: 税理士 (制度改正 月次 lineage audit trail),\n        会計士 (前期比較 数値 evolution substrate), AX_engineer wiring a\n        time-machine diff dashboard, FDE 顧客 dataset evolution audit.\n        Example: dataset_id=\"programs\", start_as_of_date=\"2024-04-01\",\n        end_as_of_date=\"2025-04-01\", month_count_cap=12 → returns\n        ComposedEnvelope with composed_steps: query_as_of:walk over 12\n        monthly anchors + counterfactual_diff:pairs (11 diffs), plus\n        diffs[] + resolved_snapshot_ids[] envelope. end >= start is\n        enforced.\n        Not for: month_count_cap > 60 (60-month retention budget cap);\n        end_as_of_date < start_as_of_date (rejected as invalid_input);\n        非月次 grain (snapshots are monthly bucket only); 採択\n        prediction / 法令解釈 emission (past-tense factual replay only)."
    },
    {
      "name": "verify_citations",
      "description": "[CITATION-VERIFY] Substantiate verification_status=\"verified\" by deterministic substring + Japanese numeric-form match against the cited primary source. Pure no-LLM. Per-citation verdict ∈ {verified, inferred, unknown}; SHA256 checksum returned for re-checks. Up to 10 citations / 30s wall clock.\n\n        When to use: agent assembled a packet / response\n        with up to 10 citations and wants deterministic\n        proof that each cited field actually appears in\n        the fetched primary source — substring + Japanese\n        numeric-form (漢数字 / 全角数字) match against the\n        excerpt, per-citation verdict ∈ {verified /\n        inferred / unknown}, SHA256 of the source body\n        returned so the caller can re-check later. Pure\n        no-LLM verification; 30-second wall clock cap.\n        For personas: 監査 / 内部統制 担当 substantiating\n        cited values in 監査調書 (NOT 監査意見); AX engineer\n        wiring an \"audit-grade citation\" gate before\n        surfacing packet to end-user; FDE composing\n        evidence-of-truth surface; 弁護士 / 税理士 /\n        会計士 verifying source-of-truth before reuse;\n        researcher reproducing citation provenance.\n        Example: citations=[{\"source_url\":\"https://elaws...\",\n        \"excerpt\":\"...税率は12%...\",\"field_value\":\"12%\"}] →\n        returns {\"results\":[{\"source_url\":...,\"verdict\":\n        \"verified\",\"matched_form\":\"12%\",\"sha256\":\n        \"sha256:...\",\"method\":\"substring+全角\"},\n        ...], \"n\":1, \"schema_version\":\n        \"citations.verify.v1\", \"no_llm\": true,\n        \"_wall_clock_ms\": 412}.\n        Not for: 法解釈 of the cited content (弁護士法 §72 fence —\n        verify_citations is provenance, NOT 法解釈); 監査意見 emission\n        (公認会計士法 §47条の2 fence); 採択 / claim 保証 (景表法 fence —\n        verdict is substring-match, not endorsement of the claim);\n        信用情報 emission (信用情報法 fence); 高頻度 batch ≥10 citations\n        (use multiple calls — single-call cap is 10 / 30 sec)."
    },
    {
      "name": "case_cohort_match_am",
      "description": "[PEER-MATCH] 同業 (JSIC) × 同規模 (employees + revenue) × 同地域 (prefecture) peer-group matcher: pulls source-derived dataset (public corpus, 2,286) + source-derived dataset (public corpus, 201,845) + per-program rollup (appearance_count / avg_amount / peer_group_share). Single ¥3/billable unit. NO LLM. §52 / §47条の2 / §1 sensitive — information retrieval, not 申請代理.\n\n        When to use: agent has at least one of {industry_jsic, employee_count_range,\n        revenue_yen_range, prefecture} and wants a same-industry × same-size × same-region\n        peer group rollup — source-derived dataset (public corpus 2,286) joined with source-derived dataset\n        (public corpus 201,845) keyed on program: appearance_count + avg_amount + peer_group_share.\n        Single ¥3/billable unit; pure factual rollup.\n        For personas: 中小企業診断士 / 行政書士 producing client peer group comparison\n        scaffold (final §1 申請代理 belongs to 行政書士); 税理士 / 公認会計士 reading\n        peer group 採択 history to support workpaper (final §52 / §47条の2 belongs to respective\n        peer group); 自治体 / 商工会議所 LP teams scoping peer group coverage; AX_engineer wiring\n        a \"client peer group match\" widget; researcher producing benchmark peer group studies.\n        Example: industry_jsic=\"E29\", employee_count_range=[10, 100], prefecture=\"東京都\",\n        limit=20 → per-program rollup with appearance_count + avg_amount + peer_group_share.\n        Not for: free-text 申請書面 drafting (use 行政書士 peer group artifact builders under\n        §1); 採択 prediction (use outcome_acceptance_probability; peer_group_share is a\n        retrospective ratio, NOT prediction); single-houjin recommendation (use\n        recommend_programs_for_houjin). NO LLM inference inside this tool."
    },
    {
      "name": "match_cohort_5d_am",
      "description": "[PEER-5D] いつ使うか: 法人 × 業種 × 規模 × 地域 × 制度の 5 軸で「私と同じカテゴリの企業が通った制度」を即座に返す。入力: jsic_major (A-T)、employee_band (4 段階)、prefecture_code (47 都道府県 + null)、limit (1-100)。出力: eligible_program_ids[]、peer_group_meta (last_refreshed_at, eligible_count)。エラー: missing jsic/band → invalid_enum、public corpus 不在 → db_unavailable。1 ¥3/billable unit。NO LLM。§52 / §47条の2 / §1 sensitive。\n\n        When to use: agent already has the 5 peer group axes (JSIC 大分類,\n        employee_band, prefecture_code) and wants the \"同 peer group 企業が\n        過去採択された制度の rollup\" — substrate for downstream eligibility\n        chains. ¥3/billable unit scaffold material, NOT 採択保証.\n        For personas: 中小診断士 / 行政書士 peer group program-pool gathering;\n        AX_engineer wiring a \"私と同じ peer group 制度カタログ\" widget;\n        researcher building peer group-conditional acceptance baselines.\n        Example: jsic_major=\"C\" (製造業), employee_band=\"10-99\",\n        prefecture_code=\"13\" (東京都), limit=20 → returns\n        {eligible_program_ids: [...], peer_group_meta: {last_refreshed_at: ...,\n        eligible_count: N}, _disclaimer: ...}.\n        Not for: 採択保証 / 過去の採択実績 forecast emission (景表法 fence —\n        past peer group rollup, NOT future prediction); 与信判断 substitute\n        (信用情報法 fence); peer group with <5 historical 採択 (returns\n        eligible_count=0 with rationale); single-program detail lookup\n        (use ``program_full_context`` instead)."
    },
    {
      "name": "program_risk_score_am",
      "description": "[PROGRAM-REVIEW-4D] いつ使うか: 制度 × 業法 × 行政処分 × 取消理由の 4 軸 review score (0-100) を返す。weighted: 業法 0.5 / 行政処分 0.3 / 取消理由 0.2。入力: program_id (unified_id)。出力: top_review_signal + all_axes[]、weights、_disclaimer。エラー: program_id 未指定 → invalid_enum、precompute 不在 → axis_count=0 で返却 (200 OK)。1 ¥3/billable unit。NO LLM。§52 / §47条の2 / §1 sensitive — 行政書士法 §1 / 税理士法 §52 の boundary を crossed 制度を識別する用途。\n\n        When to use: agent has a program_id and wants a 4-axis weighted\n        review score (業法0.5 + 行政処分0.3 + 取消理由0.2) to flag whether\n        the program crosses a 士業 boundary or carries historical\n        enforcement signal. Statistical estimate, scaffold material —\n        NOT 違反性判断.\n        For personas: 行政書士 boundary pre-check (does this program\n        cross 弁護士法 §72 / 税理士法 §52?); AX_engineer wiring a\n        program-risk widget; researcher building risk-axis reproducibility\n        tables.\n        Example: program_id=\"UNI-it-2025-...\" → returns {top_review_signal: \"業法\",\n        all_axes: [{axis: \"業法\", score: 78, evidence_count: 5}, ...],\n        weights: {業法: 0.5, 行政処分: 0.3, 取消理由: 0.2}, _disclaimer: ...}.\n        Not for: 採択保証 / 違反性最終判断 emission (景表法 fence,\n        scaffold only); 与信判断 substitute (信用情報法 fence);\n        precompute 不在 program (returns axis_count=0 — agent should\n        fall back to ``legal_chain_am``); program_id 形式違反."
    },
    {
      "name": "supplier_chain_am",
      "description": "[SUPPLIER-CHAIN] いつ使うか: anchor houjin を起点に bipartite chain (invoice_registrant_active/revoked, adoption_partner, enforcement_subject の 4 link_type) を最大 5 hop まで traverse。入力: houjin_bangou (13 桁) + max_hops (1-5)。出力: edges[]、by_link_type breakdown、edge_count。エラー: houjin_bangou が 13 桁でない → invalid_enum、precompute 不在 → edges=[] で返却 (200 OK)。2 ¥3/billable unit (heavy)。NO LLM。§52 / §47条の2 / §1 sensitive — 取引先デューデリ用途、最終判断は士業へ。\n\n        When to use: agent doing supplier / 取引先 due-diligence needs to\n        traverse bipartite chains (invoice registrant active/revoked +\n        adoption partner + enforcement subject) up to 5 hops from one\n        anchor 法人. ¥6 vs ~3-turn 外部 LLM chain traversal (¥180).\n        Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Deterministic SQL, no probabilistic guesses.\n        For personas: 税理士 (顧問先 取引先 invoice registrant verify),\n        会計士 (期末 関連当事者 開示 substrate), AX_engineer wiring a\n        supplier-risk screen for procurement / KYC, FDE 内部統制 review\n        of 取引先 network shape.\n        Example: houjin_bangou=\"1234567890123\", max_hops=3 → returns\n        {edges: [{src, dst, link_type, hop}], by_link_type:\n        {invoice_registrant_active: N, …}, edge_count: M} envelope.\n        Empty result returns 200 with edges=[] not error.\n        Not for: 与信判断 emission (信用情報法 retrieval scope only — final\n        与信 belongs to 与信機関); 取引停止勧告 emission (商法判断 belongs\n        to 弁護士); 反社チェック最終結論 (compliance officer の判断). Use as\n        scaffold; verify each edge against primary registry before action."
    },
    {
      "name": "portfolio_optimize_am",
      "description": "[R8-COMPAT] source-derived dataset 43,966 row full surface — portfolio optimizer (greedy max-IS) + duplicate / mutually-exclusive review pairs + top-3 recommended_mix ranked by axis-weighted score (coverage / amount / review). Cross-joins source-derived dataset + source-derived dataset + source-derived dataset + source-derived dataset. deterministic retrieval + Python. NO LLM. §52 / §1 / §72 sensitive — verify 経費重複 + 適正化法 17 条 before stacking.\n\n        When to use: agent has 2-30 candidate program ids and needs the\n        optimal stack (greedy max-IS), explicit duplicate / mutually-\n        exclusive review pairs, and top-3 recommended_mix ranked by one of\n        coverage / amount / review axes. ¥3 vs ~10-turn 外部 LLM portfolio\n        reasoning (¥600). Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Deterministic structured public index + Python.\n        For personas: 中小企業 経営者 (補助金 ポートフォリオ 最適化 一発),\n        行政書士 (顧問先 申請ロードマップ substrate), AX_engineer wiring\n        an SME funding-stack planner, FDE 顧客 portfolio screening tool.\n        Example: candidate_program_ids=[\"UNI-it-2025-001\", \"UNI-mono-\n        2025-002\", \"UNI-jizoku-2025-003\"], target_axes=[\"amount\",\n        \"coverage\"] → returns {optimal_set: [3 ids], duplicate_pairs:\n        [], exclusive_pairs: [{a, b, reason: \"経費重複\"}],\n        recommended_mix: [top 3 mix rankings], _disclaimer} envelope.\n        target_axes=None defaults to [\"amount\"].\n        Not for: 採択保証 / 経費認定 final emission (景表法 fence,\n        scaffold only); 適正化法 17 条 (補助金等適正化法) 違反性 final\n        判断 (行政庁の 判断); 1 candidate (use program lookup); 31+\n        candidates (rejected, cap 30 — split into 2 calls)."
    },
    {
      "name": "program_compatibility_pair_am",
      "description": "[R8-COMPAT] 2 制度間の互換性 — 4-bucket verdict {compatible, mutually_exclusive, unknown, sequential} resolved over source-derived dataset + source-derived dataset + source-derived dataset + source-derived dataset. 'sequential' fires on temporal-precedence edges (requires_before / precedes / follows / superseded_by). NO LLM. §52 / §1 / §72 sensitive.\n\n        When to use: agent already has two program canonical_ids and needs\n        a deterministic pair verdict (compatible / mutually_exclusive /\n        unknown / sequential) before recommending a stack. Pair-verdict\n        only — for portfolio-scale ranking use ``portfolio_optimize_am``;\n        for full-program detail use ``program_full_context``.\n        For personas: 行政書士 / 中小診断士 stacking pre-check, AX_engineer\n        wiring a stack-validation widget, researcher producing compat-pair\n        reproducibility tables for funding-stack studies.\n        Example: a=\"program:04_program_documents:000000:23_25d25bdfe8\",\n        b=\"program:08_loan_programs:000017:23ec41c30b\" → returns\n        {verdict: \"sequential\", precedence_edge: \"requires_before\",\n        rationale_chain: [...], citation_ids: [...]} with §52 / §1 / §72\n        disclaimer envelope.\n        Not for: 経費重複判定の最終助言 emission (適正化法 §17 fence,\n        scaffold only — final判断 belongs to 行政書士/税理士);\n        N-program portfolio optimization (use portfolio_optimize_am);\n        pair lookup for non-canonical-id strings (validate canonical_id\n        format upstream)."
    },
    {
      "name": "apply_eligibility_chain_am",
      "description": "Multi-step eligibility orchestration over prerequisite_chain → rule_engine_check → source-derived dataset → source-derived dataset per program. Returns per-program verdict (eligible / partial / ineligible) + reasoning_steps + cite chain. Heuristic; verify primary source. §52 sensitive.\n\n        When to use: agent has 1-20 candidate program_ids + a\n        houjin profile and wants per-program eligibility verdict\n        with reasoning_steps + cite chain before deciding which\n        to apply for. Replaces N round-trips of single-program\n        check_eligibility. Deterministic SQL walk; no LLM\n        inference; statistical / rule-engine output, not\n        申請可否 final 判定.\n        For personas: 中小企業 経営者 narrowing 補助金 shortlist;\n        中小企業診断士 / 経営コンサル designing application\n        portfolio; AX engineer wiring an eligibility-prefilter\n        widget into a recipe; FDE auditing rule-engine coverage\n        per peer group.\n        Example: profile={\"prefecture\":\"東京都\",\"industry_jsic\":\n        \"39\",\"annual_revenue_yen\":80_000_000}, program_ids=\n        [\"program:base:71f6029070\",\"program:base:abc...\"],\n        chain_depth=4 → returns {\"per_program\":[{\"program_id\":\n        ..., \"verdict\":\"partial\", \"reasoning_steps\":[{\"step\":1,\n        \"kind\":\"prerequisite_chain\",\"verdict\":\"hold\",\"detail\":\n        ...}, ...], \"citations\":[...]}], \"schema_version\":\n        \"composition.eligibility.v1\", \"no_llm\": true}.\n        Not for: 申請可否 final 判定 (verdict is heuristic — practitioner\n        confirms primary source); 申請代理 (行政書士法 §1 fence — agent\n        does not submit on behalf); 税務助言 (税理士法 §52 fence — tax\n        treatment of awards is separate); 採択保証 (景表法 fence — no\n        adoption probability guarantee implied)."
    },
    {
      "name": "find_complementary_programs_am",
      "description": "Seed program → source-derived dataset compatible edges → portfolio with combined_ceiling_yen + conflicts. authoritative_share_pct surfaced. inferred_only=true edges are heuristic. §52 sensitive — verify 経費重複 + 適正化法 17 条 before stacking.\n\n        When to use: agent has a seed program_id and wants the\n        top-N compatible peer programs to build a stacked\n        portfolio — surfaces combined_ceiling_yen, conflicts,\n        authoritative_share_pct (vs inferred_only edges). Use\n        as the portfolio expansion hop after intel_match /\n        recommend_programs_for_houjin. Pure precomputed walk,\n        no LLM, no advisory emission.\n        For personas: 中小企業 経営者 expanding 補助金 portfolio;\n        中小企業診断士 / 経営コンサル designing stacked filings;\n        AX engineer wiring a portfolio-builder widget; FDE\n        designing 補助金 navigator surfaces; researcher\n        evaluating compatibility-matrix coverage.\n        Example: seed_program_id=\"UNI-METI-monozukuri-2024\",\n        top_n=10, exclude_unknown_compat=true → returns\n        {\"seed\":..., \"complementary\":[{\"program_id\":...,\n        \"compat_status\":\"compatible\", \"combined_ceiling_yen\":\n        14_000_000, \"authoritative_share_pct\": 0.82,\n        \"inferred_only\": false, ...}, ...], \"conflicts\":[...],\n        \"schema_version\":\"composition.complementary.v1\",\n        \"no_llm\": true}.\n        Not for: 申請可否 final 判定 (use apply_eligibility_chain_am\n        / check_eligibility for per-program verdicts); 経費重複\n        verdict (適正化法 §17 fence — practitioner must verify);\n        申請代理 (行政書士法 §1 fence); 税務助言 (税理士法 §52 —\n        stacking generates taxable awards); 採択保証 (景表法 fence)."
    },
    {
      "name": "simulate_application_am",
      "description": "Pure-SQL mock walkthrough: source-derived dataset + source-derived dataset + source-derived dataset + source-derived dataset. Returns document_checklist + certifications + est_review_days + completeness_score. NO LLM. §52 sensitive — not a substitute for 行政書士 §1 申請代理.\n\n        When to use: agent already locked a program_id and\n        wants a mock walkthrough — document_checklist +\n        certifications + est_review_days + completeness_score\n        — so caller can show \"what do I prepare next\" to the\n        end-user without actually filing. Use after\n        apply_eligibility_chain_am verdict='eligible'.\n        Deterministic SQL join; no LLM; not advice emission.\n        For personas: 中小企業 経営者 preparing 補助金 filing\n        package; 行政書士 surfacing per-step checklist\n        material (NOT 申請代理); 中小企業診断士 / 経営コンサル\n        building filing readiness brief; AX engineer wiring a\n        \"preflight\" widget; FDE designing onboarding for SaaS\n        補助金 navigator.\n        Example: program_id=\"program:base:71f6029070\",\n        profile={\"prefecture\":\"東京都\",\"annual_revenue_yen\":\n        80_000_000, \"employees\": 22}, target_round=\"next\" →\n        returns {\"steps\":[{\"step\":1,\"name\":\"事業計画書 起案\",\n        \"doc_kind\":\"事業計画書\",\"est_days\":7}, ...],\n        \"document_checklist\":[...], \"certifications\":[...],\n        \"est_review_days\":45, \"completeness_score\":0.72,\n        \"schema_version\":\"composition.simulate.v1\", \"no_llm\":\n        true}.\n        Not for: 申請代理 (行政書士法 §1 fence — agent does NOT submit\n        on behalf); 過去の採択実績 emission (景表法 fence — completeness_score\n        is preparation-readiness, NOT adoption probability); 法律\n        判断 (弁護士法 §72 fence); 税務代理 (税理士法 §52 fence)."
    },
    {
      "name": "track_amendment_lineage_am",
      "description": "source-derived dataset time-series for a target (14,596 rows; only 140 carry effective_from). Returns timeline + strict_count (with effective_from) + hash_only_count + warnings. eligibility change marker is uniform sha256-of-empty on 82.3% — time-series fence surfaced.\n\n        When to use: agent wants the amendment timeline for a\n        specific law or program canonical_id — strict (with\n        effective_from) vs hash-only counts surfaced so caller\n        can grade certainty before re-using. Pair with\n        query_program_evolution / query_at_snapshot_v2 for\n        as-of-date semantics. Pure metadata walk; no LLM; no\n        opinion on lineage validity.\n        For personas: 中小企業診断士 / 経営コンサル auditing\n        制度 changes between filings; 行政書士 verifying\n        applicability of older filings against current text\n        (NOT 法解釈 emission); 税理士 mapping 税制 amendment\n        cadence; AX engineer wiring a \"what changed since X\"\n        widget; FDE building compliance-drift alert.\n        Example: target_kind=\"program\", target_id=\n        \"program:base:71f6029070\", since=\"2024-01-01\" →\n        returns {\"timeline\":[{\"observed_at\":\"2024-03-15\",\n        \"effective_from\":\"2024-04-01\",\"strict\":true,\n        \"snapshot_hash\":\"sha256:...\", ...}, ...],\n        \"strict_count\":3, \"hash_only_count\":11, \"warnings\":\n        [\"82.3% of snapshots carry empty-hash placeholder\"],\n        \"schema_version\":\"composition.lineage.v1\", \"no_llm\":\n        true}.\n        Not for: 法解釈 emission (弁護士法 §72 fence — agent does NOT\n        rule on whether older filing remains valid); 申請代理 (行政書士法\n        §1 fence); 税務代理 (税理士法 §52 fence); 採択保証 (景表法 fence —\n        lineage does not predict 採択); credit info (信用情報法 fence —\n        amendment != credit signal)."
    },
    {
      "name": "program_active_periods_am",
      "description": "source-derived dataset (1,256 rows) per-program rounds + days_to_close + sunset_warning. Returns open_count / upcoming_count / closed_count + soonest_close_date. sunset_warning fires when only closed rounds exist OR close < 14 days away.\n\n        When to use: agent has a program_id and wants the per-\n        program round list + days_to_close + sunset_warning —\n        is this 制度 still open, when does it next close, is it\n        sunsetting. Use as the deadline-check hop right before\n        deciding whether to commit to the application. future_only\n        narrows to live + upcoming rounds.\n        For personas: 中小企業 経営者 watching deadlines on a\n        shortlisted 制度; 中小企業診断士 / 経営コンサル warning\n        clients about sunsetting programs; AX engineer wiring a\n        deadline-radar widget; FDE building a 制度 watchlist\n        panel; 行政書士 substrate gathering for §1 書面 timing.\n        Example: program_id=\"UNI-METI-monozukuri-2024\",\n        future_only=true → returns {\"program_id\":...,\n        \"rounds\":[{\"round_label\":\"15次\", \"open_date\":\n        \"2026-06-10\", \"close_date\":\"2026-07-15\", \"days_to_close\":\n        47, \"status\":\"upcoming\"}, ...], \"open_count\":1,\n        \"upcoming_count\":2, \"closed_count\":14,\n        \"soonest_close_date\":\"2026-07-15\", \"sunset_warning\":\n        false, \"schema_version\":\"composition.active.v1\",\n        \"no_llm\": true}.\n        Not for: 採択保証 (these are deadlines, not selection);\n        binding 公募 締切 guarantee (always cross-check the 公式\n        募集要領 before filing); 申請代理 (行政書士法 §1 fence);\n        税務助言 on filing timing (税理士法 §52 fence); 法解釈\n        of round eligibility predicates (弁護士法 §72 fence)."
    },
    {
      "name": "programs_by_corporate_form_am",
      "description": "[CORPORATE-FORM-AM] 法人格 × 制度 適用 matcher。NO LLM, ¥3/billable unit metered. `_disclaimer` 必須。\n\n        WHAT: `source-derived dataset` の\n        ``$.target_entity_types`` 軸 (5,702 rows) を法人格 short code に\n        正規化し、与えられた form (株式会社 / 合同会社 / NPO / 一般社団 /\n        公益社団 / 学校 / 医療 / 個人事業主 等) に該当する program を\n        返却。``industry_jsic`` を与えると ``$.industries_jsic`` で\n        さらに絞り込み。\n\n        WHEN:\n          - 「私の法人格 (合同会社) で使える制度を narrow したい」\n          - 「個人事業主 NG 制度を frame out したい」\n          - 「NPO 法人で建設業向け補助金を探したい (form=npo, industry_jsic=D)」\n\n        WHEN NOT:\n          - 法人格 不明 / 検索 → search_programs (free-text)\n          - 都道府県 軸 → programs_by_region_am\n          - 個別 program の form 適用表 → program_eligibility_by_form_am\n\n        RETURNS (envelope):\n          {\n            applied_filters: {form_code, form_label, form_entity_class,\n                              industry_jsic, limit},\n            programs: [\n              {unified_id, primary_name, tier, prefecture, program_kind,\n               amount_max_man_yen, source_url,\n               predicate_target_entity_types, predicate_industries_jsic,\n               predicate_prefectures, predicate_funding_purposes,\n               predicate_confidence, predicate_extraction_method},\n              ...\n            ],\n            count, total, results,  # all = same list (FastMCP convention)\n            _disclaimer,             # 税理士法 §52 / 行政書士法 §1 fence\n            _form_caveat,            # predicate-axis precision note\n            _next_calls: [...]       # composition hints\n          }"
    },
    {
      "name": "program_eligibility_by_form_am",
      "description": "[CORPORATE-FORM-AM] 制度別 法人格 適用表 (15 axes)。NO LLM, ¥3/billable unit metered. `_disclaimer` 必須。\n\n        WHAT: 1 program について、株式会社 / 合同会社 / 合資会社 / 合名会社 /\n        NPO / 一般社団 / 公益社団 / 一般財団 / 公益財団 / 学校 / 医療 /\n        事業協同組合 / 個人事業主 / 個人 / 外国法人 の 15 法人格について\n        ``allowed`` / ``not_allowed`` を判定し、根拠 (predicate\n        target_entity_types) を併記する。\n\n        WHEN:\n          - 「IT導入補助金 を 合同会社 が申請できるか?」\n          - 「事業再構築補助金 の対象法人格を一覧で確認したい」\n          - 「個人事業主 NG 制度を 1 個別チェック」\n\n        WHEN NOT:\n          - form 別の program list → programs_by_corporate_form_am\n          - 法人 360 view → get_houjin_360_am\n          - 制度本体の narrative → program_abstract_structured /\n            search_programs(unified_id=...)\n\n        RETURNS (envelope):\n          {\n            unified_id,\n            program: {primary_name, tier, prefecture, program_kind,\n                      amount_max_man_yen, subsidy_rate, source_url},\n            matrix: {\n              kabushiki:    {label, entity_class, verdict, reason},\n              goudou:       {...},\n              ...,\n              foreign:      {...}\n            },\n            predicate_target_entity_types: [...] | null,\n            predicate_confidence: float,\n            predicate_extraction_method: 'rule_based'|'llm_extracted'|'manual',\n            _disclaimer, _form_caveat, _next_calls\n          }\n\n        When to use: 15 法人格 適用表 (株式 / 合同 / 合資 / NPO /\n        一般社団 / 個人事業主 / 外国法人 / 学校法人 等) for 1\n        program — ¥3 vs ~4-turn 外部 LLM \"fetch program + parse\n        target_types + reason about 15 entity classes + cite\n        verdict\" chain (¥240). Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest: NO LLM,\n        predicate-based verdict matrix; predicate_confidence\n        reflects extraction method ('rule_based' / 'manual'),\n        rows with predicate_confidence < 0.5 = \"unknown\" NOT\n        \"allowed\".\n        For personas: 行政書士 / 司法書士 office screening 制度\n        for 法人格 match (clients are mix of 株式 / 合同 / 個人\n        事業主 / NPO), 中小企業診断士 office building 法人格-\n        eligible 補助金 list, FDE building \"can my 合同会社\n        apply for X\" widget, agent triaging \"is 個人事業主 OK\n        for this program\" question.\n        Example: program_eligibility_by_form_am(unified_id=\n        \"UNI-000780f85e\") -> {unified_id: \"UNI-…\", program:\n        {primary_name: \"IT導入補助金\", tier: \"S\", …}, matrix:\n        {kabushiki: {label: \"株式会社\", entity_class: \"for_profit_kk\",\n        verdict: \"allowed\", reason: \"target_types contains\n        for_profit\"}, goudou: {…, verdict: \"allowed\"}, kojin:\n        {…, verdict: \"not_allowed\", reason: \"個人事業主 explicitly\n        excluded\"}, foreign: {…, verdict: \"unknown\"}, …},\n        predicate_target_entity_types: [\"for_profit\",\"sme\"],\n        predicate_confidence: 0.92, predicate_extraction_method:\n        \"rule_based\", _disclaimer: \"…\"}.\n        Not for: form-by-form program list (use\n        programs_by_corporate_form_am); 法人 360 view (use\n        get_houjin_360_am); program narrative (use\n        program_abstract_structured / search_programs); 採択保証\n        (景表法 fence — eligibility scaffold only, NOT 採択率\n        予測); 法人格変更 / 設立 助言 (士業法 fence — 司法書士法\n        §3 — emission belongs to 司法書士); 行政書士 申請書面作成\n        (行政書士法 §1 fence — substrate only); predicate_confidence\n        < 0.5 row interpretation as 'allowed' (must treat as\n        unknown); 個人 (not 個人事業主) eligibility (this is\n        for 法人格 + 個人事業主 only)."
    },
    {
      "name": "get_houjin_360_am",
      "description": "[CORPORATE-LAYER] 法人 360° view by 法人番号 — joins source-derived dataset + source-derived dataset + source-derived dataset + source-derived dataset into a single envelope. Surfaces master_info + invoice_status + enforcement_count + adoption_count + related_programs_count. NO LLM. §52 sensitive — 与信判断 / 税務助言 territory.\n\n        When to use: agent has a 13-digit 法人番号 (with or without 'T' prefix) and needs a single-call snapshot of (法人マスタ + インボイス登録 status + 行政処分 count + 採択履歴 count + 関連制度 count) for a downstream prompt context, before deciding what deeper drill-down tool to call.\n        For personas: 税理士 / 会計士 / 中小企業診断士 peer group agents quickly orienting on a new 法人; AX_engineer building 与信 / KYC pre-screens. Surface the envelope to your client agent, do NOT auto-emit 与信判断 or 税務助言 conclusions — §52 / §47条の2 fence.\n        Example: houjin_bangou=\"1234567890123\" → master_info + invoice_status + counters.\n        Not for: deep portfolio gap analysis (use find_gap_programs); single-source detail like raw enforcement rows (use list_enforcement_detail); LLM-style commentary or 与信 ranking — those are 士業 act of advice and remain client-agent responsibility."
    },
    {
      "name": "list_edinet_disclosures",
      "description": "[CORPORATE-LAYER] EDINET (金融庁 電子開示) disclosure pointer — returns canonical search URL + API v2 query hint for 有価証券報告書 / 大量保有報告書 etc. Pointer-only (NO live HTTP inside tool). License public_domain. NOT sensitive — pure pointer, no advice; customer LLM fetches body itself.\n\n        When to use: agent has a 法人番号 or 証券コード and\n        wants the EDINET (金融庁 電子開示) search URL + API v2\n        query hint to fetch 有価証券報告書 / 大量保有報告書 /\n        四半期報告書 etc. Use as the EDINET integration entry\n        point — this tool returns the canonical URL only, the\n        customer LLM / agent fetches the body itself (no\n        in-tool HTTP, no rate-limit ownership inside jpcite).\n        For personas: 公認会計士 / 監査法人 doing 監査\n        evidence collection; 証券アナリスト / M&A advisor\n        scoping disclosures; AX engineer wiring an EDINET\n        integration; FDE designing a 上場企業 watch service;\n        弁護士 doing 大量保有 reporting review.\n        Example: houjin_bangou=\"6010001001531\",\n        sec_code=\"13010\" → returns {\"houjin_bangou\":\n        \"6010001001531\", \"sec_code\": \"13010\",\n        \"edinet_search_url\": \"https://disclosure2.edinet-fsa.\n        go.jp/...\", \"api_v2_query_hint\": {\"endpoint\":\n        \"/api/v2/documents.json\", \"params\": {...}},\n        \"license\": \"public_domain — 出典明記必須\",\n        \"schema_version\": \"corporate_layer.edinet.v1\",\n        \"_billing_unit\": 1, \"no_llm\": true}.\n        Not for: live EDINET body fetch (the tool returns a\n        pointer; agent / customer LLM handles HTTP); 有価証券\n        報告書 解釈 (会計士 reviews semantic content);\n        証券取引 助言 (金商法 sensitive); 大量保有 報告\n        義務 final 判断 (弁護士法 §72 / 金商法 fence). The\n        pointer is a 1-call retrieval substrate — body\n        interpretation lives elsewhere."
    },
    {
      "name": "search_invoice_by_houjin_partial",
      "description": "[CORPORATE-LAYER] Partial 法人名 search across NTA 適格請求書発行事業者 (PDL v1.0 bulk). Substring LIKE on normalized_name with 出典明記 + 編集・加工注記 attribution included in covered responses. Returns top-N matches with houjin_bangou + status + last_update. §52 sensitive — 仕入税額控除 確定判断 territory.\n\n        When to use: 経理 / 税理士 agent has a partial 法人名\n        substring (no T-number, no 法人番号) and needs to\n        resolve to candidate 適格請求書発行事業者 with\n        houjin_bangou + 適格 status + last_update. Use when\n        the invoice ledger only has 法人名 spelling (no\n        canonical id) — substring LIKE over normalized name.\n        出典明記 + 編集・加工注記 attribution baked into every\n        response per PDL v1.0 license.\n        For personas: 経理 reconciling invoice ledger by\n        name; 税理士 batch verifying 取引先 fragments; 行政書士\n        clarifying client 取引先 list; AX engineer wiring an\n        invoice name-resolver; FDE designing 取引先 KYC where\n        only name fragments are available.\n        Example: name_query=\"株式会社新宿商店\",\n        limit=10 → returns {\"name_query\": \"...\", \"hits\":\n        [{\"houjin_bangou\": \"8010001213708\", \"normalized_name\":\n        \"...\", \"tekikaku_status\": \"issued\", \"last_update\":\n        \"2026-05-...\", \"source_attribution\":\n        \"NTA 適格請求書発行事業者 PDL v1.0 — 出典明記必須\",\n        \"editing_note\": \"編集・加工 substring match\"}, ...up\n        to 10...], \"schema_version\":\n        \"corporate_layer.invoice_partial.v1\",\n        \"_billing_unit\": 1, \"no_llm\": true}.\n        Not for: T-number direct lookup (use invoice_risk_\n        lookup / houjin_invoice_status — those keyed on\n        T-number are faster and authoritative); 仕入税額控除\n        適用 final 判断 (§52 fence — 税理士 reviews actual\n        通用); 与信判断 substitute (信用情報法 fence —\n        public registry, NOT credit). Match is fuzzy by\n        design — always cross-check the resolved row with the\n        invoice's actual T-number before applying."
    },
    {
      "name": "program_full_context",
      "description": "[CROSS-REF R8] Bundle the full primary-source context of a 制度 in 1 call: program metadata + 法令根拠 + 改正履歴 + 関連判例 + 同業 採択事例 + 関連 行政処分 + 排他ルール. deterministic retrieval over public corpus + best-effort public corpus source-derived dataset. ¥3/billable unit. §72/§52/§1/§27 fence.\n\n        When to use: agent already has a program canonical id\n        (UNI-...) and needs every primary-source axis in one\n        metered call before drafting an application or due\n        diligence pack — program metadata + 法令根拠 + 改正履歴 +\n        関連判例 + 同業 採択事例 + 行政処分 + 排他ルール. Skips\n        the multi-tool fan-out (program lookup → law lookup →\n        court lookup → ...) for a single ¥3 unit.\n        For personas: 行政書士 prepping a 申請書 with full citation\n        chain; 中小企業診断士 peer group onboarding briefing; AX\n        engineer wiring an application drafter that must hydrate\n        every axis; FDE designing a 1-call \"full context\" hop in\n        a customer agent pipeline.\n        Example: program_id=\"UNI-MONOZUKURI-2026\",\n        include_sections=[\"program\",\"law_basis\",\"source-derived dataset\"],\n        max_per_section=5, prefecture=\"東京都\" → returns {\"program\":\n        {...}, \"law_basis\": [...up to 5 laws...], \"source-derived dataset\":\n        [...up to 5 同業 採択事例...], \"schema_version\":\n        \"cross_ref_r8.v1\", \"_billing_unit\": 1, \"no_llm\": true}.\n        Not for: 過去の採択実績 forecasting (use\n        outcome_acceptance_probability); 法令解釈 final 助言 (§72\n        fence — 弁護士 reviews); 申請書面作成 final 代行 (§1\n        fence — 行政書士 reviews); per-axis deep walk (use\n        law_related_programs_cross / find_similar_case_studies\n        instead when narrowing in)."
    },
    {
      "name": "law_related_programs_cross",
      "description": "[CROSS-REF R8] Reverse program lookup for a 法令: walks supersession chain (both directions) and surfaces every program citing the law (or a predecessor) with a ref_kind histogram. deterministic retrieval over laws + source-derived dataset. ¥3/billable unit. §72/§52/§1 fence.\n\n        When to use: agent has a law canonical id (LAW-...) and\n        wants to see every program that cites it (or one of its\n        predecessors / successors). Walks supersession chain both\n        ways so historical amendments do not orphan programs.\n        Use this before drafting a 法令改正 impact memo or when a\n        customer asks \"this 法令 changed — which 制度 are\n        affected?\".\n        For personas: 弁護士 / 行政書士 doing 法令改正 impact\n        scoping; 中小企業診断士 advising a client on regulatory\n        watch; AX engineer wiring a 法令改正 watcher; 中央省庁\n        staff sweeping which programs reference a deprecated law\n        ahead of repeal.\n        Example: law_id=\"LAW-小規模事業者持続化-2024-AMEND-3\",\n        include_superseded=True, ref_kind=\"eligibility\", limit=20\n        → returns {\"law\": {...}, \"ref_kind_histogram\":\n        {\"authority\": 4, \"eligibility\": 18, \"exclusion\": 2,\n        \"reference\": 7, \"penalty\": 1}, \"programs\": [...20 cited\n        programs...], \"schema_version\": \"cross_ref_r8.v1\",\n        \"_billing_unit\": 1, \"no_llm\": true}.\n        Not for: 法令解釈 final 助言 (§72 fence — 弁護士 reviews\n        actual interpretation); program suitability ranking (use\n        recommend_programs_for_houjin or cohort_match for\n        applicant-side narrowing); 過去の採択実績 prediction (separate\n        axis). The histogram is structural — does not endorse\n        any single program over another."
    },
    {
      "name": "cases_by_industry_size_pref",
      "description": "[CROSS-REF R8] 採択事例 narrowed by 業種 (JSIC) × 規模 (employees / capital) × 都道府県 in 1 call. deterministic retrieval over source-derived dataset. ¥3/billable unit. NOT sensitive (1次資料の検索).\n\n        When to use: when the agent wants to ground a 採択 / 不採択\n        recommendation in EMPIRICAL same-peer group cases — same industry\n        (JSIC), similar size (employees / capital), same prefecture.\n        This is the 3-axis peer group narrow that powers \"似た規模の同業\n        ◯◯件の採択事例\" surfaces. 1 structured public index call against source-derived dataset,\n        deterministic, ¥3/billable unit. NO LLM.\n        For personas: 中小企業診断士 / 行政書士 peer group agents building\n        補助金 採択戦略 doc; 税理士 / 会計士 peer group agents preparing\n        a 経営計画 supplemented with peer 採択 evidence; AX_engineer\n        rendering a \"similar peers\" widget.\n        Example: industry_jsic=\"0512\" (食肉製造業), prefecture=\"東京都\",\n        min_employees=10, max_employees=50, limit=10 →\n        {\"results\": [{\"case_id\": \"...\", \"program_id\": \"...\",\n        \"houjin_name\": \"...\", \"amount_yen\": ..., \"decision\": \"採択\",\n        \"decided_at\": \"2024-08-...\", ...}], \"total_count\": 47}.\n        Not for: broad nation-wide 採択統計 (use\n        ``outcome_acceptance_probability`` for peer group probability);\n        same-houjin 採択 history (use ``get_houjin_360_am``);\n        non-numeric narrowing like 業種テキスト search (use\n        ``search_programs`` or alias resolver first); LLM-style 採択\n        outlook generation (士業法 fence — agent composes)."
    },
    {
      "name": "find_municipality_subsidies",
      "description": "[DD2 GEO] Dedicated municipality-OCR subsidy lookup over source-derived dataset. This dataset can be empty on the current public corpus; use `search_programs` for sellable broad 支援制度 discovery unless this tool returns rows. When populated, returns rows with 5-axis citation (subsidy_url + PDF/OCR provenance + ocr_job_id + sha256). 政府著作物 §13 license — source_attribution envelope per row. NO LLM. Single ¥3/billable unit when rows are available.\n\n        --- R1 routing block (Phase 1 — 2026-05-18) ---\n        SUMMARY: Dedicated 市町村レベル補助金 OCR tableを prefecture × municipality × jsic × size の 4-axis で lookup。Current public coverage must be verified by row evidence; do not claim live all-municipality coverage from this tool alone.\n        WHEN TO USE:\n        - This tool returns rows for the requested municipality/OCR corpus\n        - 市区町村レベル補助金を 4-axis で絞りたい\n        - 「鴻巣市の中小製造業向け補助金は?」自治体ピンポイント\n        - 5-axis citation 必要 (監査用途)\n        WHEN NOT TO USE:\n        - Empty/known-gap result or broad discovery → search_programs\n        - 国・都道府県制度 → search_programs\n        - 1 件の詳細 → get_program\n        - 今開いてる窓口 → list_open_programs\n        - 翻訳 / world knowledge\n        EXAMPLE INPUT: {\"prefecture\": \"埼玉県\", \"municipality_code\": \"11217\",\n                        \"jsic_major\": \"E\", \"target_size\": \"small\", \"limit\": 20}\n        EXAMPLE OUTPUT: {\"total\": 4, \"results\": [{\"unified_id\": \"...\",\n                         \"primary_name\": \"...\", \"municipality_name\": \"鴻巣市\",\n                         \"subsidy_url\": \"https://...\",\n                         \"pdf_s3_uri\": \"s3://...\", \"ocr_s3_uri\": \"s3://...\",\n                         \"ocr_job_id\": \"...\", \"sha256\": \"...\",\n                         \"ed25519_sig\": \"...\", \"freshness_iso\": \"...\"}],\n                         \"source_attribution\": \"政府著作物 §13 license\"}\n        COST: ¥3 (Tier B) per call"
    },
    {
      "name": "discover_related",
      "description": "[DISCOVER-RELATED] Returns up to 5 axes × 5 rows of related entities for the given entity in one call. deterministic retrieval + structured public index-vec, NO LLM. 1 ¥3 unit per call. SAME composer as REST GET /v1/discover/related/{entity_id}.\n\n        WHAT: Joins 5 already-shipped substrates into one envelope —\n        ``source-derived dataset`` (public corpus), `source-derived dataset*``\n        (structured public index-vec k-NN), `source-derived dataset` (co-adoption),\n        `source-derived dataset` (graph-density neighbours), and\n        `source-derived dataset` (precomputed multi-hop graph). Each axis is fail-open:\n        a missing/empty table yields an empty list, never a 5xx.\n\n        WHEN:\n          - \"この補助金 / 制度の関連を一発で全部見たい\" (LLM への入力前処理)\n          - 5 つの per-axis tool を順番に叩く前の starter set\n          - 監査再現用の corpus_snapshot_id 付き snapshot (audit_seal 同梱)\n\n        WHEN NOT:\n          - 単発の制度詳細 → get_program / search_programs\n          - 単発の併用可否 → check_funding_stack_am\n          - 深い graph walk (depth>=3 / 異種 entity) → graph_traverse\n          - 1 軸のみで十分 → related_programs (depth ≤ 2、6 軸固定)\n\n        RETURNS (envelope):\n          {\n            entity_id, resolved: { uni_id, canonical_id },\n            related: {\n              via_law_ref: [...],         // source-derived dataset 経由\n              via_vector:  [...],          // structured public index-vec k-NN\n              via_co_adoption: [...],      // source-derived dataset\n              via_density_neighbors: [...],// source-derived dataset の近傍\n              via_5hop: [...]              // source-derived dataset\n            },\n            total, k, per_axis_cap,\n            corpus_snapshot_id,\n            _disclaimer, _billing_unit\n          }\n\n        DATA QUALITY HONESTY: discover/related は starter set です。\n        各 axis 上位 5 件、合計最大 25 件。深掘りは per-axis tool に委ねる\n        こと。``_disclaimer`` は必須 — 最終判断は一次資料 (source_url) と\n        専門家確認を必ず経てください。"
    },
    {
      "name": "dynamic_eligibility_check_am",
      "description": "[ELIGIBILITY-DYNAMIC-AM] Joins one houjin's 行政処分 history (source-derived dataset) with source-derived dataset to triage every program in public corpus into blocked / borderline / eligible verdicts. NO LLM. Returns `_disclaimer`. Verify primary source (公募要領) before applying.\n\n        WHAT:\n          1. SELECT * FROM source-derived dataset WHERE houjin_bangou = ?\n             AND issuance_date >= today - exclude_history_years.\n          2. Bucket each hit by enforcement_kind:\n             * blocking  = subsidy_exclude / grant_refund / license_revoke\n             * warning   = contract_suspend / business_improvement / fine\n             * informational = investigation / other\n          3. SELECT source-derived dataset WHERE kind IN (exclude / absolute /\n             prerequisite / entity_scope_restriction).\n          4. For every candidate program (public corpus, optional industry_jsic +\n             program_id_hint filters), match against rules whose program_a /\n             program_b / program_b_group references it. If the houjin has\n             ≥1 blocking hit and the rule is exclude/absolute/scope → blocked.\n             Warning hits + critical-severity rule → borderline. Otherwise\n             eligible.\n\n        WHEN:\n          - 「弊社 (法人番号 1234567890123) は今 申請可能な 補助金 list が欲しい」\n          - 補助金 consultant の pre-screen (受任前 due diligence)\n          - 中小企業 が 自社 eligibility を 一括 評価\n\n        WHEN NOT:\n          - 個別の program × 法人 だけを問う → program_eligibility_for_houjin_am\n          - 公募要領 解釈そのもの (記述抽出は search_programs / get_program_abstract)\n          - 反社チェック / 信用情報 — source-derived dataset は 公表 行政処分 のみ\n\n        RETURNS:\n          {\n            houjin_bangou, industry_jsic, exclude_history_years,\n            enforcement_hits: [...],\n            blocked_programs: [...],\n            borderline_programs: [...],\n            eligible_programs: [...],\n            checked_program_count, checked_rule_count,\n            _disclaimer: str,\n          }\n\n        Errors return the canonical error envelope (db_unavailable /\n        invalid_argument / out_of_range)."
    },
    {
      "name": "program_eligibility_for_houjin_am",
      "description": "[ELIGIBILITY-PAIR-AM] Resolves eligibility for one (program, 法人) pair by joining source-derived dataset with source-derived dataset. NO LLM. Returns `_disclaimer`. Verify primary source.\n\n        Same algorithm as dynamic_eligibility_check_am, scoped to a single\n        program. Use this when the caller already has a program_id (e.g. from\n        search_programs) and wants the deterministic verdict for one\n        prospect.\n\n        Errors: program_id unknown → no_matching_records; missing volume →\n        db_unavailable; bad inputs → invalid_argument / out_of_range.\n\n        When to use: agent has one (program_id, houjin_bangou) pair and\n        needs a deterministic eligibility verdict via source-derived dataset\n        join with source-derived dataset. ¥3 vs ~5-turn 外部 LLM eligibility chain\n        (¥300). Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Same algorithm as\n        dynamic_eligibility_check_am, scoped to one program.\n        For personas: 中小企業 経営者 (具体的 program 自社 該当性\n        verify), 行政書士 (顧問先 単一 補助金 適格性 substrate),\n        AX_engineer wiring a single-program eligibility checker,\n        FDE 顧客 program-by-program eligibility scanner.\n        Example: program_id=\"UNI-it-2025-001\", houjin_bangou=\n        \"1234567890123\", exclude_history_years=5 → returns\n        {primary_result: {program_id: \"UNI-it-2025-001\", houjin_bangou:\n        \"1234567890123\", verdict: \"eligible\" | \"ineligible\" |\n        \"needs_review\", reason: \"…\", exclusion_hits: [...],\n        history_window_years: 5}, _disclaimer: \"…\", _billing_unit:\n        1} envelope. Verify each citation against primary source before\n        申請.\n        Not for: 採択保証 emission (景表法 fence, verdict is scaffold);\n        助言 emission (final 適格判断 belongs to 行政庁・実施機関);\n        program_id unknown (returns no_matching_records);\n        exclude_history_years outside 1..N (out_of_range); 与信判断 /\n        信用情報 surface; bulk multi-program eligibility (use\n        ``dynamic_eligibility_check_am`` instead)."
    },
    {
      "name": "get_evidence_packet",
      "description": "[EVIDENCE-PACKET] Returns a single Evidence Packet envelope: primary metadata + per-fact provenance + compat-matrix rule verdicts (program only). NO LLM. 1 ¥3 unit per call. SAME composer as REST /v1/evidence/packets/{subject_kind}/{subject_id}.\n\n        WHAT: Bundles four already-shipped substrates into one envelope —\n        ``api.source_manifest._resolve_program`` (resolution + primary\n        metadata), ``api.source_manifest._build_manifest`` (per-fact\n        provenance), ``services.funding_stack_checker`` (rule verdicts via\n        source-derived dataset + source-derived dataset), and `source-derived dataset`\n        (corpus_snapshot_id derivation). Fail-open: any upstream failure\n        appends a code to ``quality.known_gaps[]`` and the packet still\n        renders.\n\n        WHEN:\n          - 「この補助金 / 法人について jpcite が知っている全部を一発で\n             一次資料 URL 付きで返してほしい」 (LLM への入力前処理)\n          - Customer LLM が「答え + 出典」を出すための context bundle\n          - 監査再現用の corpus_snapshot_id 付きスナップショット\n\n        WHEN NOT:\n          - 単発の制度検索 / 制度詳細 → search_programs / get_program\n          - 単発の per-fact provenance → get_provenance_for_fact\n          - 単発の併用可否 → check_funding_stack_am\n          - 法人 360 だけ欲しい → houjin 360 endpoint\n\n        RETURNS (envelope, spec §6):\n          {\n            packet_id: \"evp_...\",\n            generated_at: \"2026-04-30T00:00:00+09:00\",\n            api_version: \"v1\",\n            corpus_snapshot_id: \"corpus-2026-04-29\",\n            query: { user_intent, normalized_filters },\n            answer_not_included: True,\n            records: [\n              {\n                entity_id, primary_name, record_kind,\n                source_url, tier?, prefecture?,\n                facts: [ { fact_id, field, value, confidence,\n                           source: { url, publisher, fetched_at,\n                                     checksum, license } } ],\n                rules: [ { rule_id, verdict, evidence_url, note } ],\n                fact_provenance_coverage_pct: 0.0..1.0\n              }\n            ],\n            quality: {\n              freshness_bucket, coverage_score,\n              known_gaps: [...], human_review_required\n            },\n            verification: {\n              replay_endpoint, provenance_endpoint, freshness_endpoint\n            },\n            _disclaimer: { type, not_legal_or_tax_advice, note }\n          }\n\n        DATA QUALITY HONESTY: This composer never invents data. When\n        upstream services are unavailable, codes appear in\n        ``quality.known_gaps[]`` (`provenance_unavailable`,\n        `compat_matrix_unavailable`, `amendment_diff_unavailable`,\n        `compat_matrix_no_partner`, `funding_stack_unavailable`). The\n        ``_disclaimer`` envelope is mandatory — verify primary source\n        before any decision; this is not legal or tax advice."
    },
    {
      "name": "fact_signature_verify_am",
      "description": "[FACT-SIGNATURE] Ed25519 signature verify + rule-based 'why' explanation for one extracted_fact row in a single MCP call. Returns verify={status: valid|tampered|no_signature|key_unconfigured, signed_at, key_id, payload_sha256} + why={explanation paragraph, rule_based, llm_used=false}. Detects byte-level tamper since signing (查察/audit retention proof) and surfaces the deterministic 'why this fact was extracted' paragraph in the same envelope. NO LLM, NO external HTTP. 1 ¥3 unit. §52/§47条の2/§72/§1 envelope. REST companions at GET /v1/facts/{fact_id}/verify + /v1/facts/{fact_id}/why.\n\n        When to use: 公認会計士 / 税理士 / 監査役 / 内部統制 office\n        receives an evidence-packet citation (ef_…) and needs ONE call\n        that does both (a) Ed25519 tamper verification (proves bytes\n        haven't shifted since signing) AND (b) the rule-based 'why this\n        fact was extracted' explanation paragraph — the two\n        questions an auditor asks back-to-back. ¥3 vs ~3-turn 外部 LLM\n        \"verify signature + summarise extraction logic\" chain (¥180).\n        Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest: llm_used=false in the why envelope is a\n        hard structural promise — the explanation is generated from\n        the rule_based extraction trace, not a language model.\n        For personas: 公認会計士 査察 / 監査調書 evidence retention\n        proof, 税理士 office responding to 税務調査 with signed evidence\n        trail, 内部統制 J-SOX walkthrough handing the regulator a\n        verifiable extraction chain, FDE building an evidence-grade\n        agent UI surfacing tamper status + rationale side-by-side.\n        Example: fact_id=\"ef_2026_05_29_xxx\" → returns\n        {verify:{status:\"valid\", signed_at:\"…ISO…\", key_id:\"…\",\n        payload_sha256:\"…\"}, why:{explanation:\"…rule-based 1-paragraph\n        …\", rule_based:true, llm_used:false}, _billing_unit:1}.\n        Not for: fact_id outside the regex (rejected); fact_ids the\n        signing key wasn't configured for at sign-time (status:\n        key_unconfigured cleanly surfaced); cross-tenant verify (each\n        fact carries its own tenant scope); legal authority claim — a\n        valid signature proves byte-integrity of the extracted_fact row,\n        NOT 法的有効性 of the underlying decision (legal authority\n        belongs to 弁護士 §72 / 税理士 §52 / 公認会計士 §47条の2);\n        regulator-grade certificate emission (Ed25519 verify is one\n        evidence layer, not a full audit opinion)."
    },
    {
      "name": "foreign_fdi_list_am",
      "description": "いつ使う: 海外法人 (FDI) 日本進出 entry condition を 80 か国 peer group から filter — region / G7 / OECD / ASEAN / EU / DTA flag の任意組み合わせ. 入力: region (optional enum), is_g7/is_oecd/is_asean/is_eu/has_dta (optional 0|1), limit (1-200). 出力: items (FDI 国情報 list w/ visa_keiei_kanri / min_capital_yen / restricted_sectors / promotion_program / mofa+jetro source_url), total, filters, _billing_unit=1, _disclaimer (§72/§1/出入国管理). エラー: invalid_input (region/limit), subsystem_unavailable. REST companion at GET /v1/foreign_fdi/v2/countries.\n\n        When to use: agent needs to filter 80-country FDI peer group by\n        region / G7 / OECD / ASEAN / EU / DTA flag combinations and\n        return entry conditions (visa_keiei_kanri / min_capital_yen /\n        restricted_sectors / promotion_program / mofa+jetro source_url)\n        in one deterministic SQL call. ¥3 vs ~5-turn 外部 LLM FDI\n        peer group filter chain (¥300). Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published.\n        For personas: 行政書士 (顧客 FDI 日本進出 substrate gathering),\n        税理士 (海外 法人 DTA 査定 reference), AX_engineer wiring an\n        FDI entry-condition picker, FDE 顧客 cross-border substrate\n        for 日本進出 planning.\n        Example: region=\"asia_pacific\", is_asean=1, has_dta=1,\n        limit=20 → returns {items: [{country_code: \"TH\",\n        country_name_ja: \"タイ\", visa_keiei_kanri: {…}, min_capital\n        _yen: 5000000, restricted_sectors: [...], promotion_program:\n        [...], mofa_source_url: \"https://www.mofa.go.jp/...\",\n        jetro_source_url: \"https://www.jetro.go.jp/...\"}, …],\n        total: N, filters: {region: \"asia_pacific\", is_asean: 1,\n        has_dta: 1}, _billing_unit: 1, _disclaimer: \"…\"} envelope.\n        Not for: 行政書類作成・在留資格申請代理 emission (行政書士法 §1\n        + 出入国管理法 substrate only); 法解釈 emission (弁護士法 §72\n        fence); region outside enum (rejected as invalid_input);\n        limit > 200 (rejected); 与信判断 / 信用情報 surface; one\n        country lookup (use ``foreign_fdi_country_am`` instead)."
    },
    {
      "name": "foreign_fdi_country_am",
      "description": "いつ使う: 1 か国の FDI 進出 entry condition 詳細 — visa keiei-kanri / 最低資本金 / 業種制限 / DTA+BIT presence / MOFA+JETRO 一次資料 source_url. 入力: country_iso (ISO 3166-1 alpha-2, 2-letter uppercase). 出力: country_name_ja+en, region, OECD/G7/G20/ASEAN/EU 旗, visa_keiei_kanri, min_capital_yen, restricted_sectors, promotion_program, mofa_source_url, jetro_source_url, license, _billing_unit=1, _disclaimer (§72/§1/出入国管理). エラー: invalid_input (ISO regex), not_found (peer group 外), subsystem_unavailable. REST companion at GET /v1/foreign_fdi/v2/country/{country_iso}.\n\n        When to use: agent / 行政書士 / 弁護士 office triaging a single\n        country's FDI 進出 entry conditions — visa keiei-kanri /\n        最低資本金 / 業種制限 / DTA+BIT presence — with MOFA+JETRO\n        primary-source URLs preserved for downstream citation. ¥3 vs\n        ~5-turn 外部 LLM \"look up FDI rules + restricted sectors +\n        treaty stack for X\" chain (¥300). Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest:\n        peer group-bounded, returns not_found cleanly when an ISO code is\n        outside coverage.\n        For personas: 行政書士 office filing 在留資格認定証明書 /\n        外資100% 株式会社設立, 弁護士 office triaging cross-border M&A\n        FDI restrictions, FDE building a multi-country entry-condition\n        intake form, agent triaging \"can client X open a JV in country\n        Y\" question with regulator-grade source URLs.\n        Example: country_iso=\"US\" → returns {country_name_ja:\n        \"アメリカ合衆国\", region:\"north_america\", oecd:true, g7:true,\n        visa_keiei_kanri:\"required\", min_capital_yen:5000000,\n        restricted_sectors:[\"defense\",\"nuclear\"],\n        mofa_source_url:\"https://www.mofa.go.jp/…\",\n        jetro_source_url:\"https://www.jetro.go.jp/…\",\n        _billing_unit:1, _disclaimer:\"…\"} envelope.\n        Not for: non-ISO codes (invalid_input rejected); 在留資格申請代\n        理 / 外為法 24-26 条届出書面作成 (行政書士 §1 fence — agent\n        scaffolds, final 書面 belongs to 行政書士); 国際租税 advisory\n        on the surfaced DTA stack (final treaty interpretation belongs\n        to 税理士 / 弁護士); investor-decision recommendation (substrate\n        only, never 助言)."
    },
    {
      "name": "check_funding_stack_am",
      "description": "[FUNDING-STACK-AM] Returns a deterministic 制度併用可否 verdict (compatible / incompatible / requires_review / unknown) per pair + aggregate, by joining source-derived dataset with source-derived dataset. NO LLM. Each response carries `_disclaimer`. Verify primary source.\n\n        WHAT: For each C(N, 2) pair (max C(5, 2) = 10) we look up\n        `source-derived dataset` (43,966 rows; 4,300 sourced + 39,000+ heuristic)\n        and ``source-derived dataset`` (181 rows; 125 exclude + 17 prerequisite +\n        15 absolute + 24 other) and emit a verdict + ``rule_chain``.\n        ``all_pairs_status`` rolls up to the strictest verdict\n        (incompatible > requires_review > unknown > compatible).\n\n        WHEN:\n          - \"IT導入補助金 と 事業再構築補助金 と ものづくり補助金 を併用できる?\"\n          - 「補助金ポートフォリオを 3 件組むと、どこかで一括併用禁止に\n            ぶつからないか?」\n          - 「前提認定 chain で人手確認が必要な組合せは?」\n\n        WHEN NOT:\n          - 個別 program の探索 → search_programs\n          - 1 制度の前提認定詳細 → prerequisite_chain\n          - 同一経費 / 重複受給以外の rule (補助率上限など) → rule_engine_check\n\n        RETURNS (envelope):\n          {\n            program_ids: list[str],\n            all_pairs_status: \"compatible\" | \"incompatible\" | \"requires_review\" | \"unknown\",\n            pairs: [\n              {\n                program_a, program_b,\n                verdict: ...,\n                confidence: 0.0..1.0,\n                rule_chain: [\n                  {source: \"source-derived dataset\" | \"source-derived dataset\" | ...,\n                   rule_text, weight, ...},\n                  ...\n                ],\n                _disclaimer: str\n              },\n              ...\n            ],\n            blockers: list[ {program_a, program_b, rule_chain} ],\n            warnings: list[ {program_a, program_b, rule_chain} ],\n            _disclaimer: str,    # 一次資料 / 専門家 advisory (mandatory)\n            total, limit, offset, results  # search-envelope mirror\n          }\n\n        DATA QUALITY HONESTY: source-derived dataset の 22,290 sourced 行のみ\n        ``confidence=1.0`` で確定する。残り 41,943 行は heuristic で\n        ``confidence`` は 0.3 以下に減点される。`_disclaimer` フィールドは\n        必須 — 非 LLM rule engine は curate コーパスに 100% 依拠するため、\n        収録漏れや公募回ごとの細則差を取りこぼし得る。"
    },
    {
      "name": "match_programs_by_funding_stage_am",
      "description": "[FUNDING-STAGE-AM] 資金調達ステージ別 (シード/アーリー/グロース/IPO/事業承継) program マッチャー。NO LLM, ¥3/billable unit metered. `_disclaimer` 必須。\n\n        WHAT: 5 stage (seed / early / growth / ipo / succession) の closed\n        enum + keyword fence + age/capital/revenue indicative band で\n        ``programs`` を篩い、`amount_max_man_yen × likelihood` 順に\n        sort。stage 判定は heuristic — 日本の制度は『stage X 専用』タグを\n        持たないため、keyword fence 公開定義に依拠。\n\n        WHEN:\n          - 「私 シード期 で 該当する補助金/融資/税制 list」\n          - 「グロース期 (5-10 年目) の中堅企業向け制度を年商レンジで絞りたい」\n          - 「事業承継 + M&A の補助金/税制を都道府県 X でフィルタ」\n\n        WHEN NOT:\n          - JSIC 業種 × 採択事例マッチ → case_cohort_match_am\n          - 個別 program の探索 → search_programs / list_open_programs\n          - 制度併用可否 → check_funding_stack_am\n          - 法人別 360 view → get_houjin_360_am\n\n        RETURNS (envelope):\n          {\n            input: {stage, annual_revenue_yen, employee_count,\n                    incorporation_year, age_years, prefecture, limit},\n            stage_definition: {id, ja_label, description,\n                               age_min_years, age_max_years,\n                               capital_max_yen, revenue_band_yen,\n                               keywords_any, keywords_avoid},\n            matched_programs: [\n              {unified_id, primary_name, tier, program_kind,\n               amount_max_man_yen, source_url, prefecture,\n               likelihood, score, ...},\n              ...\n            ],\n            axes_applied: {stage_keyword_filter, prefecture, age_filter,\n                           revenue_filter, employee_filter},\n            summary: {total_matched, amount_max_man_yen_top},\n            total, limit, offset, results,\n            _disclaimer, _next_calls\n          }\n\n        DATA QUALITY HONESTY: keyword fence は primary_name OR ladder のみ。\n        本文/募集要項の text mining は行わない (FTS5 trigram の単漢字\n        false-positive 回避のため)。stage の age/capital/revenue band は\n        ranking の重み付けには使うが、ハード除外には使わない (data sparsity\n        を踏まえた honest design)。\n\n        BILLING: 1 tool call = 1 ¥3 課金単位。"
    },
    {
      "name": "graph_traverse",
      "description": "[KG] O7 — Returns paths from a 1-3 hop heterogeneous BFS over source-derived dataset (24,004 edges / 15 relation types). deterministic retrieval traversal (no LLM). Output is graph-derived; edges with confidence < 0.5 (graph_rescue origin) are noisy — verify primary source (source_url) for relationship claims.\n\n        WHAT: BFS over `source-derived dataset` (24,004 edges / 15 relation\n        types) starting at ``start_entity_id``. Returns the discovered\n        paths (each = list of nodes + list of edges + total_distance =\n        hop count). Cycle suppression via path-string instr() check;\n        per-node fan-out capped at 30; global LIMIT enforced via\n        ``max_results``.\n\n        WHEN:\n          - 「制度 → 根拠法 → 関連判例 → 過去採択」を 1 query で\n          - 「法令を変えると影響受ける制度群を辿る」(reverse 必要なら別 tool)\n          - 「製造業 + 関東で使える制度 + 認定支援機関」(複合横断)\n          - 既存 related_programs では届かない depth=3 / 異種 entity 探索\n\n        WHEN NOT:\n          - 同種 program 間 hop (prerequisite / compatible / successor) →\n            related_programs (depth ≤ 2、6 軸固定で fan-out 安全)\n          - 法令本体 → get_law_article_am\n          - 制度詳細 → search_programs / get_program\n\n        RETURNS (envelope on success):\n          {\n            paths: [\n              {\n                nodes: [entity_id, entity_id, ...],   # depth ordered\n                edges: [\n                  {\n                    src: str, tgt: str, relation_type: str,\n                    confidence: float, depth: int, origin: str\n                  }, ...\n                ],\n                total_distance: int                   # = max(depth)\n              }, ...\n            ],\n            traversed_count: int,                     # total edges examined\n            start_entity_id: str,\n            max_depth: int,\n            edge_types_used: [str, ...],\n            capped: bool,                             # max_results reached\n            elapsed_ms: float,\n            _disclaimer: str\n          }\n\n        On invalid args / public index error returns the canonical error envelope\n        (``code`` ∈ {``invalid_enum``, ``db_unavailable``,\n        ``no_matching_records``}) with ``retry_with`` pointers."
    },
    {
      "name": "extract_kg_from_text",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1] Moat M1 KG extraction. Extract canonical\n    entities + relations + facts from input text using the jpcite KG pipeline.\n    Returns a structural PENDING envelope until the upstream M1 lane lands.\n\n    When to use: agent has raw 制度 / 法令 / 行政処分 text (up\n    to 8192 chars) and wants canonical entity + relation +\n    fact extraction with KG schema canonicalisation. Use as\n    the structural ingestion entry point before walking the\n    relation graph or chaining into get_entity_relations.\n    Currently returns a structural PENDING envelope until the\n    upstream M1 model lands — schema_version is stable so\n    integration can be wired now.\n    For personas: AX engineer wiring a KG ingest pipeline;\n    FDE building a tenant-side document loader; 行政書士 /\n    弁護士 peer group 補助 staff prepping a KG sandbox; researchers\n    sketching jpcite as a substrate for legal-domain KGs.\n    Example: text=\"〇〇助成金は…\", lang=\"ja\" → returns\n    {\"_schema_version\": \"moat.m1.v1\", \"_pending\": true,\n    \"_lane\": \"M1\", \"_upstream\": \"jpintel_mcp.moat.m1_kg_\n    extraction\", \"_input_meta\": {\"text_len\": 36, \"lang\":\n    \"ja\"}, \"_billing_unit\": 1, \"no_llm\": true} — wire the\n    consumer against this envelope before live model lands.\n    Not for: free-form 法令解釈 (§72 fence — KG is structural\n    only, 弁護士 reviews semantics); 税務判断 (§52 fence);\n    監査意見 substitute (§47条の2 fence); 行政書士法 §1\n    書面作成 final draft (this is an extraction substrate).\n    Returns PENDING until M1 promote → don't claim live\n    extraction in customer-facing copy until envelope flips."
    },
    {
      "name": "get_entity_relations",
      "description": "[AUDIT] Moat M1 KG edge lookup. Returns outgoing + incoming relations for\n    the given canonical entity_id. Pure index walk (NO LLM). Returns a structural\n    PENDING envelope until the upstream M1 lane lands.\n\n    When to use: agent has resolved a canonical jpcite entity_id\n    (法人 / 法令 / 制度 / 判例 / 通達) and needs to traverse the\n    knowledge graph one hop in each direction — typical second-call\n    after houjin_resolve / search_laws / search_programs to enrich a\n    citation pack or build a dependency rollup.\n    For personas: 中小企業診断士 building a 経営診断 citation chain;\n    AX engineer assembling an entity-360 view; FDE wiring a graph-\n    walk visualisation; researcher mapping 制度 lineage edges. Pure\n    index walk, no LLM, no advisory emission.\n    Example: entity_id=\"houjin:8010001213708\", limit=20 → returns\n    {\"entity_id\":..., \"edges_out\":[{\"relation\":\"adopted\",\n    \"target\":\"program:...\"}, ...], \"edges_in\":[...],\n    \"schema_version\":\"moat.m1.v1\", \"no_llm\": true}. Until the M1 lane\n    promotes, a structural PENDING envelope is returned with stable\n    shape so downstream wiring can be tested.\n    Not for: arbitrary natural-language graph queries (use\n    extract_kg_from_text first to canonicalize); legal opinion or\n    reasoning over the edges (弁護士法 §72 fence — the graph is\n    descriptive); multi-hop traversal (call iteratively, single-hop\n    per call); 信用 / 取引 関係 推定 (these are public registry\n    edges, not credit relations — 信用情報法 fence)."
    },
    {
      "name": "search_case_facts",
      "description": "[AUDIT, SENSITIVE — §52/§72] Moat M2 case-fact search over the unified\n    案件 corpus (裁決 + 判例 + 行政処分). Returns a structural PENDING envelope\n    until the upstream M2 lane lands.\n\n    When to use: agent wants free-text 案件 search across the unified\n    corpus (国税不服審判所 裁決 + 裁判所 判例 + 行政処分) to find\n    factually similar cases for a given query (e.g., \"輸出免税の証憑\n    不備事案\"). Hybrid retrieval (FTS + extracted facts) — better\n    than naive full-text for fact-pattern matching.\n    For personas: 税理士 building 裁決 reference dossier; 弁護士\n    research pipeline; 行政書士 looking up 行政処分 precedent;\n    FDE composing legal-history briefing packets; AX engineer\n    indexing the unified case corpus.\n    Example: query=\"輸出免税の証憑不備による否認事案\", limit=20 →\n    returns PENDING envelope today; will return {cases: [{case_id,\n    case_type, court_or_agency, fact_summary, citation}, ...]} once\n    M2 lane lands.\n    Not for: legal opinion drafting (弁護士法 §72 fence — fact-pattern\n    retrieval, not advice); 与信判断 (信用情報法); generative\n    case summary (use search_chunks for chunk-level retrieval, then\n    have downstream LLM compose summary if needed); ongoing case\n    monitoring (this is corpus snapshot, not live feed)."
    },
    {
      "name": "get_case_extraction",
      "description": "[AUDIT, SENSITIVE — §52/§72] Moat M2 fetch the canonical extraction\n    (parties / issues / holdings / citations) for a single case_id. NO LLM.\n    Returns a structural PENDING envelope until the upstream M2 lane lands.\n\n    When to use: agent has identified a case_id (via search_case_facts\n    or recommend_similar_case) and wants the precomputed structural\n    extraction — parties block, issues block, holdings block, internal\n    citation list — without re-fetching the full PDF. Cheap follow-up\n    after retrieval to populate a citation pack or audit workpaper.\n    For personas: 司法書士 / 弁護士 doing case-law citation work\n    (retrieval substrate, NOT 法解釈 substitute); 中小企業診断士\n    referencing precedents in a 経営診断 report; AX engineer building\n    a case-law brief generator with explicit 弁護士 sign-off step;\n    researcher producing reproducible 判例 snapshots.\n    Example: case_id=\"case:saiban:H30-行ウ-0123\" → returns\n    {\"case_id\":..., \"parties\": [...], \"issues\": [...], \"holdings\":\n    [...], \"internal_citations\": [{\"target_law\":..., \"article\":...}],\n    \"schema_version\":\"moat.m2.v1\", \"no_llm\": true}. PENDING envelope\n    until M2 lane promotes.\n    Not for: legal opinion / 助言 emission (弁護士法 §72 fence —\n    extraction is descriptive); 税理士 業務代理 (税理士法 §52);\n    novel case generation / hypothetical reasoning (this is a fetch\n    of one extracted case, not a synthesis); 与信判断 (信用情報法\n    fence on parties)."
    },
    {
      "name": "search_figures_by_topic",
      "description": "[AUDIT] Moat M3 figure search over the jpcite figure corpus (captions + OCR\n    + CLIP-Japanese embeddings). Returns a structural PENDING envelope until\n    the upstream M3 lane lands.\n\n    When to use: agent needs to retrieve relevant figures / diagrams /\n    tables from the jpcite figure corpus (制度 booklet 図 / 申請手引\n    フロー図 / 統計 graph) for inclusion in 申請 packet, 経営診断 doc,\n    or briefing pack. Hybrid retrieval: caption FTS + OCR text +\n    CLIP-Japanese embedding similarity.\n    For personas: 中小企業診断士 building 経営診断書 with relevant\n    制度 図 inserts; 行政書士 composing 申請 packet with 手引 フロー図;\n    FDE designing illustrated briefing packet; AX engineer indexing\n    visual references.\n    Example: query=\"補助金 申請 フロー\", limit=10 → returns PENDING\n    envelope today; will return {figures: [{figure_id, caption,\n    ocr_text, source_doc, page, similarity_score}, ...]} once M3 lane\n    lands.\n    Not for: figure generation / drawing (this is retrieval only —\n    no image synthesis); legal opinion (弁護士法 §72 fence); free-text\n    Q&A (use search_chunks); private / unpublished figures (corpus\n    is 公開資料 only)."
    },
    {
      "name": "get_figure_caption",
      "description": "[AUDIT] Moat M3 fetch caption + provenance for a single figure_id.\n    Returns a structural PENDING envelope until the upstream M3 lane lands.\n\n    When to use: when the agent has a ``figure_id`` (e.g. from a prior\n    ``search_figures_by_topic`` call or a packet citation) and needs the\n    caption text + source URL + page anchor for citation / display.\n    Cheaper than re-running a vector search. NO LLM. PENDING envelope\n    is returned until the upstream M3 figure-search lane is fully\n    landed — the agent should treat PENDING as \"figure exists, payload\n    not yet materialized\" rather than 404.\n    For personas: 税理士 / 会計士 peer group agents building 監査調書\n    referencing 公的統計の図表; 弁理士 peer group agents citing 商標公報\n    の図形商標; AX_engineer building a 図表-rich evidence renderer.\n    Example: figure_id=\"FIG-am-202504-1234\" →\n    {\"figure_id\": \"...\", \"caption_ja\": \"...\", \"source_url\": \"...\",\n    \"page\": 42, \"image_uri\": \"s3://...\"} when materialized; structural\n    PENDING envelope otherwise (NOT an error — retry later).\n    Not for: free-text figure search (use ``search_figures_by_topic``);\n    OCR'ing a brand-new image (this is read-only over an indexed\n    corpus); LLM-style image captioning; 助言-style 図表 interpretation\n    (士業法 fence — agent composes the user-facing prose)."
    },
    {
      "name": "semantic_search_law_articles",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1] Moat M4 law-embedding semantic\n    search. Hybrid FTS + e-Gov 法令 embedding over the 9,484-row law catalog +\n    6,493 full-text law corpus. Returns a structural PENDING envelope until\n    the upstream M4 lane lands.\n\n    When to use: agent has a natural-language law question\n    (e.g. \"中小企業 設備投資 償却 加速\") and wants top-k 法令\n    hits ranked over hybrid FTS + e-Gov 法令 embedding (9,484\n    catalog + 6,493 full-text corpus). Use instead of keyword\n    FTS when the customer query is semantic / paraphrased\n    rather than exact title or article number. Result envelope\n    carries citation ids + score; downstream tools (e.g.\n    law_related_programs_cross) chain into the ranked hits.\n    For personas: 弁護士 / 行政書士 doing 法令調査 surveys; AX\n    engineer wiring a law-semantic search box; FDE designing a\n    peer group 法令 watcher; 中央省庁 staff sweeping 改正 impact.\n    Example: query=\"中小企業 設備投資 償却 加速\", limit=5 →\n    returns {\"_schema_version\": \"moat.m4.v1\", \"_pending\": true,\n    \"_lane\": \"M4\", \"_upstream\": \"jpintel_mcp.moat.m4_law_\n    embedding\", \"_input_meta\": {\"query\": \"...\", \"limit\": 5},\n    \"_billing_unit\": 1, \"no_llm\": true}.\n    Not for: 法令解釈 final 助言 (§72 fence — 弁護士 reviews\n    semantic interpretation); 税務助言 (§52 fence); 監査意見\n    (§47条の2 fence); 行政書士 §1 書面作成 final draft.\n    Currently returns PENDING envelope — wire integration now\n    but don't surface as live ranking in customer copy until\n    M4 lane promotes."
    },
    {
      "name": "jpcite_bert_v1_encode",
      "description": "[AUDIT] Moat M5 jpcite-BERT-v1 encode. Returns the SimCSE embedding vector\n    for the provided text. Local CPU encoder, NO LLM API. Returns a structural\n    PENDING envelope until the upstream M5 lane lands.\n\n    When to use: agent needs to embed a single short Japanese legal /\n    制度 / 判例 / 採択 fragment into a SimCSE vector that will join the\n    jpcite-BERT-v1 retrieval space (so it can be compared against the\n    precomputed corpus). Pure in-process call; no external API.\n    For personas: FDE building a custom retrieval over agent's own\n    private corpus that needs to align with jpcite vector space; AX\n    engineer prototyping semantic search before wiring to a heavier\n    Athena / OpenSearch path; researcher producing reproducible\n    nearest-neighbour examples for evaluation.\n    Example: text=\"本則税率10%、軽減税率8%の経過措置\" → returns\n    pending_envelope {\"tool_name\": \"jpcite_bert_v1_encode\", \"lane_id\":\n    \"M5\", \"status\": \"pending\", ...} until the upstream model lane is\n    promoted; once GA, returns {\"vector\": [768 floats], \"model\":\n    \"jpcite-bert-v1-simcse\", \"no_llm\": true}.\n    Not for: long-document encoding (chunk first — 2048 char cap);\n    LLM-style reasoning / paraphrase (this is a sentence-level\n    embedding, not a generation model); 法解釈 / 与信判断 (the vector\n    is descriptive only — 弁護士法 §72 / 信用情報法 fences); cross-\n    language embedding (Japanese-tuned, do not feed English)."
    },
    {
      "name": "rerank_results",
      "description": "[AUDIT] Moat M6 cross-encoder reranker. Pairs (query, candidate) are scored\n    by a local cross-encoder; NO LLM call. Returns a structural PENDING envelope\n    until the upstream M6 lane lands.\n\n    When to use: agent has already retrieved a candidate list\n    (FTS hits / vector neighbours / mixed source) and needs a\n    higher-fidelity reranker to surface the most relevant passages.\n    Cross-encoder is slower than bi-encoder but more accurate on\n    query-passage relevance — ideal as a 2nd-stage reranker after\n    cheap retrieval.\n    For personas: AX engineer building a 2-stage retrieval pipeline\n    (FTS + cross-encoder rerank); FDE designing precision-first\n    search experience; 税理士 / 弁護士 research pipeline upgrading\n    naive FTS hits with semantic rerank; peer group lead tuning\n    retrieval quality for an agent surface.\n    Example: query=\"輸出免税 証憑 不備\", candidates=[\"...passage 1...\",\n    \"...passage 2...\", \"...passage 3...\"] → returns PENDING envelope\n    today; will return {scored: [{idx, score}, ...] sorted desc} once\n    M6 lane lands.\n    Not for: free-text Q&A (this is rerank only — no answer\n    generation); 1st-stage retrieval (use search_chunks /\n    opensearch_hybrid_search etc.); LLM-grade reasoning (cross-encoder\n    scores relevance, not factual correctness); large candidate sets\n    (cap at 100 — cross-encoder is O(N) per call)."
    },
    {
      "name": "predict_related_entities",
      "description": "[AUDIT] Moat M7 KG completion. Returns up to limit related entities for\n    the given canonical entity_id using deterministic KG walks (NO LLM).\n    Returns a structural PENDING envelope until the upstream M7 lane lands.\n\n    When to use: agent already has a canonical entity_id and wants\n    KG-completion-suggested neighbours (法人 ↔ 法令 ↔ 制度 ↔ 判例)\n    that are NOT yet directly linked but are highly likely to be\n    related per the trained M7 model (RotatE / ComplEx / ConvE 4-model\n    ensemble). Useful for \"what should I look at next\" exploration.\n    For personas: 中小企業診断士 building a wider 経営診断 substrate;\n    AX engineer expanding an entity-360 view past direct edges; FDE\n    designing a recommender feed; researcher mapping latent 制度\n    relationships for evaluation. Pure deterministic walk + score,\n    no LLM, no advisory.\n    Example: entity_id=\"program:METI-shien-2024-XX\", limit=5 →\n    returns {\"entity_id\":..., \"predictions\":[{\"target\":\"program:...\",\n    \"score\": 0.87, \"relation_type\":\"co_eligible\"}, ...],\n    \"schema_version\":\"moat.m7.v1\", \"no_llm\": true}. PENDING envelope\n    until M7 promote.\n    Not for: causal inference / 因果関係 推定 (these are co-\n    occurrence + path-walk scores, not causality); legal opinion\n    (弁護士法 §72 fence); 与信判断 (信用情報法 fence — scores are\n    not credit signals); novel entity creation (this only suggests\n    from existing canonical set, not new entities)."
    },
    {
      "name": "find_cases_citing_law",
      "description": "[AUDIT, SENSITIVE — §72/§52] Moat M8 citation lookup — return cases citing the\n    given law article. Returns a structural PENDING envelope until the upstream\n    M8 lane lands.\n\n    When to use: agent needs to find \"which 判例 / 裁決 / 行政処分 cases\n    cite this specific law article\" — useful for legal-history dossier\n    building, 判例 precedent gathering, or anchoring a 法令 §X argument\n    in concrete cited cases. Citation lookup only; no legal opinion.\n    For personas: 弁護士-led research pipeline gathering citation\n    precedents; 税理士 prepping 国税不服審判所 裁決 dossier; 行政書士\n    pulling 行政処分 precedent for an application; AX engineer indexing\n    cited-by graph.\n    Example: law_id=\"e-gov:hojin_zei_ho:art_22\", limit=20 → returns\n    PENDING envelope today; will return {citations: [{case_id, court,\n    decision_date, citation_span}, ...]} once M8 lane lands.\n    Not for: legal opinion drafting (弁護士法 §72 fence — citation\n    lookup is reference-grade, not advice); free-text legal Q&A\n    (use search_chunks for unstructured search); 与信判断 (信用情報法\n    fence); law text retrieval (use law family — this is the case-side\n    citation index, not law content)."
    },
    {
      "name": "find_laws_cited_by_case",
      "description": "[AUDIT, SENSITIVE — §72/§52] Moat M8 citation lookup — return laws cited by the\n    given case. Returns a structural PENDING envelope until the upstream M8 lane\n    lands.\n\n    When to use: when the agent has a 判例 ``case_id`` (e.g. from\n    ``recommend_similar_case`` or a user citation) and needs the\n    structured list of 法令条文 the court actually cited in that\n    ruling. Powers \"この判決はどの条文を根拠にしたか\" mapping.\n    Inverse of ``find_cases_citing_law``. PENDING envelope is returned\n    while the upstream M8 lane is still wiring; treat PENDING as\n    \"lookup possible, payload pending\" rather than 404. NO LLM.\n    For personas: 弁護士 / 司法書士 peer group agents tracing 判例 →\n    根拠条文 chain for a memo; 弁理士 peer group agents tracing 商標\n    判例 citations; AX_engineer building a 判例 ↔ 法令 cross-link\n    graph.\n    Example: case_id=\"case:R6_jpcite_12345\", limit=20 →\n    {\"laws\": [{\"law_id\": \"...\", \"article\": \"...\", \"para\": \"...\",\n    \"cited_in_reasoning\": true, \"cited_in_holding\": false, ...}],\n    \"case_id\": \"...\", \"total_count\": 8}. When materialized; structural\n    PENDING envelope otherwise.\n    Not for: free-text citation extraction from an uploaded PDF\n    (this is read-only over an indexed case_id); inverse lookup\n    \"どの判例がこの法令を引用?\" (use ``find_cases_citing_law``);\n    LLM-style 判決理由 summarization (士業法 fence — agent\n    composes); citation depth analysis (use ``resolve_citation_chain``\n    to walk transitive citations)."
    },
    {
      "name": "search_chunks",
      "description": "[AUDIT] Moat M9 document chunk search over the unified jpcite chunk store\n    (programs / laws / cases / 通達 / 採択事例). NO LLM call. Returns a structural\n    PENDING envelope until the upstream M9 lane lands.\n\n    When to use: agent needs to retrieve relevant passages (~200-800 tokens\n    each) from the unified jpcite chunk store across all 5 source families\n    (programs / laws / cases / 通達 / 採択事例) by a single semantic query,\n    typically as a prompt-context substrate for the client agent's own LLM\n    composition step. Returns ingredient — client agent finishes the prose.\n    For personas: AX_engineer building RAG pipelines; 税理士 / 会計士 peer group\n    agents grounding draft text in citable source passages.\n    Example: query=\"役員報酬 不相当に高額\", limit=10 → top 10 chunks across\n    法令 / 通達 / 判例 / 採択事例 with source attribution.\n    Not for: structured program metadata (use search_programs); peer group-\n    specific outcomes (use outcome_* tools); placeholder substitution\n    (use resolve_placeholder); CURRENTLY PENDING — envelope-only response\n    until upstream M9 lane lands."
    },
    {
      "name": "multitask_predict",
      "description": "[AUDIT] Moat M11 multi-task inference — runs the requested NLP heads in a\n    single pass over the unified jpcite multi-task model (NER / REL / RANK).\n    NO LLM API call. Returns a structural PENDING envelope until the upstream\n    M11 lane lands.\n\n    When to use: agent wants multiple NLP heads (e.g. NER +\n    REL + RANK) executed in a single forward pass over jpcite\n    multi-task model, instead of fan-out to 3 separate tools.\n    Use for batch-style document understanding where the same\n    text feeds multiple structural tasks. NO LLM, NO chain\n    inference — a structural model pass only.\n    For personas: AX engineer wiring an end-to-end document\n    ingestion pipeline; FDE designing a multi-task scaffold\n    that hydrates entity / relation / rank in one hop;\n    researchers benchmarking jpcite multi-task model heads.\n    Example: text=\"助成金の対象事業者は…\", tasks=[\"ner\",\n    \"rel\",\"rank\"] → returns {\"_schema_version\": \"moat.m11.v1\",\n    \"_pending\": true, \"_lane\": \"M11\", \"_upstream\": \"jpintel_\n    mcp.moat.m11_multitask\", \"_input_meta\": {\"text_len\": 18,\n    \"tasks\": [\"ner\",\"rel\",\"rank\"]}, \"_billing_unit\": 1,\n    \"no_llm\": true}.\n    Not for: 法令解釈 / 税務助言 / 行政書士 書面作成 / 監査\n    意見 — all out-of-scope (§72/§52/§1/§47条の2 fence). The\n    multi-task heads are structural extractors only, not\n    judgement substrate. Currently returns PENDING envelope —\n    do not surface as live model output in customer copy until\n    M11 lane promotes."
    },
    {
      "name": "query_houjin_kg_facts",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1/§3] M1 KG facts lookup.\n\n    SUMMARY:\n        Return the deterministic KG fact rows (entity / relation / value\n        / source_doc / confidence) extracted by the M1 PDF→KG pipeline\n        (~108K facts) scoped to one houjin. NO LLM inference at query\n        time; the pipeline ran offline. Tier B ¥6 / req.\n\n    WHEN_TO_USE:\n        - 「この法人について M1 が抽出した既知事実だけが欲しい」\n        - houjin_360 のセクション組立で \"extracted facts\" 軸を埋める\n        - 採択事例 / 判例横串の前段に houjin の確定 fact を rough 取る\n\n    WHEN_NOT:\n        - 自由文の検索 → ``search_chunks`` / ``chunk_retrieval`` (M9)\n        - 関連エンティティ予測 → ``predict_related_entities`` (M7)\n        - 法令逐条の意味検索 → ``semantic_law_search`` (M4)\n        - 法人 360 portfolio analysis → ``get_houjin_portfolio`` (N2)\n\n    EXAMPLE INPUT:\n        {\"houjin_id\": \"1234567890123\", \"limit\": 50}\n\n    EXAMPLE OUTPUT:\n        {\"tool_name\": \"query_houjin_kg_facts\",\n         \"lane_id\": \"M1\", \"tier\": \"B\", \"price_jpy\": 6,\n         \"results\": [{\"entity\": \"houjin:1234567890123\",\n                      \"relation\": \"代表者\",\n                      \"value\": \"...\",\n                      \"source_doc\": \"...\",\n                      \"confidence\": 0.93}],\n         \"total\": N, \"_disclaimer\": \"<§52/§47条の2/§72/§1/§3>\"}\n\n    COST: ¥6 (Tier B) per call. NO LLM. Single structured public index lookup."
    },
    {
      "name": "search_outcome_corpus",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1/§3] M2 採択事例 corpus search.\n\n    SUMMARY:\n        Search the 218K-row 採択事例 (outcome) corpus extracted by the\n        M2 pipeline. Returns ranked hits with houjin / program /\n        application_year / approved_amount / source_doc fields. Tier B\n        ¥6 / req.\n\n    WHEN_TO_USE:\n        - 「同業他社で過去 採択された事例はあるか」\n        - 補助金 application 前のベンチマーク (採択額 / 採択年度)\n        - 過去の採択実績 peer group packet の補強 (M2 + Q1 peer group 横串)\n\n    WHEN_NOT:\n        - 採択 *確率* の予測 → peer group packet (search by jsic + size)\n        - 法人 360 → ``get_houjin_portfolio`` (N2)\n        - 制度本文 → ``search_programs`` (autonomath_tools)\n\n    EXAMPLE INPUT:\n        {\"query\": \"IT導入補助金 ものづくり 製造業\", \"limit\": 10}\n\n    EXAMPLE OUTPUT:\n        {\"tool_name\": \"search_outcome_corpus\",\n         \"lane_id\": \"M2\", \"tier\": \"B\", \"price_jpy\": 6,\n         \"results\": [{\"outcome_id\": \"...\",\n                      \"houjin_id\": \"...\",\n                      \"program_id\": \"...\",\n                      \"approved_amount\": 12000000,\n                      \"application_year\": 2024,\n                      \"source_doc\": \"...\"}],\n         \"total\": N, \"_disclaimer\": \"<§52/§47条の2/§72/§1/§3>\"}\n\n    COST: ¥6 (Tier B) per call. NO LLM. FTS over 218K rows.\n\n    When to use: free-text search over 218K-row 採択事例\n    (outcome) corpus extracted by M2 pipeline — ¥6 vs ~4-turn\n    外部 LLM \"scan 採択事例 + filter by program + cite top-N +\n    structure houjin / amount / year\" chain (¥240). Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest: FTS over 218K rows; absent program-name\n    string match = \"not found in M2 extraction\", NOT \"no past\n    adoption ever\". Returns ranked hits with houjin / program /\n    year / amount / source_doc.\n    For personas: 中小企業診断士 office benchmarking 採択額\n    for 顧問先 補助金 application, 行政書士 office building\n    similar-case 申請書 reference, FDE building \"show me past\n    adoption examples\" widget, agent triaging \"has anyone like\n    me won this 補助金 before\" question.\n    Example: search_outcome_corpus(query=\"IT導入補助金 ものづくり\n    製造業\", limit=10) -> {tool_name: \"search_outcome_corpus\",\n    lane_id: \"M2\", tier: \"B\", price_jpy: 6, results: [{outcome_id:\n    \"out:abc\", houjin_id: \"5012345678901\", program_id: \"…\",\n    approved_amount: 12000000, application_year: 2024,\n    source_doc: \"…\"}, …], total: 10, _disclaimer:\n    \"<§52/§47条の2/§72/§1/§3>\"}.\n    Not for: 過去の採択実績 prediction (use peer group packet via 採択\n    peer group tool, search by jsic + size); 法人 360 / portfolio\n    (use get_houjin_portfolio N2); 制度本文 detail (use\n    search_programs); LLM-style outcome narrative (this returns\n    rows only, not a digest); 採択保証 / 採択率予測 (景表法\n    fence — historical observation only, NOT 未来予測); 与信\n    判断 (信用情報法 fence — public adoption record only, NOT\n    信用評価); 個人事業主 case PII (raw houjin_id may need\n    redact at caller); 助言 / 申請書面 (士業法 fence — 行政書士法\n    §1 — substrate only); freshness guarantee (extraction\n    snapshot lag is possible; consult source_doc for currency)."
    },
    {
      "name": "search_figures",
      "description": "[AUDIT] M3 figure CLIP top-k search.\n\n    SUMMARY:\n        CLIP-Japanese encode + ANN walk over the M3 figure embedding\n        index (135 sample + 1+ pending batch). Returns ranked figure_id\n        / caption / source_doc / similarity. Tier C ¥12 / req.\n\n    WHEN_TO_USE:\n        - 「補助金チラシ / 申請様式 / 制度図表」を topic で探したい\n        - houjin_360 packet に図表サムネを添える\n        - 採択事例 PDF の図表横串 (M3 × M2)\n\n    WHEN_NOT:\n        - 文書 chunk 検索 → ``chunk_retrieval`` (M9)\n        - 法令本文 → ``semantic_law_search`` (M4)\n        - 図表 caption 単独 lookup → ``get_figure_caption`` (M3 v1)\n\n    EXAMPLE INPUT:\n        {\"query\": \"IT導入補助金 申請フロー\", \"k\": 5}\n\n    EXAMPLE OUTPUT:\n        {\"tool_name\": \"search_figures\",\n         \"lane_id\": \"M3\", \"tier\": \"C\", \"price_jpy\": 12,\n         \"results\": [{\"figure_id\": \"fig:abc123\",\n                      \"caption\": \"申請フロー図\",\n                      \"source_doc\": \"...\",\n                      \"similarity\": 0.81}],\n         \"total\": k, \"_disclaimer\": \"<§52/§47条の2/§72/§1/§3>\"}\n\n    COST: ¥12 (Tier C) per call. NO LLM. CLIP-Japanese + IVF+PQ ANN.\n\n    When to use: 中小企業診断士 / 行政書士 / FDE / agent looking\n    for 補助金チラシ / 申請様式 / 制度図表 by topic (CLIP-Japanese\n    encode + ANN over 135-sample M3 figure index + 1+ pending\n    batch) — to thumbnail-enrich houjin_360 packets or surface\n    diagrams in adoption-case PDFs — ¥12 vs ~6-turn 外部 LLM\n    \"search PDF library → identify diagrams → OCR-fuzzy-match\n    topic → rank candidates\" chain (¥360). Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest:\n    sample-scale index (135 figures + pending batch growth);\n    similarity is CLIP-Japanese ANN, not exact caption match; Tier\n    C ¥12/req. NO LLM (pure CLIP + FAISS).\n    For personas: 中小企業診断士 office building visual 制度\n    summary slide, 行政書士 office thumbnailing 申請様式 in\n    application packets, FDE building \"find me the IT導入補助金\n    申請フロー diagram\" widget, agent triaging \"show me 採択事例 X\n    の概念図\" question.\n    Example: search_figures(query=\"IT導入補助金 申請フロー\", k=5)\n    → {tool_name:\"search_figures\", lane_id:\"M3\", tier:\"C\",\n    price_jpy:12, no_llm:true, results:[{figure_id:\"fig:abc123\",\n    caption:\"申請フロー図\", source_doc:\"...\", similarity:0.81},\n    ...], total:5, _disclaimer:\"<§52/§47条の2/§72/§1/§3>\"}.\n    Not for: 文書 chunk 検索 (chunk_retrieval / M9); 法令本文\n    (semantic_law_search / M4); 図表 caption 単独 lookup\n    (get_figure_caption / M3 v1); CLIP similarity threshold final\n    判断 (caller-side threshold required); 商用 illustration\n    licensing (図表 license is original source's — agent does NOT\n    grant redistribution); 採択判断 / 申請書面作成 (士業 fence —\n    substrate only, not 助言 / 書面)."
    },
    {
      "name": "semantic_law_search",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1/§3] M4 法令逐条 semantic search.\n\n    SUMMARY:\n        FAISS IVF+PQ ANN over the 353K-embedding 法令逐条 corpus\n        (e-Gov + 国税庁通達 + 厚労省告示 横串). Returns ranked law_id /\n        article_no / paragraph / similarity. Tier B ¥6 / req.\n\n    WHEN_TO_USE:\n        - 「この施策の根拠法令は何条か」\n        - 自由文クエリで条文を semantic 探したい (FTS では拾えない)\n        - 制度 → 法令 lineage の中間 hop (program → law_article)\n\n    WHEN_NOT:\n        - 条番号で直接引きたい → ``get_law_article``\n        - 法令タイトル検索 → ``search_laws``\n        - 判例 → ``find_cases_citing_law`` (M8)\n\n    EXAMPLE INPUT:\n        {\"query\": \"中小企業 経営革新 承認 申請\", \"k\": 5}\n\n    EXAMPLE OUTPUT:\n        {\"tool_name\": \"semantic_law_search\",\n         \"lane_id\": \"M4\", \"tier\": \"B\", \"price_jpy\": 6,\n         \"results\": [{\"law_id\": \"law:中小企業等経営強化法\",\n                      \"article_no\": \"第9条\",\n                      \"paragraph\": \"...\",\n                      \"similarity\": 0.82}],\n         \"total\": k, \"_disclaimer\": \"<§52/§47条の2/§72/§1/§3>\"}\n\n    COST: ¥6 (Tier B) per call. NO LLM. FAISS ANN nprobe=8.\n\n    When to use: agent / 弁護士 / 税理士 doing free-text 法令逐条\n    semantic discovery where FTS keyword match fails — \"this scheme\n    must be backed by some law, find it\" — across e-Gov +\n    国税庁通達 + 厚労省告示 横串 (353K embeddings, FAISS IVF+PQ\n    nprobe=8) — ¥6 vs ~6-turn 外部 LLM \"free-text → identify\n    candidate law titles → fetch articles → rank by relevance\"\n    chain (¥360). Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest: ANN ranking (not exact\n    FTS); NO LLM (pure FAISS); low similarity row should be\n    de-prioritized at caller. Tier B ¥6/req.\n    For personas: 弁護士 / 税理士 office doing 制度→法令 lineage\n    middle-hop discovery, 行政書士 office surfacing 根拠条文 for\n    認定 申請, FDE building \"find me the article behind X program\"\n    widget, agent triaging \"what statute covers this 課税 topic?\"\n    when the keyword is unknown.\n    Example: semantic_law_search(query=\"中小企業 経営革新 承認\n    申請\", k=5) → {tool_name:\"semantic_law_search\", lane_id:\"M4\",\n    tier:\"B\", price_jpy:6, no_llm:true,\n    results:[{law_id:\"law:中小企業等経営強化法\",\n    article_no:\"第9条\", paragraph:\"...\", similarity:0.82}, ...],\n    total:5, _disclaimer:\"<§52/§47条の2/§72/§1/§3>\"}.\n    Not for: 条番号で直接引く (get_law_article); 法令タイトル\n    検索 (search_laws); 判例 (find_cases_citing_law / M8); 法解釈\n    (弁護士法 §72 fence — agent surfaces candidate articles, final\n    解釈 belongs to 弁護士); 税務代理 / 税務助言 (税理士法 §52\n    fence — substrate for 税理士, not advice); ANN similarity\n    threshold final判断 (caller should set its own threshold)."
    },
    {
      "name": "find_similar_text",
      "description": "[AUDIT] M5 jpcite-BERT SimCSE cosine similarity search.\n\n    SUMMARY:\n        Encode anchor text with the fine-tuned jpcite-BERT SimCSE\n        encoder, then cosine-similar-walk the M5 sentence index for\n        top-k matches. Returns sentence_id / text / source_doc /\n        cosine. Tier C ¥12 / req.\n\n    WHEN_TO_USE:\n        - 「この文面と類似した制度説明 / 判例 / 通達文面はどれか」\n        - duplicate detection / paraphrase mining for evidence chain\n        - 採択事例 free-text の clustering 前段\n\n    WHEN_NOT:\n        - 法令逐条で探したい → ``semantic_law_search`` (M4)\n        - 文書 chunk 検索 → ``chunk_retrieval`` (M9)\n        - cross-encoder で再 ranking → ``rerank_results`` (M6)\n\n    EXAMPLE INPUT:\n        {\"text\": \"経営革新計画の承認を受けた中小企業\", \"k\": 5}\n\n    EXAMPLE OUTPUT:\n        {\"tool_name\": \"find_similar_text\",\n         \"lane_id\": \"M5\", \"tier\": \"C\", \"price_jpy\": 12,\n         \"results\": [{\"sentence_id\": \"sent:abc123\",\n                      \"text\": \"...\",\n                      \"source_doc\": \"...\",\n                      \"cosine\": 0.91}],\n         \"total\": k, \"_disclaimer\": \"<§52/§47条の2/§72/§1/§3>\"}\n\n    COST: ¥12 (Tier C) per call. NO LLM. Local BERT encode + cosine.\n\n    When to use: paraphrase / similar-statement detection over\n    jpcite-BERT SimCSE sentence index — ¥12 vs ~4-turn 外部 LLM\n    \"encode anchor + scan corpus + cosine rerank + cite top-k\"\n    chain (¥240). Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest: NO LLM, local BERT\n    encode + cosine only; low-cosine row should be de-prioritized\n    at caller; caller-side threshold required.\n    For personas: 中小企業診断士 / 行政書士 office finding similar\n    制度説明 / 判例 / 通達 文面 to a draft; FDE building \"find\n    similar past statement\" widget; AX_engineer wrapping sentence\n    index as a deduplication tool; agent triaging \"has anyone\n    said this before in the corpus\" question.\n    Example: find_similar_text(text=\"経営革新計画の承認を受けた\n    中小企業\", k=5) -> {tool_name: \"find_similar_text\", lane_id:\n    \"M5\", tier: \"C\", price_jpy: 12, results: [{sentence_id:\n    \"sent:abc123\", text: \"…\", source_doc: \"…\", cosine: 0.91}, …],\n    total: 5, _disclaimer: \"<§52/§47条の2/§72/§1/§3>\"}.\n    Not for: 法令逐条 探索 (use semantic_law_search M4); 文書\n    chunk 検索 (use chunk_retrieval M9); cross-encoder rerank\n    (use rerank_results M6 後段); LLM-style paraphrase generation\n    (this returns matches only, not a rewrite); 法解釈 / 訴訟戦略\n    (士業法 fence — substrate only); sentence license\n    redistribution (license is original source's — caller does\n    NOT grant); freshness guarantee (sentence corpus snapshot\n    may lag; consult source_doc for currency)."
    },
    {
      "name": "rerank_documents_ce",
      "description": "[AUDIT] M6 cross-encoder reranking with ``docs`` parameter (U1 M-side).\n\n    SUMMARY:\n        Score (query, doc) pairs with the local jpcite cross-encoder\n        and return ranked docs with relevance score. Tier C ¥12 / req.\n        Use this when the upstream retriever returned 50-100 candidates\n        and the agent wants the top-5 by cross-encoder confidence.\n\n    WHEN_TO_USE:\n        - 「retriever 100 件を上位 5 件まで絞りたい」\n        - first-stage retrieval の relevance を再評価\n        - long-form RAG の precision を上げたい\n\n    WHEN_NOT:\n        - first-stage retrieval が無い場合 → ``chunk_retrieval`` (M9)\n          を先に走らせる\n        - 1 件しか candidate が無い → rerank 不要\n        - cosine similarity だけ欲しい → ``find_similar_text`` (M5)\n\n    EXAMPLE INPUT:\n        {\"query\": \"経営革新計画の承認\", \"docs\": [\"doc1...\", \"doc2...\"]}\n\n    EXAMPLE OUTPUT:\n        {\"tool_name\": \"rerank_documents_ce\",\n         \"lane_id\": \"M6\", \"tier\": \"C\", \"price_jpy\": 12,\n         \"results\": [{\"rank\": 1, \"doc\": \"...\", \"score\": 0.91},\n                     {\"rank\": 2, \"doc\": \"...\", \"score\": 0.83}],\n         \"total\": N, \"_disclaimer\": \"<§52/§47条の2/§72/§1/§3>\"}\n\n    COST: ¥12 (Tier C) per call. NO LLM. Local cross-encoder forward.\n\n    When to use: 2nd-stage rerank of 50-100 retrieved candidates\n    to top-5 via local cross-encoder — ¥12 vs ~4-turn 外部 LLM\n    \"score query-doc pairs + rerank + cite top-N + format\" chain\n    (¥240). Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest: NO LLM, local cross-encoder\n    forward only; low-score row should be de-prioritized at\n    caller; caller-side threshold required.\n    For personas: AX_engineer / FDE building 2-stage RAG (BM25 →\n    rerank → answer), agent triaging \"which of 100 docs is most\n    relevant\", 中小企業診断士 office filtering similar case\n    studies, audit team building precision-first retrieval.\n    Example: rerank_documents_ce(query=\"経営革新計画の承認\",\n    docs=[\"doc1…\", \"doc2…\", …]) -> {tool_name:\n    \"rerank_documents_ce\", lane_id: \"M6\", tier: \"C\", price_jpy:\n    12, results: [{rank: 1, doc: \"…\", score: 0.91}, {rank: 2,\n    doc: \"…\", score: 0.83}, …], total: N, _disclaimer:\n    \"<§52/§47条の2/§72/§1/§3>\"}.\n    Not for: first-stage retrieval without candidates (use\n    chunk_retrieval M9 / search_chunks first); 1-document\n    rerank (no work to do); cosine similarity only (use\n    find_similar_text M5); LLM-style relevance narrative (this\n    returns score grid only); 法解釈 / 訴訟戦略 (士業法 fence —\n    rerank substrate only, NOT 法解釈 / 監査意見 final); doc\n    license redistribution (license is original source's —\n    caller responsibility); freshness guarantee (cross-encoder\n    model snapshot may lag; consult source corpus for currency)."
    },
    {
      "name": "predict_relation",
      "description": "[AUDIT] M7 KG completion — 4-model ensemble relation prediction.\n\n    SUMMARY:\n        Predict the most likely relation(s) connecting (head, tail) by\n        averaging scores from TransE + RotatE + ComplEx + ConvE\n        ensemble (M7 LIVE 2026-05). Returns top-k predicted_relation /\n        ensemble_score / per-model breakdown. Tier C ¥12 / req.\n\n    WHEN_TO_USE:\n        - 「この houjin と この program の関係は何 (採択?担当?除外?)」\n        - KG completion / link prediction\n        - 過去の採択実績 peer group packet の hint relation 補強\n\n    WHEN_NOT:\n        - head 単独で関連 entity を予測 → ``predict_related_entities``\n          (M7 v1)\n        - 既知の relation を fetch → ``get_entity_relations`` (M1)\n        - 自由文クエリ → ``chunk_retrieval`` (M9)\n\n    EXAMPLE INPUT:\n        {\"head\": \"houjin:1234567890123\",\n         \"tail\": \"program:IT導入補助金:2024\",\n         \"top_k\": 3}\n\n    EXAMPLE OUTPUT:\n        {\"tool_name\": \"predict_relation\",\n         \"lane_id\": \"M7\", \"tier\": \"C\", \"price_jpy\": 12,\n         \"results\": [{\"relation\": \"採択\",\n                      \"ensemble_score\": 0.87,\n                      \"per_model\": {\"transe\": 0.81, \"rotate\": 0.89,\n                                    \"complex\": 0.86, \"conve\": 0.90}}],\n         \"total\": top_k, \"_disclaimer\": \"<§52/§47条の2/§72/§1/§3>\"}\n\n    COST: ¥12 (Tier C) per call. NO LLM. 4 KG embedding forwards."
    },
    {
      "name": "classify_citation",
      "description": "[AUDIT, SENSITIVE — §72/§52] M8 citation classifier.\n\n    SUMMARY:\n        Classify the input citation text into one of the M8 cite-type\n        taxonomy labels (例: positive_authority, distinguished,\n        critical, neutral_reference, statutory_ref). Returns label +\n        confidence + alt_labels. Tier B ¥6 / req.\n\n    WHEN_TO_USE:\n        - 判例で引用されている文を 4 type に分類したい\n        - \"この判決は先行判例を肯定/否定的に引用?\"\n        - 法令解釈の statutory_ref vs case_ref 区別\n\n    WHEN_NOT:\n        - 引用 *対象* を探したい → ``find_cases_citing_law`` (M8 v1) /\n          ``find_laws_cited_by_case`` (M8 v1)\n        - 文書 chunk 検索 → ``chunk_retrieval`` (M9)\n        - 文書類似度 → ``find_similar_text`` (M5)\n\n    EXAMPLE INPUT:\n        {\"text\": \"前掲最判平成20年6月10日参照\"}\n\n    EXAMPLE OUTPUT:\n        {\"tool_name\": \"classify_citation\",\n         \"lane_id\": \"M8\", \"tier\": \"B\", \"price_jpy\": 6,\n         \"results\": [{\"label\": \"positive_authority\",\n                      \"confidence\": 0.92,\n                      \"alt_labels\": [{\"label\": \"neutral_reference\",\n                                       \"score\": 0.05}]}],\n         \"total\": 1, \"_disclaimer\": \"<§52/§47条の2/§72/§1/§3>\"}\n\n    COST: ¥6 (Tier B) per call. NO LLM. Local classifier forward.\n\n    When to use: classify a 判例 / 法令 citation into one of the\n    M8 cite-type labels (positive_authority / distinguished /\n    critical / neutral_reference / statutory_ref) — ¥6 vs\n    ~3-turn 外部 LLM \"parse citation + reason about cite-type +\n    cite label + estimate confidence\" chain (¥150). Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published.\n    Honest: NO LLM, local classifier forward only; low-confidence\n    row (< 0.5) should be treated as \"uncertain\" at caller; alt_\n    labels reflect close-second classifications.\n    For personas: 弁護士 / 司法書士 office analyzing 判例\n    citation structure for 訴訟戦略 substrate (NOT 法解釈\n    final), 中小企業診断士 building \"case citation type\n    distribution\" for client research, FDE building \"what kind\n    of citation is this\" widget, AX_engineer wrapping citation\n    classifier as a tool.\n    Example: classify_citation(text=\"前掲最判平成20年6月10日参照\")\n    -> {tool_name: \"classify_citation\", lane_id: \"M8\", tier: \"B\",\n    price_jpy: 6, results: [{label: \"positive_authority\",\n    confidence: 0.92, alt_labels: [{label: \"neutral_reference\",\n    score: 0.05}, …]}], total: 1, _disclaimer:\n    \"<§52/§47条の2/§72/§1/§3>\"}.\n    Not for: finding citation *target* (use find_cases_citing_law\n    M8 v1 / find_laws_cited_by_case M8 v1); 文書 chunk 検索 (use\n    chunk_retrieval M9); 文書類似度 (use find_similar_text M5);\n    LLM-style citation narrative (this returns label only);\n    法解釈 / 訴訟戦略 final (士業法 fence — 弁護士法 §72 —\n    emission belongs to 弁護士, classifier is substrate only);\n    citation 有効性 / 法的拘束力 verdict (this is taxonomy label\n    only, NOT 法的有効性 — verify primary source); 監査意見 /\n    会計判断 (公認会計士法 §47条の2 fence); confidence\n    interpretation as definitive ruling (low confidence = caller\n    must treat as uncertain)."
    },
    {
      "name": "chunk_retrieval",
      "description": "[AUDIT] M9 jpcite-text chunk retrieval over 708K-row corpus.\n\n    SUMMARY:\n        Hybrid (FTS + embedding) retrieval over the 708K-chunk\n        jpcite-text store (programs / laws / cases / 通達 / 採択事例\n        unified). Returns chunk_id / text / source_doc / score.\n        Tier B ¥6 / req.\n\n    WHEN_TO_USE:\n        - 「自由文クエリで関連 chunk を探したい」\n        - long-form RAG の retrieval source\n        - 採択事例 / 制度文書の横串\n\n    WHEN_NOT:\n        - 法令逐条のみ → ``semantic_law_search`` (M4)\n        - 採択事例だけ → ``search_outcome_corpus`` (M2)\n        - 図表 → ``search_figures`` (M3)\n        - cross-encoder rerank → ``rerank_documents_ce`` (M6) を後段で\n\n    EXAMPLE INPUT:\n        {\"query\": \"経営革新計画の承認 中小企業 製造業\", \"k\": 10}\n\n    EXAMPLE OUTPUT:\n        {\"tool_name\": \"chunk_retrieval\",\n         \"lane_id\": \"M9\", \"tier\": \"B\", \"price_jpy\": 6,\n         \"results\": [{\"chunk_id\": \"chunk:abc123\",\n                      \"text\": \"...\",\n                      \"source_doc\": \"...\",\n                      \"score\": 0.81}],\n         \"total\": k, \"_disclaimer\": \"<§52/§47条の2/§72/§1/§3>\"}\n\n    COST: ¥6 (Tier B) per call. NO LLM. Hybrid FTS + vector retrieval.\n\n    When to use: free-text RAG retrieval over 708K-chunk jpcite-text\n    corpus (programs / laws / cases / 通達 / 採択事例 unified) —\n    ¥6 vs ~5-turn 外部 LLM \"search + filter + dedupe + rerank +\n    cite\" chain (¥300). Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest: hybrid FTS+vector\n    retrieval, low-similarity rows should be de-prioritized at\n    caller; caller-side threshold required.\n    For personas: 中小企業診断士 / 行政書士 / 税理士 office\n    building \"show me chunks about this topic\" widget; FDE\n    building RAG-style answer generator; AX_engineer wrapping\n    chunk corpus as a tool; agent triaging multi-source evidence\n    for a complex query.\n    Example: chunk_retrieval(query=\"経営革新計画の承認 中小企業\n    製造業\", k=10) -> {tool_name: \"chunk_retrieval\", lane_id: \"M9\",\n    tier: \"B\", price_jpy: 6, results: [{chunk_id: \"chunk:abc123\",\n    text: \"…\", source_doc: \"…\", score: 0.81}], total: 10,\n    _disclaimer: \"<§52/§47条の2/§72/§1/§3>\"}.\n    Not for: 法令逐条のみ (use semantic_law_search M4); 採択事例\n    だけ (use search_outcome_corpus M2); 図表 (use search_figures\n    M3); cross-encoder rerank (use rerank_documents_ce M6 後段);\n    LLM-style answer synthesis (this returns chunks only, not a\n    digest); 法解釈 / 訴訟戦略 (士業法 fence — substrate only,\n    NOT 法解釈 / 監査意見 final); chunk license redistribution\n    (chunk license is original source's — caller does NOT grant\n    redistribution)."
    },
    {
      "name": "opensearch_search",
      "description": "[AUDIT] M10 OpenSearch hybrid (BM25 + k-NN) search — U1 M-side R1 format.\n\n    SUMMARY:\n        Hybrid (BM25 multi_match + reserved k-NN ANN) retrieval over the\n        jpcite-corpus-2026-05 index (~600K docs across programs / laws /\n        law_articles / cases / adoption / court / invoice / enforcement).\n        Returns ranked hits with corpus_kind / doc_key / title /\n        prefecture / source_url / score. Tier C ¥12 / req.\n\n    WHEN_TO_USE:\n        - 「日本語の自由文クエリでクラスター横断 retrieval したい」\n        - cross-corpus discovery (programs + laws + cases + adoption)\n        - 早い段階の wide-net retrieval として (rerank 前段)\n\n    WHEN_NOT:\n        - 法令逐条のみで sql-like ID 引きたい → ``semantic_law_search`` (M4)\n        - 採択事例だけ → ``search_outcome_corpus`` (M2)\n        - chunk 単位の long-form RAG → ``chunk_retrieval`` (M9)\n        - SigV4-signed LIVE cluster 直叩きが要 →\n          ``opensearch_hybrid_search`` (autonomath_tools)\n\n    EXAMPLE INPUT:\n        {\"query\": \"経営革新計画 製造業 IT導入補助金\",\n         \"k\": 10, \"index_filter\": \"programs\"}\n\n    EXAMPLE OUTPUT:\n        {\"tool_name\": \"opensearch_search\",\n         \"lane_id\": \"M10\", \"tier\": \"C\", \"price_jpy\": 12,\n         \"results\": [{\"score\": 13.42,\n                      \"corpus_kind\": \"programs\",\n                      \"doc_key\": \"program:keieikakushin_seizou_001\",\n                      \"title\": \"経営革新計画承認 製造業向け...\",\n                      \"prefecture\": \"東京都\",\n                      \"source_url\": \"https://...\"}],\n         \"total\": k, \"_disclaimer\": \"<§52/§47条の2/§72/§1/§3>\"}\n\n    COST: ¥12 (Tier C) per call. NO LLM. Hybrid BM25 + reserved k-NN\n    retrieval; LIVE cluster path is registered separately."
    },
    {
      "name": "multitask_predict_input",
      "description": "[AUDIT] M11 multitask AL iter — single-input multihead inference.\n\n    SUMMARY:\n        PENDING envelope for a future single forward pass through the\n        jpcite multitask encoder producing requested head outputs (NER\n        spans, REL triples, RANK score, CITE classification). No live model\n        output is emitted until the upstream M11 lane lands.\n\n    WHEN_TO_USE:\n        - 「1 つの input から NER + REL + RANK を 1 hop で取りたい」\n        - 採択事例 free-text の多軸抽出 (人/組織/関係/評価)\n        - long-form 文書の structural extraction\n\n    WHEN_NOT:\n        - 単一タスクのみ → 専用 wrapper (e.g. ``classify_citation`` M8)\n        - 既存の ``multitask_predict(text, tasks)`` で十分\n        - 法令本文 → ``semantic_law_search`` (M4)\n\n    EXAMPLE INPUT:\n        {\"input_text\": \"株式会社X (法人番号 1234567890123) が \"\n                       \"経営革新計画の承認を取得した。\",\n         \"heads\": [\"ner\",\"rel\"]}\n\n    EXAMPLE OUTPUT:\n        {\"tool_name\": \"multitask_predict_input\",\n         \"lane_id\": \"M11\", \"tier\": \"C\", \"price_jpy\": 12,\n         \"results\": [{\"head\": \"ner\",\n                      \"spans\": [{\"type\": \"houjin\",\n                                  \"text\": \"株式会社X\",\n                                  \"start\": 0, \"end\": 5,\n                                  \"houjin_id\": \"1234567890123\"}]},\n                     {\"head\": \"rel\",\n                      \"triples\": [{\"head\": \"houjin:1234567890123\",\n                                    \"rel\": \"取得\",\n                                    \"tail\": \"経営革新計画\"}]}],\n         \"total\": 2, \"_disclaimer\": \"<§52/§47条の2/§72/§1/§3>\"}\n\n    COST: no live billing while PENDING. NO LLM. Local multitask encoder\n    lane is upstream-pending."
    },
    {
      "name": "get_artifact_template",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1/§3] Moat N1 fetch a single\n    artifact-template scaffold by segment + artifact_type. Returns the latest\n    version row from `source-derived dataset` with structure / placeholders /\n    mcp_query_bindings hydrated. Scaffold-only — covered responses include\n    ``is_scaffold_only=1`` + ``requires_professional_review=1`` flags and the\n    canonical 士業 disclaimer. NO LLM inference.\n\n    When to use: agent has resolved a (segment, artifact_type) pair —\n    e.g. (税理士, 月次仕訳) — and wants the latest scaffold template with\n    placeholders + mcp_query_bindings so it can render a 成果物 outline\n    before the 士業 fills it. ¥3/billable unit scaffold material.\n    For personas: 税理士 / 会計士 / 行政書士 / 司法書士 / 社労士 artifact-\n    prep substrate; AX_engineer wiring an artifact-template fetcher\n    widget; researcher producing reproducible 成果物 template\n    benchmarks across cohorts.\n    Example: segment=\"税理士\", artifact_type=\"gessji_shiwake\" → returns\n    {template_id, structure_jsonb (sections + fields), placeholders_jsonb\n    (variable list), mcp_query_bindings_jsonb (placeholder→tool map),\n    is_scaffold_only: 1, requires_professional_review: 1, _disclaimer}.\n    Not for: free-text 成果物 emission (士業独占, scaffold only —\n    final 成果物 belongs to the 士業); segment=\"all\" (use\n    ``list_artifact_templates`` instead); missing (segment, artifact_type)\n    combination (returns empty envelope with rationale)."
    },
    {
      "name": "list_artifact_templates",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1/§3] Moat N1 enumerate artifact\n    templates by segment. Returns lightweight summaries (segment / artifact_type\n    / artifact_name_ja / authority / sensitive_act / quality_grade / version /\n    updated_at). Filter by 士業 segment or pass ``\"all\"`` for the full catalog.\n    Scaffold-only catalog — sections / placeholders payload available via\n    ``get_artifact_template``.\n\n    When to use: agent is about to draft a 士業 deliverable (税理士月次報告\n    / 会計士監査調書 / 司法書士登記申請 / 社労士就業規則 etc.) and needs\n    to discover which canonical template scaffolds exist before composing.\n    Returns scaffold-only summaries — agent then calls get_artifact_template\n    for sections / placeholders. NO 士業 act of advice emitted by the tool.\n    For personas: 税理士 / 会計士 / 行政書士 / 司法書士 / 社労士 peer group\n    agents picking the right template; AX_engineer building template libraries.\n    Example: segment=\"税理士\", limit=50 → top 50 税理士-segment template\n    summaries with authority + quality_grade. Pass \"all\" to span every 士業.\n    Not for: drafting the deliverable itself (agent composes via own LLM\n    over scaffold); legal advice or specific filing instructions; choosing\n    between template versions (caller picks via updated_at + quality_grade)."
    },
    {
      "name": "get_houjin_portfolio",
      "description": "[AUDIT, SENSITIVE - §52/§47条の2/§72/§1] Moat N2 fetch the program portfolio\n    for a houjin from the precomputed `source-derived dataset` table.\n    Returns the per-houjin top-N programs (priority_rank ASC) with their\n    deterministic 5-axis applicability score, applied_status and deadline.\n    NO LLM. Pure index lookup.\n\n    When to use: agent has a 13-digit houjin_bangou and wants the precomputed top-N\n    program portfolio rank-ordered (priority_rank ASC, applicability_score DESC) with\n    the 5-axis applicability score (industry / size / region / sector / target_form),\n    applied_status, and deadline. Pure index lookup over source-derived dataset.\n    Single ¥3/billable unit; pure scaffold material.\n    For personas: 中小企業診断士 / 行政書士 producing 補助金 portfolio briefing for a\n    顧問先 (final §1 申請代理 belongs to 行政書士); 税理士 substantiating client subsidy\n    history in workpaper (final §52 belongs to 税理士); 公認会計士 audit team scaffolding\n    portfolio coverage check (final §47条の2 belongs to 公認会計士); AX_engineer wiring\n    a \"client portfolio\" widget.\n    Example: houjin_bangou=\"1010001034962\" → top-N programs with applicability_score\n    + applied_status + deadline ranked by priority_rank.\n    Not for: free-text portfolio recommendation (use intel_bundle_optimal for the\n    optimised bundle); pre-application 採択 prediction (use outcome_acceptance_probability;\n    applicability_score is a structural fit, NOT 採択保証); 申請書面 drafting (use 行政\n    書士 peer group artifact builders under §1). NO LLM inference inside this tool."
    },
    {
      "name": "find_gap_programs",
      "description": "[AUDIT, SENSITIVE - §52/§47条の2/§72/§1] Moat N2 surface gap programs - programs\n    that match the houjin's industry / region / size profile but are NOT yet\n    applied (applied_status='unapplied'). Returns the top-N by priority_rank.\n    NO LLM. Pure index lookup.\n\n    When to use: agent has a specific 13-digit 法人番号 in context and wants\n    to enumerate \"補助金 / 公庫 融資 / 認定制度 / 税制優遇\" they qualify for\n    but haven't yet applied. Returns ingredient — client agent finishes the\n    recommendation prose. Avoids LLM hallucination of fake program names.\n    For personas: 税理士 / 中小企業診断士 / 行政書士 peer group agents preparing\n    quarterly 経営支援 reports; AX_engineer building portfolio gap dashboards.\n    Example: houjin_bangou=\"1234567890123\", top_n=20 → top 20 unapplied\n    matches ranked by priority_rank ASC (deadline + score combined).\n    Not for: program search by free-text (use search_programs); already-\n    applied portfolio history (use outcome_houjin_360); industry-only\n    enumeration without a specific 法人 (use search_programs with filters)."
    },
    {
      "name": "get_reasoning_chain",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1/§3] Moat N3 fetch deterministic\n    reasoning chains by topic_id or chain_id (rule tree + premise + conclusion).\n    NO LLM inference — chains are precomputed by a pure-Python rule engine over\n    法令 + 通達 + 判例 + 採決. 160 topics × 5 viewpoint slices = 800 chains.\n\n    When to use: agent has either a chain_id (LRC-<10hex>)\n    or a canonical topic slug (e.g. 'corporate_tax:\n    yakuin_hosyu') and wants the precomputed reasoning\n    chain — rule tree + premise + minor premise +\n    conclusion + opposing view + citations — so the caller\n    can cite the chain as scaffold material. 160 topics ×\n    5 viewpoint slices = 800 chains. Pure precomputed\n    pull; no LLM at request time; chain is descriptive\n    scaffold, NOT 法解釈 emission.\n    For personas: 弁護士 reading precomputed reasoning as\n    argument scaffold (NOT 法解釈 emission — final ruling\n    belongs to 弁護士); 税理士 / 行政書士 / 公認会計士\n    using chains as briefing substrate; 中小企業診断士\n    learning rule tree for a topic; AX engineer wiring a\n    \"view reasoning chain\" widget; researcher producing\n    reproducible chain corpora.\n    Example: topic=\"corporate_tax:yakuin_hosyu\", limit=5 →\n    returns {\"topic\":\"corporate_tax:yakuin_hosyu\",\"chains\":\n    [{\"chain_id\":\"LRC-abc1234567\",\"topic_label\":\"役員報酬\n    定期同額\",\"tax_category\":\"corporate_tax\",\n    \"premise_law_article_ids\":[\"law:法人税法:34\"],\n    \"premise_tsutatsu_ids\":[...],\"minor_premise_judgment_ids\":\n    [...],\"conclusion_text\":\"...precomputed scaffold...\",\n    \"confidence\":0.84,\"opposing_view_text\":\"...\",\"citations\":\n    [...],\"computed_by_model\":\"rule_engine_v2\",\n    \"computed_at\":\"...\"}, ...], \"schema_version\":\n    \"moat.n3.chain.v1\", \"no_llm\": true, \"_billing_unit\":1,\n    \"_disclaimer\":\"§52/§47条の2/§72/§1/§3 scaffold only\"}.\n    Not for: 法解釈 emission (弁護士法 §72 fence — chains are scaffold,\n    NOT 法解釈); 監査意見 (公認会計士法 §47条の2 fence); 税務代理 (税理士法\n    §52); 申請代理 (行政書士法 §1); 登記 (司法書士法 §3); 採択 / 勝訴\n    保証 (景表法 fence — confidence score is statistical, not predictive\n    of outcome)."
    },
    {
      "name": "walk_reasoning_chain",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1/§3] Moat N3 walk the reasoning\n    chain corpus by keyword + optional category filter. deterministic retrieval SELECT, NO\n    LLM. Returns chains ranked by confidence DESC.\n\n    When to use: agent needs a deterministic \"claim → opposing-view → rebuttal\"\n    chain for a tax/labor/subsidy reasoning step, especially when the client\n    LLM is being asked \"why is X true / what counter-arguments exist\". Returns\n    ingredient only — agent finishes the prose.\n    For personas: 税理士 / 会計士 / 行政書士 / 司法書士 / 社労士 peer group agents\n    drafting workpapers; AX_engineer composing audit reasoning trails.\n    Example: query=\"役員報酬の損金算入 不相当に高額\", category=\"corporate_tax\",\n    min_confidence=0.6 → top reasoning chains with cited articles + opposing views.\n    Not for: free-text legal advice generation (use peer group artifact builders);\n    pure keyword retrieval (use search_chunks); citation chain resolution\n    (use resolve_citation_chain). NO LLM inference inside this tool."
    },
    {
      "name": "find_filing_window",
      "description": "[AUDIT] Moat N4 - Resolve filing window for (program, houjin).\n\n    Reads source-derived dataset (~4,700 rows). NO LLM. Single 3 JPY/req.\n\n    When to use: agent has a specific 法人 + 制度/手続種別 (\"補助金\" /\n    \"法人設立\" / \"登記\" / \"労働保険\" / \"税務申告\" etc.) and needs to\n    surface the canonical filing window (法務局 / 国税庁 / 都道府県 /\n    市区町村 / jcci / 商工会) 5 best matches by 法人 registered_address\n    prefix. Returns ingredient — client agent finishes the workpaper.\n    For personas: 税理士 / 司法書士 / 行政書士 / 社労士 peer group agents\n    routing client filings; AX_engineer building agentic checklist apps.\n    Example: program_id=\"ものづくり補助金\", houjin_bangou=\"1234567890123\"\n    → top 5 windows ranked by registered_address overlap + jurisdiction_kind.\n    Not for: free-text \"where do I file X\" question (use list_windows then\n    rank); program metadata lookup (use get_program); deadline calendar\n    (use find_open_programs / list_windows). NO LLM, NO HTTP."
    },
    {
      "name": "list_windows",
      "description": "[AUDIT] Moat N4 - Enumerate windows by jurisdiction_kind.\n\n    Reads source-derived dataset (~4,700 rows). NO LLM. Single 3 JPY/req.\n\n    When to use: when the agent needs the full list of 申請窓口 /\n    届出先 (filing windows) for a given jurisdiction_kind — e.g.\n    enumerate all 都道府県税務署, all 労働基準監督署, all 法務局, or\n    all 補助金事務局 — without filtering on a specific case. Use this\n    when building a directory UI, when verifying coverage, or when the\n    user asks \"全部見せて\" rather than \"私の case はどこ?\". For the\n    single-window case-aware lookup, use ``find_filing_window``.\n    For personas: 行政書士 / 司法書士 peer group agents building a 申請\n    coverage matrix; 税理士 / 会計士 agents verifying which 税務署 a\n    multi-prefecture client must file with; AX_engineer building a\n    region × jurisdiction picker.\n    Example: jurisdiction_kind=\"zeimu_sho\", limit=50 →\n    {\"results\": [{\"window_id\": \"TS-13001\", \"name_ja\": \"麹町税務署\",\n    \"prefecture\": \"東京都\", \"address\": \"...\", \"url\": \"...\", ...}],\n    \"total_count\": 524} from source-derived dataset. ¥3/billable unit, no LLM,\n    deterministic structured public index read.\n    Not for: case-aware \"私の case の filing window は?\" (use\n    ``find_filing_window`` with houjin / industry / region context);\n    free-text 自治体名 search (use ``search_regions_am`` first);\n    geocoding window address → lat/lon (use a geocoder); 助言-style\n    \"ここに出すべき\" recommendation (士業法 fence — agent composes)."
    },
    {
      "name": "resolve_alias",
      "description": "[AUDIT] Moat N5 - Resolve surface text to canonical_id[].\n\n    Uses source-derived dataset (~433K rows). Two-stage: exact -> NFKC. NO LLM.\n\n    When to use: when the agent receives free-text from the user that\n    might be an alias of a canonical entity — e.g. \"事業再構築\" (could\n    be the 事業再構築補助金 program), \"ものづくり\" (could be\n    ものづくり補助金 or ものづくり法令), \"Apple\" (could be the houjin\n    Apple Japan合同会社). Resolve the alias FIRST before issuing any\n    downstream lookup; otherwise the lookup will miss the row. Two-\n    stage match: exact > NFKC normalization > substring fallback. No\n    LLM, single structured public index read against source-derived dataset (~433K rows).\n    For personas: every peer group persona that takes free-text input —\n    税理士 / 会計士 / 行政書士 / 司法書士 / 社労士 plus AX_engineer.\n    Especially valuable for 補助金 / 法令 / 判例 lookups where the\n    user remembers a colloquial name but not the canonical id.\n    Example: surface=\"事業再構築\", kind=\"program\" →\n    {\"results\": [{\"canonical_id\": \"subsidy:jigyou_saikoichiku\",\n    \"kind\": \"program\", \"match_stage\": \"exact\", \"confidence\": 1.0,\n    \"canonical_name\": \"事業再構築補助金\"}]}. Deterministic, no LLM.\n    Not for: free-text semantic search across description bodies\n    (use ``search_programs`` or ``opensearch_hybrid_search``);\n    fuzzy spelling correction (use a typo-tolerant search layer);\n    deduplication across canonical ids (use ``resolve_citation_chain``);\n    LLM-style entity extraction from a paragraph."
    },
    {
      "name": "amendment_alert",
      "description": "[AUDIT] Moat N6 - amendment alert + impact score (Tier B ¥6).\n\n    WHAT: source-derived dataset (~540K rows) と source-derived dataset\n    (~16K rows) を JOIN し、houjin / program / law / window で絞り込んで\n    impact_score DESC で返す。NO LLM、純 structured public index。\n\n    WHEN:\n      - 税理士/会計士: 顧問先 houjin の補助金 eligibility / 税制適用が\n        直近で動いた件を 1 call で拾う\n      - 法務 peer group: 特定 law_id (個人情報保護法等) が trigger した\n        全 houjin 影響を impact_score 順で要約\n      - 監視/通知: notified_at IS NULL でフィルタしたい場合は\n        feed router (/v1/me/amendment_alerts) を併用\n\n    WHEN NOT:\n      - 個別 diff の本文 → search_amendment_diff (別 tool 検討)\n      - 法令本文 → get_law_article / search_laws\n      - subscription 管理 → POST /v1/me/amendment_alerts/subscribe\n\n    RETURNS:\n      {\n        tool_name: \"amendment_alert\",\n        lane_id: \"N6\", schema_version: \"moat.n6.v1\",\n        tier: \"B\", price_jpy: 6, _billing_unit: 2,\n        primary_input: {...echoed inputs...},\n        window: {since: ISO, until: ISO, days_window: int},\n        total: int, results: [<shaped alert row>...],\n        elapsed_ms: float, no_llm: true,\n        _disclaimer: str\n      }\n\n    When to use: 税理士 / 会計士 / 弁護士 office or agent\n    watching for 法令改正 / 補助金条件改定 impact on a 顧問先\n    houjin / industry / law portfolio — JOIN source-derived dataset\n    impact (~540K rows) + source-derived dataset (~16K rows) sorted by\n    impact_score DESC with houjin / program / law / window filter\n    — ¥6 vs ~7-turn 外部 LLM \"monitor 改正 feed → compute impact\n    on顧問先 → rank by severity → return alert list\" chain (¥420).\n    Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest: deterministic retrieval scan, NO LLM; impact_score\n    is heuristic ranking (caller threshold決定); notified_at IS\n    NULL filter belongs to the feed router (/v1/me/amendment_\n    alerts), not this lookup tool. Tier B ¥6 / req, _billing_unit:\n    2.\n    For personas: 税理士 office watching 顧問先 peer group for 税制改正\n    impact, 会計士 office tracking 監査クライアント の 規制\n    変動, 法務 peer group tracking 個人情報保護法 / 景表法 改正 impact\n    across 全 houjin portfolio, FDE building \"show me 改正 hits\n    for client X\" widget, monitor pipeline aggregating impact_score\n    DESC per source refresh.\n    Example: amendment_alert(houjin_id=\"1234567890123\",\n    days_window=90, limit=10) →\n    {tool_name:\"amendment_alert\", lane_id:\"N6\",\n    schema_version:\"moat.n6.v1\", tier:\"B\", price_jpy:6,\n    _billing_unit:2,\n    primary_input:{houjin_id:\"1234567890123\", ..., days_window:90,\n    limit:10}, window:{since:\"2026-02-28T...\", until:\"2026-05-29T\n    ...\", days_window:90}, total:42, results:[{...shaped alert\n    rows by impact_score DESC...}], elapsed_ms:38.5,\n    no_llm:true, _disclaimer:\"...\"}.\n    Not for: 個別 diff の本文 (search_amendment_diff — 別 tool 検討);\n    法令本文 (get_law_article / search_laws); subscription 管理\n    (POST /v1/me/amendment_alerts/subscribe REST); 税務代理 / 監査\n    意見 (税理士法 §52 / 公認会計士法 §47条の2 fence — agent\n    surfaces alerts, final 助言 / 意見 belongs to 士業);\n    notified_at routing (use feed router); impact_score 拘束力\n    判断 (substrate only, caller threshold決定)."
    },
    {
      "name": "get_recipe",
      "description": "[AUDIT, SENSITIVE - SS52/SS47-2/SS72/SS1/SS3] Moat N8 fetch a single\n    recipe's full deterministic call sequence (preconditions + steps + args +\n    output_artifact + disclaimer). Returns the structured payload an agent\n    can iterate over to execute the recipe step-by-step. NO LLM inference.\n\n    When to use: agent has a recipe slug (e.g.\n    'recipe_tax_monthly_closing') from list_recipes and\n    wants the full deterministic step-by-step sequence —\n    preconditions + per-step tool name + args +\n    output_artifact + disclaimer — so the caller can drive\n    a multi-step usage pattern without re-asking how to chain\n    tools. Pure YAML fetch; no LLM inference; recipe is\n    pre-curated scaffold, NOT advice emission.\n    For personas: 中小企業 経営者 following a 補助金\n    application checklist; 中小企業診断士 / 経営コンサル\n    using recipes as kickoff substrate; 行政書士 /\n    税理士 / 会計士 retrieving peer group-specific procedure\n    scaffolds (NOT replacement for professional execution);\n    AX engineer wiring recipe-driven UX; FDE composing\n    multi-step agentic usage patterns.\n    Example: recipe_name=\"recipe_tax_monthly_closing\" →\n    returns {\"recipe_name\":\"recipe_tax_monthly_closing\",\n    \"preconditions\":[...],\"steps\":[{\"step\":1,\"tool\":\n    \"get_houjin_360_am\",\"args\":{\"houjin_id\":\"$houjin\"},\n    \"output_artifact\":\"houjin_meta\"}, ...],\"disclaimer\":\n    \"[AUDIT, SENSITIVE — §52/§47条の2/§72/§1/§3] scaffold\n    only, not advice emission\", \"schema_version\":\n    \"moat.n8.recipe.v1\", \"no_llm\": true}.\n    Not for: 申請代理 / 書面 起案 (行政書士法 §1, 司法書士法 §3 fence —\n    recipes are scaffolds, NOT 書面 generation); 監査意見 (公認会計士法\n    §47条の2 fence); 税務代理 (税理士法 §52); 法解釈 (弁護士法 §72);\n    採択保証 (景表法 fence — recipes are procedural, not predictive)."
    },
    {
      "name": "list_recipes",
      "description": "[AUDIT, SENSITIVE - SS52/SS47-2/SS72/SS1/SS3] Moat N8 enumerate recipe\n    summaries by segment. Returns lightweight per-recipe metadata\n    (recipe_name / segment / title / disclaimer / step_count / cost_estimate /\n    duration / parallel_calls_supported). Pass ``\"all\"`` for the 15-recipe\n    catalog, or a concrete segment for the 3 scenarios under that 士業.\n    Detailed step sequence + output_artifact schema available via\n    ``get_recipe``.\n\n    When to use: agent (or its end user) wants to browse the 15-recipe\n    cookbook for one 士業 segment (tax / audit / gyousei / shihoshoshi /\n    ax_fde) or the full catalog, to pick a usage pattern before committing to\n    the full step sequence. ¥3 vs ~5-turn 外部 LLM \"what recipes do you\n    have for 税理士?\" exploration (¥300). Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published.\n    For personas: 税理士 / 会計士 / 行政書士 / 司法書士 browsing the recipe\n    cookbook, AX_engineer wiring a recipe-picker UI, FDE auditing\n    available recipes for 顧客 整合.\n    Example: segment=\"tax\", limit=10 → returns {results: [{recipe_name:\n    \"zeirishi_monthly_workpaper\", segment: \"tax\", title:\n    \"税理士月次顧問先 workpaper\", step_count: 7, cost_estimate:\n    \"¥15-¥45\", duration: \"2-5min\", parallel_calls_supported: true,\n    disclaimer: …}, …], total: N, _billing_unit: 1} envelope.\n    segment=\"all\" returns full 15-recipe catalog.\n    Not for: detailed step sequence + output_artifact schema (use\n    ``get_recipe`` next); recipe creation / editing (read-only catalog);\n    士業 助言 emission (recipes are scaffold orchestration, final\n    助言 belongs to 士業); segment outside the enum (rejected by pattern)."
    },
    {
      "name": "resolve_placeholder",
      "description": "[AUDIT, SENSITIVE - SS52/SS47-2/SS72/SS1/SS3] Moat N9 resolve one\n    placeholder to its canonical MCP call schema. Returns\n    (mcp_tool_name, args_substituted, output_path, fallback_value, value_kind,\n    is_sensitive) so the agent can deterministically execute the resolved\n    call and apply output_path to the response. Special mcp_tool_name\n    values: ``context`` (value already in context_dict) / ``computed``\n    (deterministic CURRENT_DATE / OPERATOR_NAME / etc.). NO LLM inference.\n\n    When to use: agent is processing a get_artifact_template scaffold and\n    sees ``{{PLACEHOLDER_NAME}}`` tokens in sections. Call this once per\n    placeholder to learn exactly which MCP tool to invoke + which args to\n    pass + how to slice the response — no guessing, no LLM-substituted\n    fake values. Use with an existing context_dict_json that holds\n    runtime-known tokens (houjin_bangou / current_date etc.).\n    For personas: AX_engineer / FDE building deterministic agent pipelines\n    that fill 士業 deliverable templates; 税理士 / 会計士 peer group agents\n    auto-substituting standard form fields without LLM drift.\n    Example: placeholder_name=\"{{HOUJIN_NAME}}\",\n    context_dict_json='{\"houjin_bangou\":\"1234567890123\"}'\n    → {mcp_tool_name:\"get_houjin_360_am\", args_substituted:{...},\n    output_path:\"master_info.name_ja\", value_kind:\"text\"}.\n    Not for: free-text natural-language token resolution; placeholder\n    discovery (use get_artifact_template first); LLM-style \"infer this\n    field\" — value_kind/output_path are deterministic only."
    },
    {
      "name": "agent_full_context",
      "description": "[AUDIT, SENSITIVE - §52/§47条の2/§72/§1/§3] Moat HE-1 - 1-call\n    agent_full_context.\n\n    Returns everything an agent needs (resolved aliases + top programs\n    + reasoning chain walk + filing windows + applicable artifact\n    templates + houjin portfolio_gap + amendment alerts + segment view\n    + related recipes + canonical placeholder preview + next_call_hints)\n    in a single response. Replaces the 5-10 atomic round trips an agent\n    would otherwise need to assemble the same context.\n\n    NO LLM inference. NO HTTP. deterministic retrieval + Python composition over\n    existing moat lanes (N1..N9 + ``search_programs``).\n\n    When to use: at the START of a new 士業 / business task, when the\n    agent has a free-text query and (optionally) a 法人 in context and\n    wants the entire context pack in one round trip instead of issuing\n    5-10 atomic MCP calls. レイテンシと token 消費の削減量は benchmark pending vs the per-call alternative. Pick depth_level 1 (LITE\n    ~5KB) for prompt-context substrate, 3 (NORMAL ~30KB) for deliverable\n    drafting, 5 (FULL ~100KB) for portfolio audit. Returns ingredient —\n    client agent finishes the user-facing prose.\n    For personas: 税理士 / 会計士 / 行政書士 / 司法書士 / 社労士 peer group\n    agents kicking off a client task; AX_engineer + FDE building agentic\n    apps where 1 round trip is much cheaper than 10. See pricing doc\n    for the ¥3-240 envelope vs 外部 LLM 7-turn cost 参考曲線 (benchmark pending).\n    Example: query=\"ものづくり補助金 過去の採択実績\", segment=\"税理士\",\n    houjin_bangou=\"1234567890123\", depth_level=3 → 1-call envelope with\n    aliases + top programs + reasoning + windows + templates + gap +\n    alerts + segment view + recipes + placeholders + next_call_hints.\n    Not for: a single-purpose drilldown (use the dedicated tool —\n    search_programs / walk_reasoning_chain / find_filing_window etc.);\n    LLM-style 士業 advice generation (士業法 fence — agent composes);\n    polling / refresh of stale state (this is single-shot, not subscribe)."
    },
    {
      "name": "prepare_implementation_workpaper",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1/§3] HE-2 Heavy-Output endpoint.\n\n    Composes the N1 template + N2 portfolio + N3 reasoning + N4 filing\n    window + N6 amendment alerts + N9 placeholder map into one fully-filled\n    workpaper draft. NO LLM inference — deterministic retrieval + dict composition.\n\n    Returns the canonical HE-2 envelope (template / filled_sections /\n    legal_basis / filing_window / deadline / estimated_completion_pct /\n    agent_next_actions / reasoning_chains / amendment_alerts_relevant /\n    alternative_templates / billing / _disclaimer / _citation_envelope /\n    _provenance). Always emits the §-aware disclaimer even on empty paths.\n    4 ¥3 billable units per call (¥12, Tier C heavy_endpoint).\n\n    When to use: 士業 office (税理士 / 公認会計士 / 弁護士 / 行政書士 /\n    司法書士 / 社労士) building one workpaper artifact (houjinzei_shinkoku\n    / shuugyou_kisoku / kaisha_setsuritsu_touki / …) with N1 template +\n    N2 portfolio gap + N3 reasoning + N4 filing window + N6 amendment\n    alerts + N9 placeholder map composed in ONE call. ¥12 (4 units,\n    Tier C heavy_endpoint) vs ~6-turn 外部 LLM \"look up template +\n    portfolio + reasoning + window + alerts + placeholders\" chain\n    (¥360). Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest: 5-level auto_fill_level (none /\n    template_only / placeholders / partial / deep) — partial level\n    surfaces MCP bindings without invoking, useful for cost-conscious\n    callers.\n    For personas: 税理士 office building 法人税申告書 draft for an\n    SME client, 公認会計士 office composing 監査調書 walkthrough,\n    弁護士 office drafting 訴訟関連 書面 scaffold, 行政書士 office\n    composing 許認可申請 書面, 司法書士 office building 登記申請 packet,\n    社労士 office composing 就業規則 / 36協定 draft, FDE wiring a\n    multi-tenant 士業 SaaS onboarding (one call per artifact per\n    houjin per cycle).\n    Example: artifact_type=\"houjinzei_shinkoku\",\n    houjin_bangou=\"1234567890123\", segment=\"税理士\", fiscal_year=2026,\n    auto_fill_level=\"deep\" → returns {template:{…},\n    filled_sections:[…], legal_basis:[…], filing_window:{deadline_iso:\n    \"…\", n4_filing_window:{…}}, deadline:\"…ISO…\",\n    estimated_completion_pct:78, agent_next_actions:[…],\n    reasoning_chains:[…], amendment_alerts_relevant:[…],\n    alternative_templates:[…], billing:{tier:\"C\", _billing_unit:4,\n    jpy:12}, _disclaimer:\"…\", _citation_envelope:[…], _provenance:{…}}.\n    Not for: artifact_type outside source-derived dataset (empty envelope\n    with rationale); auto_fill_level outside the 5 enum (rejected);\n    segment outside the 6 peer group (rejected); 税務代理 / 監査意見 /\n    法解釈 / 書面作成 final emission (士業独占業務 fence — final 書面 +\n    押印 belongs to the named 士業); cross-houjin batch (single houjin\n    per call); 個別 client 助言 (final 助言 belongs to 士業); 採択 /\n    認可保証 (substrate only); raw 個人情報 / 給与額 / 個人番号 in\n    placeholders (caller must scope down)."
    },
    {
      "name": "agent_briefing_pack",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1/§3] Moat HE-3 agent briefing pack.\n\n    Returns a 10-section structured pack tuned for direct injection into an\n    agent's context window. Sections: context / current_law / tsutatsu /\n    judgment_summary / practical_guidance / common_pitfalls /\n    next_step_recommendations / applicable_templates / related_filing_windows /\n    disclaimer_envelope. Three parallel output encodings (Claude XML, OpenAI\n    JSON, Markdown). NO LLM inference — deterministic retrieval + Python composition.\n\n    When to use: agent wants one structured briefing pack (10 sections)\n    on a topic, tuned for direct context-window injection, ready in\n    Claude XML / OpenAI JSON / Markdown. ¥3-¥45 (varies by depth 1-5)\n    vs ~10-turn 外部 LLM briefing chain (¥600). Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published.\n    Tiered depth controlled by token_budget.\n    For personas: 税理士 / 会計士 / 中小経営者 wanting a one-shot 法令 +\n    通達 + 判例 + practical_guidance bundle on a topic, AX_engineer\n    wiring a briefing pack into an agent's context, FDE 多\n    encoding briefing surface for downstream LLM stacks.\n    Example: topic=\"役員報酬の損金算入\", target_segment=\"zeirishi\",\n    output_format=\"claude_xml\", token_budget=8000 → returns\n    {sections: [{section: \"context\", content: \"…\"}, {section:\n    \"current_law\", content: \"<法人税法 §34> …\"}, …,\n    {section: \"disclaimer_envelope\", content: \"税理士法 §52 …\"}],\n    encoding: \"claude_xml\", depth_level: 3, total_tokens_est: ~8000,\n    _billing_unit: 3} envelope. depth flips at 1500/3500/8000/14000/\n    30000.\n    Not for: 助言 emission (briefing scaffold only — final 助言\n    belongs to 士業); token_budget < 500 or > 30000 (rejected);\n    target_segment outside enum (rejected by pattern); LLM call\n    (composition is deterministic retrieval + Python, no LLM at request time)."
    },
    {
      "name": "multi_tool_orchestrate",
      "description": "[AUDIT, SENSITIVE - SS52/SS47-2/SS72/SS1/SS3] HE-4 server-side bundler:\n    dispatch N MCP tool calls in one round trip. Per-call billing (¥3 each)\n    is transparent — the bundle discount is in network round trips, not in\n    ¥. NO LLM inference. Dispatched tool names must be allowlisted (i.e.\n    already registered on this MCP server). Use this when an agent has\n    independent parallel queries (e.g. search_programs + get_houjin_360 +\n    find_filing_window) and wants 1 round trip instead of N.\n\n    When to use: agent has N independent MCP queries (no data dependency\n    between them) and wants 1 network round trip instead of N. Per-call\n    ¥3 charge applies — saving is in latency / RTT, not ¥. Typical:\n    10 parallel calls collapse to 1 RTT (~150ms p50 vs 10×150ms=1.5s).\n    For personas: AX_engineer building latency-sensitive agent surfaces,\n    FDE 顧客 batch-query pipeline, 税理士 / 会計士 dashboard wanting\n    parallel program + filing_window + 360 lookup in one shot.\n    Example: tool_calls=[{tool: \"search_programs\", args:\n    {industry: \"製造業\"}}, {tool: \"get_houjin_360\", args:\n    {houjin_bangou: \"1234567890123\"}}, {tool: \"find_filing_window\",\n    args: {program_id: \"UNI-it-2025-001\"}}], parallel=True,\n    fail_strategy=\"partial\", max_concurrent=10 → returns\n    {results: [3 envelope dicts in same index order], per_call_status:\n    [{status: \"ok\"} × 3], total_ms: 180} envelope.\n    Not for: dependent / chained calls (use chain_* composed tools so\n    upstream output flows downstream); non-allowlisted tool names\n    (rejected at validation); 32+ calls (hard cap, split into 2 calls);\n    fail_strategy other than partial / all_or_nothing."
    },
    {
      "name": "cohort_lora_resolve",
      "description": "[AUDIT] Moat BB4 peer group LoRA adapter router. Resolves a segment\n    string to the canonical peer group id plus the S3 prefix of that peer group's\n    LoRA adapter ``model.tar.gz`` (trained on top of M5 jpcite-bert-v1).\n\n    Returns a structural PENDING envelope when the segment is unknown\n    OR when the peer group's adapter has not yet landed (BB4 training jobs\n    chain post-M5 on the single ml.g4dn.xlarge quota slot — full 5\n    peer group series takes ~25-30 hours).\n\n    NO LLM inference is performed here. The downstream encoder\n    (jpcite-bert-v1 + LoRA) is a local encoder; this tool only\n    resolves pointers.\n\n    When to use: agent / FDE wiring a peer group-specific embedding pipeline\n    needs the canonical peer group id + S3 prefix of that peer group's LoRA\n    adapter — supports JA / EN / direct-id input — to load the right\n    adapter on top of the M5 jpcite-bert-v1 base encoder. ¥3 vs ~4-turn\n    外部 LLM \"which adapter for 税理士 / how do I resolve segment string\"\n    chain (¥240). Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest: returns PENDING envelope\n    cleanly when a peer group's adapter hasn't trained yet (BB4 lane\n    serialised on single quota slot).\n    For personas: FDE building a peer group-aware semantic-search pipeline\n    (load 税理士 LoRA before encoding 月次決算 queries), AX_engineer\n    routing a multi-peer group agent to the right adapter, 士業 office\n    self-hosting a peer group-specific embedding stack via the SageMaker\n    endpoint.\n    Example: segment=\"税理士\" → returns {peer group:\"zeirishi\",\n    s3_prefix:\"s3://…/lora/zeirishi/\", status:\"ready\",\n    base_model:\"m5_jpcite_bert_v1\", training_dataset:\"…\",\n    last_trained_at:\"…ISO…\", _billing_unit:1}.\n    Not for: unknown segments (PENDING with reason=\"unknown_segment\");\n    raw model inference (this is a pointer-only resolver — caller loads\n    the adapter); cross-peer group blending (single peer group per call); 助言\n    emission downstream (encoder output is substrate for retrieval, not\n    advice)."
    },
    {
      "name": "agent_cohort_deep_chusho_keieisha",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1/§3] Moat HE-5 peer group deep — 中小経営者.\n\n    D-tier ¥30 (10 units × ¥3). Returns 8 sections.\n\n    Cost-saving claim: equivalent to ~7-turn 外部 LLM reasoning with\n    peer group-specific persona (¥500-700). This endpoint: ¥30 = cost 比は benchmark pending.\n    peer group: 中小経営者 (chusho_keieisha). NO LLM inference.\n    ``税理士法 §52`` + ``弁護士法 §72`` boundary enforced.\n\n    When to use: agent serving a 中小企業 経営者 persona wants a single-call\n    8-section peer group-specific deep briefing (vs the 15-section ultra at\n    ``agent_cohort_ultra_chusho_keieisha``) — program rollup + 補助金\n    overlap + peer benchmark substrate before consulting 士業. ¥30 vs\n    ~7-turn 外部 LLM chain ¥500-700 (cost 比は benchmark pending cost).\n    For personas: 中小企業 経営者 (advisor briefing prep); AX_engineer\n    wiring an SME-peer group 8-section widget; researcher building peer group-deep\n    reproducibility baselines for SME advisor flows.\n    Example: query=\"IT補助金と社労士チェックを同時にやりたい\",\n    entity_id=\"1234567890123\" → returns 8-section dict (program_catalog,\n    funding_overlap, peer_benchmark, citation_pack, …) with 税理士法 §52\n    / 弁護士法 §72 disclaimer envelope.\n    Not for: 税務助言・法律意見・労務助言 emission (士業独占, NO LLM,\n    scaffold only); 節税効果保証 surface (景表法 fence); 15-section\n    ultra-deep one-shot (use ``agent_cohort_ultra_chusho_keieisha``\n    instead); single-section lookup (use targeted tools)."
    },
    {
      "name": "agent_cohort_deep_gyouseishoshi",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1/§3] Moat HE-5 peer group deep — 行政書士.\n\n    D-tier ¥30 (10 units × ¥3). Returns 8 sections.\n\n    Cost-saving claim: equivalent to ~7-turn 外部 LLM reasoning with\n    peer group-specific persona (¥500-700). This endpoint: ¥30 = cost 比は benchmark pending.\n    peer group: 行政書士 (gyouseishoshi). NO LLM inference. ``行政書士法 §1``\n    boundary enforced — scaffold + 一次 URL のみ.\n\n    When to use: agent serving a 行政書士 persona wants a single-call\n    8-section peer group-specific deep briefing (vs the 15-section ultra at\n    ``agent_cohort_ultra_gyouseishoshi``) — 制度 rollup + 窓口 URL +\n    添付書類 list scaffold before drafting 申請書面. ¥30 vs ~7-turn\n    外部 LLM chain ¥500-700 (cost 比は benchmark pending cost).\n    For personas: 行政書士 (許認可申請の substrate 整え); AX_engineer\n    wiring a 行政書士-peer group 8-section widget; researcher building\n    peer group-deep reproducibility baselines for 行政書士 flows.\n    Example: query=\"風俗営業1号許可と深夜酒類提供届出の同時申請\",\n    entity_id=\"1234567890123\" → returns 8-section dict (program_summary,\n    window_urls, attachment_list, citation_pack, …) with 行政書士法 §1\n    disclaimer envelope.\n    Not for: 書面作成・代理申請の emission (行政書士法 §1 monopoly, NO\n    LLM, scaffold only); 採択保証・許認可保証 surface (景表法 fence);\n    15-section ultra-deep one-shot (use ultra tool instead);\n    single-section lookup (use targeted tools)."
    },
    {
      "name": "agent_cohort_deep_kaikeishi",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1/§3] Moat HE-5 peer group deep — 会計士.\n\n    D-tier ¥30 (10 units × ¥3). Returns 8 sections.\n\n    Cost-saving claim: equivalent to ~7-turn 外部 LLM reasoning with\n    peer group-specific persona (¥500-700). This endpoint: ¥30 = cost 比は benchmark pending.\n    peer group: 会計士 (kaikeishi). NO LLM inference.\n\n    When to use: agent serving a 公認会計士 persona has a\n    free-text query (and optionally a 監査クライアント\n    13-digit corporate number + 24h session token) and\n    wants the deep 8-section peer group dossier — material\n    that takes 外部 LLM ~7 turns × ¥500-700 to replicate\n    becomes one ¥30 D-tier composite call. Pure\n    precomputed composition; no LLM at request time;\n    scaffold material, NOT 監査意見 emission.\n    For personas: 公認会計士 onboarding new 監査クライアント\n    or building 監査調書 substrate (NOT replacement for\n    §47条の2 監査意見 — final 意見 belongs to 会計士);\n    監査法人 staff building 期初 / 中間 / 期末 briefing;\n    AX engineer wiring a \"kaikeishi deep brief\" widget;\n    FDE composing peer group-specific surfaces; researcher\n    benchmarking dossier quality vs external LLM.\n    Example: query=\"新規 上場準備会社の 内部統制 評価で\n    着目すべき論点を整理したい\", entity_id=\n    \"1234567890123\", context_token=\"ses_xyz...\" →\n    returns {\"peer group\":\"kaikeishi\",\"sections\":[{\"name\":\n    \"context_summary\",\"...\"},{\"name\":\"applicable_rules\",\n    \"...\"},{\"name\":\"reasoning_chain\",\"...\"},\n    ...,{\"name\":\"next_actions\",\"...\"}], \"tier\":\"D\",\n    \"_billing_unit\":10, \"_billing_yen\":30,\n    \"schema_version\":\"moat.he5.cohort_deep.v1\",\n    \"no_llm\": true, \"_disclaimer\":\"§52/§47条の2/§72/§1/§3\n    scaffold only, not 監査意見\"}.\n    Not for: 監査意見 emission (公認会計士法 §47条の2 fence — final 意見\n    requires 会計士); 税務代理 (税理士法 §52 fence); 法解釈 (弁護士法\n    §72); 申請代理 (行政書士法 §1); 登記 (司法書士法 §3); 適正性 / 評価\n    保証 (景表法 fence — peer group brief is scaffold material, NOT\n    promised audit outcome)."
    },
    {
      "name": "agent_cohort_deep_shihoshoshi",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1/§3] Moat HE-5 peer group deep — 司法書士.\n\n    D-tier ¥30 (10 units × ¥3). Returns 8 sections.\n\n    Cost-saving claim: equivalent to ~7-turn 外部 LLM reasoning with\n    peer group-specific persona (¥500-700). This endpoint: ¥30 = cost 比は benchmark pending.\n    peer group: 司法書士 (shihoshoshi). NO LLM inference. ``司法書士法 §3``\n    boundary enforced — 登記簿事項 retrieval のみ.\n\n    When to use: agent serving a 司法書士 persona wants a single-call\n    8-section peer group-specific deep briefing (vs the 15-section ultra at\n    ``agent_cohort_ultra_shihoshoshi``) — 登記簿事項 rollup + related-\n    program scaffold + precedent pointers before drafting 申請. ¥30 vs\n    ~7-turn 外部 LLM chain ¥500-700 (cost 比は benchmark pending cost).\n    For personas: 司法書士 (登記/供託 substrate gathering); AX_engineer\n    wiring a 司法書士-peer group 8-section widget; researcher building\n    peer group-deep reproducibility baselines for 司法書士 flows.\n    Example: query=\"抵当権設定登記の申請添付書類\", entity_id=\"1234567890123\" →\n    returns 8-section dict (touki_summary, related_programs,\n    precedent_pointers, citation_pack, …) with 司法書士法 §3\n    disclaimer envelope.\n    Not for: 登記申請・供託・簡裁訴訟代理 emission (司法書士法 §3\n    monopoly, NO LLM, scaffold only); 与信判断 surface (信用情報法\n    fence); 15-section ultra-deep one-shot (use ultra tool instead);\n    single-section lookup (use targeted tools)."
    },
    {
      "name": "agent_cohort_deep_zeirishi",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1/§3] Moat HE-5 peer group deep — 税理士.\n\n    D-tier ¥30 (10 units × ¥3). Returns 8 sections.\n\n    Cost-saving claim: equivalent to ~7-turn 外部 LLM reasoning with\n    peer group-specific persona (¥500-700). This endpoint: ¥30 = cost 比は benchmark pending.\n    peer group: 税理士 (zeirishi). NO LLM inference.\n\n    When to use: agent serving a 税理士 persona has a\n    free-text query (and optionally a 顧問先 13-digit\n    corporate number + 24h session token) and wants the\n    deep 8-section peer group dossier — material that takes\n    外部 LLM ~7 turns × ¥500-700 to replicate becomes\n    one ¥30 D-tier composite call. Pure precomputed\n    composition; no LLM at request time; scaffold\n    material, NOT 税務代理 output.\n    For personas: 税理士 onboarding new 顧問先 / building\n    monthly briefing material (NOT replacement for §52\n    税務代理 — final 申告書 ratification belongs to 税理士);\n    AX engineer wiring a \"zeirishi deep brief\" widget;\n    FDE composing peer group-specific surfaces; researcher\n    benchmarking peer group dossier quality vs external LLM.\n    Example: query=\"顧問先の R&D 投資の節税効果を月次報告\n    に組み込みたい\", entity_id=\"1234567890123\",\n    context_token=\"ses_abc...\" → returns {\"peer group\":\n    \"zeirishi\",\"sections\":[{\"name\":\"context_summary\",\"...\"},\n    {\"name\":\"applicable_rules\",\"...\"},{\"name\":\"reasoning_chain\",\n    \"...\"}, ..., {\"name\":\"next_actions\",\"...\"}],\n    \"tier\":\"D\",\"_billing_unit\":10,\"_billing_yen\":30,\n    \"schema_version\":\"moat.he5.cohort_deep.v1\",\n    \"no_llm\": true, \"_disclaimer\":\"§52/§47条の2/§72/§1/§3\n    scaffold only, not 税務代理\"}.\n    Not for: 確定申告書 ratification (税理士法 §52 fence — final filing\n    requires 税理士); 監査意見 (公認会計士法 §47条の2 fence); 法解釈\n    (弁護士法 §72 fence); 申請代理 (行政書士法 §1 fence); 登記\n    (司法書士法 §3 fence); 採択 / 節税効果 保証 (景表法 fence — peer group\n    brief is scaffold material, NOT promised outcome)."
    },
    {
      "name": "agent_cohort_ultra_chusho_keieisha",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1/§3] Moat HE-6 peer group ultra — 中小経営者.\n\n    D+-tier ¥100 (33 units × ¥3). Returns 15 sections.\n\n    Cost-saving claim: equivalent to ~21-turn 外部 LLM multi-round\n    reasoning (¥1,500). This endpoint: ¥100 = cost 比は benchmark pending. peer group: 中小経営者.\n    ``税理士法 §52`` + ``弁護士法 §72`` boundary enforced.\n    NO LLM inference.\n\n    When to use: agent serving a 中小企業 経営者 persona needs a single-shot\n    ultra-deep peer group briefing (15 sections of scaffold material) before\n    consulting 顧問税理士/弁護士/社労士 — 制度カレンダー rollup, 補助金\n    eligibility scaffold, peer-group benchmark, related-program citation\n    pack. Pay-once ¥100 vs ~21-turn 外部 LLM chain ¥1,500 (cost 比は benchmark pending cost).\n    For personas: 中小企業 経営者 (advisor 訪問前の briefing 整え), AX_engineer\n    wiring a peer group-aware concierge agent for SME founders, researcher\n    benchmarking SME-peer group briefing baselines.\n    Example: query=\"補助金応募と就業規則改定を 6ヶ月以内に同時にやる場合の論点\",\n    entity_id=\"1234567890123\" → returns 15-section dict (program_calendar,\n    eligibility_scaffold, peer_benchmark, citation_pack, …) with explicit\n    \"税理士法 §52 / 弁護士法 §72 / 社労士法 boundary — 助言は 士業 へ\" envelope.\n    Not for: 税務助言・法律意見・労務助言 emission (士業独占, NO LLM, scaffold\n    only); 節税効果保証 surface (景表法 fence); one-section point lookup\n    (use single-section tools instead); 個別経営判断 substitute."
    },
    {
      "name": "agent_cohort_ultra_gyouseishoshi",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1/§3] Moat HE-6 peer group ultra — 行政書士.\n\n    D+-tier ¥100 (33 units × ¥3). Returns 15 sections.\n\n    Cost-saving claim: equivalent to ~21-turn 外部 LLM multi-round\n    reasoning (¥1,500). This endpoint: ¥100 = cost 比は benchmark pending. peer group: 行政書士.\n    NO LLM inference. ``行政書士法 §1`` boundary enforced — scaffold + 一次 URL のみ.\n\n    When to use: agent serving a 行政書士 persona needs a single-shot\n    ultra-deep peer group briefing (15 sections of scaffold material) for\n    許認可・申請書面 substrate — 制度 catalog rollup, 窓口 URL pack, 添付\n    書類 list scaffold, 改正履歴, 類似案件 citation pack. Pay-once ¥100 vs\n    ~21-turn 外部 LLM chain ¥1,500 (cost 比は benchmark pending cost).\n    For personas: 行政書士 (許認可申請の前 substrate 整え), AX_engineer\n    wiring a peer group-aware agent for a 行政書士事務所, researcher producing\n    reproducible 行政書士 peer group briefing baselines.\n    Example: query=\"飲食店営業許可と特定遊興飲食店営業許可の同時申請手順\",\n    entity_id=\"1234567890123\" → returns 15-section dict (program_catalog,\n    window_urls, attachment_list, amendment_history, citation_pack, …)\n    with explicit \"行政書士法 §1 boundary — 書面作成・代理は 行政書士\" envelope.\n    Not for: 書面作成・代理申請の emission (行政書士法 §1 monopoly, NO LLM,\n    scaffold only); 採択保証・許認可保証 surface (景表法 fence); one-section\n    point lookup (use single-section tools instead)."
    },
    {
      "name": "agent_cohort_ultra_kaikeishi",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1/§3] Moat HE-6 peer group ultra — 会計士.\n\n    D+-tier ¥100 (33 units × ¥3). Returns 15 sections.\n\n    Cost-saving claim: equivalent to ~21-turn 外部 LLM multi-round\n    reasoning (¥1,500). This endpoint: ¥100 = cost 比は benchmark pending. peer group: 会計士.\n    NO LLM inference. ``公認会計士法 §47条の2`` boundary enforced.\n\n    When to use: agent serving a 公認会計士 persona needs a single-shot\n    ultra-deep peer group briefing (15 sections of scaffold material) for\n    監査調書 substrate — disclosure pointer rollup, ruleset cycle scaffold,\n    peer-group sector context, precedent citation pack. Pay-once ¥100 vs\n    ~21-turn 外部 LLM chain ¥1,500 (cost 比は benchmark pending cost).\n    For personas: 公認会計士 (監査調書 substrate gathering), AX_engineer\n    wiring a peer group-aware agent for an audit firm, researcher producing\n    reproducible 会計士 peer group briefing baselines.\n    Example: query=\"売上収益認識 IFRS 15 適用範囲の前期比較\", entity_id=\"1234567890123\" →\n    returns 15-section dict (disclosure_pointers, ruleset_cycle, peer_group,\n    precedent_citations, …) with explicit \"公認会計士法 §47条の2 boundary —\n    final 監査意見 belongs to 公認会計士\" envelope.\n    Not for: 監査意見・監査報告書 emission (公認会計士法 §47条の2 monopoly,\n    NO LLM, scaffold only); 監査適正性保証 surface (景表法 fence);\n    one-section point lookup (use he5_kaikeishi_deep / single-section\n    tools instead)."
    },
    {
      "name": "agent_cohort_ultra_shihoshoshi",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1/§3] Moat HE-6 peer group ultra — 司法書士.\n\n    D+-tier ¥100 (33 units × ¥3). Returns 15 sections.\n\n    Cost-saving claim: equivalent to ~21-turn 外部 LLM multi-round\n    reasoning (¥1,500). This endpoint: ¥100 = cost 比は benchmark pending. peer group: 司法書士.\n    NO LLM inference. ``司法書士法 §3`` boundary enforced.\n\n    When to use: agent serving a 司法書士 persona needs a single-shot\n    ultra-deep peer group briefing (15 sections of scaffold material) for\n    登記/供託/簡裁訴訟代理 surrounding context — registration history,\n    related-program scaffold, precedent pointers, citation pack. Pay-once\n    ¥100 vs ~21-turn 外部 LLM chain ¥1,500 (cost 比は benchmark pending cost).\n    For personas: 司法書士 (登記/供託 substrate gathering), AX_engineer\n    wiring a peer group-aware agent for a 司法書士 firm, researcher producing\n    reproducible 司法書士 peer group briefing baselines.\n    Example: query=\"不動産登記の本人確認情報の運用変更\", entity_id=\"1234567890123\" →\n    returns 15-section dict (registration_pointers, related_programs,\n    precedent_citations, …) with explicit \"司法書士法 §3 boundary — final\n    登記/供託/簡裁訴訟代理 belongs to 司法書士\" envelope.\n    Not for: 登記申請・供託・簡裁訴訟代理 emission (司法書士法 §3 monopoly,\n    NO LLM, scaffold only); 与信判断 or 信用情報 surface; one-section\n    point lookup (use he5_shihoshoshi_deep / single-section tools instead)."
    },
    {
      "name": "agent_cohort_ultra_zeirishi",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1/§3] Moat HE-6 peer group ultra — 税理士.\n\n    D+-tier ¥100 (33 units × ¥3). Returns 15 sections =\n    HE-5 8-section bundle + extended_case_studies + extended_law_chain\n    + implementation_usage pattern + intermediate_checkpoints + risk_register\n    + escalation_flow + handoff_schema.\n\n    Cost-saving claim: equivalent to ~21-turn 外部 LLM multi-round\n    reasoning (¥1,500). This endpoint: ¥100 = cost 比は benchmark pending. peer group: 税理士\n    (zeirishi). NO LLM inference.\n\n    When to use: agent serving a 税理士 persona needs a single-shot\n    ultra-deep peer group briefing (15 sections of scaffold material) for\n    顧問先 月次 or 期末 substrate gathering — extended case studies,\n    extended law chain, implementation usage pattern, risk register, escalation\n    flow, handoff schema. Pay-once ¥100 vs ~21-turn 外部 LLM chain\n    ¥1,500 (cost 比は benchmark pending cost).\n    For personas: 税理士 (顧問先 substrate gathering 月次/期末),\n    AX_engineer wiring a peer group-aware agent for a 税理士 firm, FDE\n    building reproducible 税理士 peer group briefing baselines.\n    Example: query=\"役員報酬の損金算入と定期同額給与\", entity_id=\n    \"1234567890123\" → returns 15-section dict (extended_case_studies,\n    extended_law_chain, implementation_usage pattern, intermediate_checkpoints,\n    risk_register, escalation_flow, handoff_schema, …) with explicit\n    \"税理士法 §52 boundary — final 税務代理 belongs to 税理士\" envelope.\n    Not for: 税務代理・税務書類作成・税務相談 emission (税理士法 §52\n    monopoly, NO LLM, scaffold only); 与信判断 or 信用情報 surface;\n    one-section point lookup (use he5_zeirishi_deep / single-section\n    tools instead)."
    },
    {
      "name": "predictive_houjin_outlook",
      "description": "[AUDIT, SENSITIVE - §52/§47条の2/§72/§1/§3] HE-5 predictive_houjin_outlook.\n\n    SUMMARY:\n        Returns the predictive_service event queue scoped to one houjin\n        within a forward-looking horizon. Wraps release dim K\n        ``predictive_service.read_events`` with deterministic filtering\n        on (target_id, event_type, scheduled_at).\n    WHEN_TO_USE:\n        Agent needs the \"what will hit this houjin in the next N days\"\n        feed (M&A watchlist, 補助金 window opening, 法令 amendment). 1\n        HE-5 call replaces the 24h source refresh + 3 filter atomic round trips.\n    WHEN_NOT:\n        Skip when the agent only needs the *current* state — use HE-1\n        ``agent_full_context`` instead. Skip when no predictive source refresh\n        has seeded events (the response is empty by design).\n    EXAMPLE:\n        predictive_houjin_outlook(\n            houjin_bangou='1234567890123',\n            horizon_days=30,\n            event_types=['program_window','amendment_diff'],\n        )\n        -> envelope with .primary_result.events_due (deterministic order).\n    COST:\n        Tier D ¥30 (10 ¥3 atomic units compressed). NO LLM. Read-only\n        JSONL append-only registry. §52/§47条の2/§72/§1/§3 envelope.\n\n    When to use: forward-looking houjin watch / 補助金 window /\n    法令 amendment alert for 1 法人 — ¥30 composite vs ~5-turn\n    外部 LLM \"scan event log + filter by houjin + filter by\n    horizon + structure deadline grid\" chain (¥225). Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest: NO LLM, JSONL read-only; empty events_due =\n    \"no scheduled events\", NOT \"no future activity\".\n    For personas: 中小企業診断士 / 行政書士 office building\n    \"顧問先 alert calendar\" widget, FDE building \"what hits\n    法人 X in 30 days\" predictive feed, agent triaging \"any\n    upcoming 補助金 / 法令 changes for this houjin\", audit team\n    reviewing alert provenance.\n    Example: predictive_houjin_outlook(houjin_bangou=\n    \"1234567890123\", horizon_days=30, event_types=\n    [\"program_window\",\"amendment_diff\"]) -> {primary_result:\n    {events_due: [{event_id: \"evt:abc\", event_type:\n    \"program_window\", target_id: \"1234567890123\", scheduled_at:\n    \"2026-06-15T00:00Z\", payload: {…}}, …], events_total: 5},\n    envelope: {tool_name: \"predictive_houjin_outlook\", lane_id:\n    \"HE-5\", schema_version: \"moat.he5.v1\"}}.\n    Not for: current state (use HE-1 / get_houjin_360_am);\n    aggregate / peer group outlook (this is single-houjin scoped);\n    LLM-style narrative summary (returns raw events only);\n    採択保証 / 認定保証 (景表法 fence — scheduled-event scaffold\n    only, NOT 採択率予測 / 未来予測); 信用 outlook (信用情報法\n    fence — public scheduled events only, NOT 与信判断); 助言\n    / 申請書面 (士業法 fence — substrate only); 個人情報 watch\n    (this is public houjin only, NOT 個人 watchlist)."
    },
    {
      "name": "session_context_lookback",
      "description": "[AUDIT, SENSITIVE - §52/§47条の2/§72/§1/§3] HE-6 session_context_lookback.\n\n    SUMMARY:\n        Replays the last N turns of a multi-turn session for an agent\n        rejoining a paused conversation. Wraps release dim L\n        ``SessionRegistry.get`` with a tail-slice projection.\n    WHEN_TO_USE:\n        Agent has a state_token from a prior open_session round and\n        needs to recover context after a process restart. 1 HE-6 call\n        avoids 5+ ``step_session`` cursor scans.\n    WHEN_NOT:\n        Skip when starting a fresh conversation — open a new session\n        with ``open_session`` instead. Skip when the conversation does\n        not need durable state (use HE-1 for one-shot context).\n    EXAMPLE:\n        session_context_lookback(\n            token_id='<32-hex-token-from-open_session>',\n            last_n_steps=5,\n        )\n        -> envelope with .primary_result.steps[5].action+payload.\n    COST:\n        Tier D ¥30 composite. NO LLM. Read-only JSON file load. 24h\n        TTL on the session itself (file expiry handled at session\n        open). §52/§47条の2/§72/§1/§3 envelope.\n\n    When to use: multi-turn agent session resumption — ¥30\n    composite vs ~5-turn 外部 LLM \"re-collect context + replay\n    decisions + reconstruct state\" chain (¥225). Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published.\n    Honest: NO LLM, file-backed JSON only; session expires 24h\n    after open_session; absence of token = \"session not found\",\n    NOT \"user has no history\".\n    For personas: AX_engineer / FDE building chat-style agent\n    with paused/resumed conversations, agent restarting after\n    timeout/crash needing prior step context, audit team\n    reviewing what an agent saw before a decision.\n    Example: session_context_lookback(token_id=\"abc123…\",\n    last_n_steps=5) -> {primary_result: {steps: [{idx: 47,\n    action: \"search_programs\", payload: {q: \"IT導入\"},\n    ts: \"2026-05-29T03:00Z\"}, …], step_total: 47},\n    envelope: {tool_name: \"session_context_lookback\",\n    lane_id: \"HE-6\", schema_version: \"moat.he6.v1\"}}.\n    Not for: starting a fresh conversation (use open_session\n    instead); one-shot stateless context (use agent_full_context\n    HE-1); LLM-style summarization of session history\n    (this returns raw steps only, not a digest); cross-session\n    pattern mining (use peer group tools); 助言/法解釈 (士業法 fence\n    — substrate only, never 法解釈/監査意見/書面作成 final);\n    PII redaction (caller-side responsibility; raw payloads\n    pass through)."
    },
    {
      "name": "rule_tree_application",
      "description": "[AUDIT, SENSITIVE - §52/§47条の2/§72/§1/§3] HE-7 rule_tree_application.\n\n    SUMMARY:\n        Evaluates a multi-step deterministic rule tree against a flat\n        context and returns the chosen action + the full rationale\n        path (which branches fired in what order). Wraps release dim M\n        ``rule_tree.load_rule_tree`` + ``evaluate_tree`` server-side.\n    WHEN_TO_USE:\n        Agent needs an audit-grade eligibility / decision tree result\n        with source_doc_ids per branch. 1 HE-7 call replaces 7+ atomic\n        evaluate_predicate calls and the merge step.\n    WHEN_NOT:\n        Skip when the agent only needs a fuzzy / semantic match — rule\n        trees are explicit ``if x == y then ...`` graphs. Skip when no\n        ``published artifact/<tree_id>.json`` exists.\n    EXAMPLE:\n        rule_tree_application(\n            tree_id='kojin_jigyo_eligibility',\n            context={'employees': 5, 'revenue_man_yen': 8000},\n        )\n        -> envelope with .primary_result.action='eligible' +\n           .rationale_path=['root','employees_lt_20','revenue_lt_10000'].\n    COST:\n        Tier D ¥30. NO LLM. Deterministic AST walk via\n        ``rule_tree.evaluator.evaluate_predicate`` (no eval(), no\n        Python exec). §52/§47条の2/§72/§1/§3 envelope."
    },
    {
      "name": "anonymized_cohort_query",
      "description": "[AUDIT, SENSITIVE - §52/§47条の2/§72/§1/§3] HE-8 anonymized_cohort_query.\n\n    SUMMARY:\n        Single audit-grade release gate for one peer group query — checks\n        k=5 floor, redacts PII fields, and appends an APPI-compliant\n        audit row to ``logs/anonymized_query_audit.jsonl``. Wraps release dim N (k_anonymity + pii_redact + audit_log).\n    WHEN_TO_USE:\n        Releasing aggregate stats sliced by peer group to an external agent\n        when the peer group might be small enough to re-identify a single\n        houjin. 1 HE-8 call replaces 3 atomic primitives + manual JSONL\n        write.\n    WHEN_NOT:\n        Skip when the peer group is internal-only (no APPI surface) — use\n        the atomic primitives directly. Skip for free-text queries —\n        HE-8 only handles row-level redact.\n    EXAMPLE:\n        anonymized_cohort_query(\n            cohort_size=12,\n            sample_row={'houjin_name':'X','revenue':1200,'address':'Y'},\n            pii_field_names=['houjin_name','address'],\n        )\n        -> envelope with .primary_result.passed_k=True, .redacted_sample\n           shows tombstones in PII fields, .audit_written=True.\n    COST:\n        Tier D ¥30 composite. NO LLM. Append-only JSONL audit per row.\n        §52/§47条の2/§72/§1/§3 envelope."
    },
    {
      "name": "explainable_evidence_chain",
      "description": "[AUDIT, SENSITIVE - §52/§47条の2/§72/§1/§3] HE-9 explainable_evidence_chain.\n\n    SUMMARY:\n        Builds an Ed25519-attestable evidence chain (fact_id + 4\n        canonical metadata fields + paragraph cite) and returns the\n        canonical payload SHA-256 ready for downstream signature.\n        Wraps release dim O ``FactMetadata`` + ``canonical_payload``.\n    WHEN_TO_USE:\n        Agent must surface a defensible source chain (audit fact for\n        a corp gov filing, contract obligation, regulatory cite). 1\n        HE-9 call replaces 3 atomic dim O primitives.\n    WHEN_NOT:\n        Skip when the agent just needs a free-text quote — use the\n        atomic citation lane. Skip when no primary source URL exists\n        — dim O requires a canonical source_doc.\n    EXAMPLE:\n        explainable_evidence_chain(\n            fact_id='fct_uuid7',\n            source_doc='https://elaws.e-gov.go.jp/.../m403',\n            extracted_at='2026-05-18T03:00:00Z',\n            verified_by='agent:audit_v3',\n            confidence=0.95,\n            paragraph_cite='第403条 ...',\n        )\n        -> envelope with .primary_result.canonical_payload_sha256 hex\n           ready for HSM/KMS Ed25519 signature.\n    COST:\n        Tier D ¥30. NO LLM. Pure dim O canonicalization +\n        ``hashlib.sha256`` (no private key in envelope by default).\n        §52/§47条の2/§72/§1/§3 envelope."
    },
    {
      "name": "composable_subsidy_audit",
      "description": "[AUDIT, SENSITIVE - §52/§47条の2/§72/§1/§3] HE-10 composable_subsidy_audit.\n\n    SUMMARY:\n        Builds a deterministic 7-step audit pipeline plan for a subsidy\n        eligibility decision. The plan composes 7 existing atomic\n        tools server-side (search_programs + get_houjin_360 +\n        eligibility_predicate + find_filing_window + list_pending_alerts +\n        walk_reasoning_chain + build_citation_envelope).\n    WHEN_TO_USE:\n        Agent must produce an audit-grade subsidy eligibility report\n        with cited reasoning. 1 HE-10 call returns the full step plan\n        (then pipe into HE-4 multi_tool_orchestrate for 1-round-trip\n        execution).\n    WHEN_NOT:\n        Skip when the agent just wants a yes/no eligibility flag — use\n        ``eligibility_predicate`` atomic directly. Skip when no\n        ``program_id`` is known yet — use ``search_programs`` first.\n    EXAMPLE:\n        composable_subsidy_audit(\n            program_id='monozukuri_2026_r1',\n            houjin_bangou='1234567890123',\n            industry_code='C',\n        )\n        -> envelope with .primary_result.audit_steps[7] in declared order.\n    COST:\n        Tier D ¥30 composite. Per memory feedback_composable_tools_pattern,\n        7 atomic ¥3 calls -> 1 ¥30 composite = 1/7 round-trip tax.\n        NO LLM. §52/§47条の2/§72/§1/§3 envelope."
    },
    {
      "name": "time_machine_program_status",
      "description": "[AUDIT, SENSITIVE - §52/§47条の2/§72/§1/§3] HE-11 time_machine_program_status.\n\n    SUMMARY:\n        Returns the nearest historical snapshot of a dataset for a\n        given as_of_date — the time-machine answer to \"what did this\n        program look like 3 years ago?\". Wraps release dim Q\n        ``SnapshotRegistry`` + ``query_as_of`` with 60-month retention.\n    WHEN_TO_USE:\n        Agent needs counterfactual / historical analysis (compare a\n        program state on date X vs Y, audit a past decision against\n        the regulatory state at that time).\n    WHEN_NOT:\n        Skip when the agent only needs the *current* state — use HE-1\n        ``agent_full_context`` or ``search_programs`` directly. Skip\n        when no monthly snapshot job has captured the dataset yet.\n    EXAMPLE:\n        time_machine_program_status(\n            dataset_id='programs',\n            as_of_date='2023-04-01',\n        )\n        -> envelope with .primary_result.nearest_snapshot.snapshot_id +\n           .as_of_date (deterministic; reason='ok' on hit).\n    COST:\n        Tier D ¥30. NO LLM. Read-only filesystem JSON. 5-year retention\n        snapshot grid. §52/§47条の2/§72/§1/§3 envelope.\n\n    When to use: counterfactual / historical audit of regulatory\n    state on a past date — ¥30 composite vs ~5-turn 外部 LLM\n    \"fetch snapshot + diff vs current + cite source + reason\n    about delta\" chain (¥225). Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest: returns\n    nearest snapshot whose as_of_date ≤ target; absence of\n    snapshot = \"no monthly job captured this dataset yet\", NOT\n    \"no historical state existed\".\n    For personas: 会計士 / 行政書士 office auditing \"what was\n    the rule on date X\" for past compliance review, agent\n    triaging \"did this program exist 3 years ago\" question,\n    audit team building \"regulatory as-of\" diff analysis,\n    AX_engineer wrapping snapshot grid as time-travel widget.\n    Example: time_machine_program_status(dataset_id=\"programs\",\n    as_of_date=\"2023-04-01\") -> {primary_result: {status: \"ok\",\n    nearest_snapshot: {snapshot_id: \"programs_2023-03-01\",\n    as_of_date: \"2023-03-01\", row_count: 11342, source_path:\n    \"s3://…\"}, reason: \"ok\", requested_date: \"2023-04-01\"},\n    envelope: {tool_name: \"time_machine_program_status\",\n    lane_id: \"HE-11\", schema_version: \"moat.he11.v1\"}}.\n    Not for: current state (use HE-1 / search_programs); future\n    state predict (use predictive_houjin_outlook HE-5); finer\n    than monthly granularity (snapshot grid is monthly); LLM-\n    style diff narrative (this returns snapshot pointer only);\n    legal admissibility of historical state (verify primary\n    source for 法的有効性 — 法解釈 fence: 弁護士法 §72); 採択\n    保証 / 認定保証 (景表法 fence — historical observation only,\n    NOT 未来予測 / 採択率予測); 個人情報 retrieval (snapshot is\n    aggregate public state, NOT 個人情報)."
    },
    {
      "name": "federated_partner_query",
      "description": "[AUDIT, SENSITIVE - §52/§47条の2/§72/§1/§3] HE-12 federated_partner_query.\n\n    SUMMARY:\n        Returns federated MCP partner recommendations ranked by gap\n        match score. Wraps release dim R ``recommend_handoff_12`` with\n        deterministic alias scoring over the 12-partner roster (DD1).\n    WHEN_TO_USE:\n        Agent has detected a gap that jpcite cannot answer and needs\n        the next best-fit MCP server (freee / GitHub / GMail / etc.).\n        1 HE-12 call replaces 3+ atomic partner-lookup calls.\n    WHEN_NOT:\n        Skip when jpcite *can* answer (use HE-1 / HE-2 / HE-3 first).\n        Skip when the agent already knows the partner id — call the\n        partner MCP directly. Skip if you want federated handoff to be\n        completed end-to-end — HE-12 only returns the *recommendation*.\n    EXAMPLE:\n        federated_partner_query(\n            query_gap='freeeのインボイス番号を取得',\n            max_results=3,\n            use_12_registry=True,\n        )\n        -> envelope with .primary_result.recommendations[3] in score order.\n    COST:\n        Tier D ¥30. NO LLM. Pure alias-scoring over a frozen 12-row\n        registry. §52/§47条の2/§72/§1/§3 envelope.\n\n    When to use: agent gap-detection routing to next-best-fit\n    federated MCP partner (freee / GitHub / GMail / etc.) — ¥30\n    composite vs ~3-turn 外部 LLM \"scan partner roster + match\n    capabilities + rank by gap + cite endpoint\" chain (¥150).\n    Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest: NO LLM, alias-scoring only over a\n    frozen 12-row registry; returns recommendation, NOT a\n    completed handoff.\n    For personas: FDE building cross-vendor agent with\n    federated MCP partners, AX_engineer routing \"jpcite can't\n    answer this — who can?\" gaps, agent detecting domain\n    boundary (e.g. invoice number lookup outside JPCITE's\n    public-info scope), audit team reviewing handoff\n    recommendations.\n    Example: federated_partner_query(query_gap=\"freeeの\n    インボイス番号を取得\", max_results=3, use_12_registry=True)\n    -> {primary_result: {status: \"ok\", query_gap: \"…\",\n    recommendations: [{partner_id: \"freee\", display_name:\n    \"freee会計\", capabilities: [\"invoice\",\"accounting\"],\n    mcp_endpoint_status: \"active\"}, …], registry_kind:\n    \"12_partner\"}, envelope: {tool_name:\n    \"federated_partner_query\", lane_id: \"HE-12\",\n    schema_version: \"moat.he12.v1\"}}.\n    Not for: jpcite-internal queries (use HE-1 / HE-2 / HE-3\n    first); end-to-end handoff completion (this only returns\n    recommendation); 与信判断 (信用情報法 fence — public\n    partner registry only, NOT 信用評価); cross-partner data\n    aggregation (each partner's API must be called separately);\n    handoff with private credentials (caller manages secrets);\n    法解釈 / 訴訟戦略 (士業法 fence — routing only, NEVER 法解釈\n    / 監査意見 / 申請書面 final); 個人情報送信 (caller redaction\n    required before handoff)."
    },
    {
      "name": "copilot_scaffold_workpaper",
      "description": "[AUDIT, SENSITIVE - §52/§47条の2/§72/§1/§3] HE-13 copilot_scaffold_workpaper.\n\n    SUMMARY:\n        Returns a deterministic 6-block copilot workpaper scaffold —\n        each block declares the canonical MCP tool the host SaaS\n        copilot should call to render live content. NO LLM inference.\n        Wraps release dim S copilot_scaffold + 5 MCP delegation hints.\n    WHEN_TO_USE:\n        Building an embedded copilot inside a SaaS (freee / MFID /\n        Patriot etc.) and the host wants the canonical block sequence\n        + the right MCP delegation chain — without paying for LLM\n        composition latency.\n    WHEN_NOT:\n        Skip when you want fully resolved content (use HE-2\n        ``prepare_implementation_workpaper`` for that). Skip when no\n        SaaS host integration is wired — use HE-1 directly.\n    EXAMPLE:\n        copilot_scaffold_workpaper(\n            host_saas_id='freee',\n            artifact_kind='houjinzei_shinkoku',\n            houjin_bangou='1234567890123',\n        )\n        -> envelope with .primary_result.blocks[6] (header + 4 MCP-\n           delegated + recommendations), scaffold_only=True.\n    COST:\n        Tier D ¥30. NO LLM (scaffold-only, per\n        feedback_copilot_scaffold_only_no_llm). MCP proxy reduces\n        agent compose tax by 5+ atomic calls. §52/§47条の2/§72/§1/§3."
    },
    {
      "name": "ma_lifecycle_compose",
      "description": "[AUDIT, SENSITIVE - §52/§47条の2/§72/§1/§3] HE-14 ma_lifecycle_compose.\n\n    SUMMARY:\n        Returns the canonical 7-phase M&A lifecycle plan with done /\n        in_progress / pending status per phase + the MCP tool each\n        phase delegates to. NO LLM. Composes release dim K-S surface\n        + ma_dd atomic + Q14 peer group packet hints.\n    WHEN_TO_USE:\n        Agent is running an M&A usage pattern (acquirer + target) and needs\n        the canonical multi-phase plan with the MCP delegation chain\n        baked in. 1 HE-14 call replaces 7 phase-by-phase round trips.\n    WHEN_NOT:\n        Skip when the agent only needs DD data — call ``post_dd_batch``\n        directly. Skip when there is no acquirer/target pair yet — use\n        ``agent_briefing_pack`` for an exploratory brief.\n    EXAMPLE:\n        ma_lifecycle_compose(\n            acquirer_bangou='1234567890123',\n            target_bangou='2345678901234',\n            current_phase='P3_dd',\n        )\n        -> envelope with .primary_result.phases[7] each tagged with\n           status + mcp_tool delegation.\n    COST:\n        Tier D ¥30. NO LLM. Deterministic 7-phase plan + MCP\n        delegation map (frozen). §52/§47条の2/§72/§1/§3 envelope.\n\n    When to use: M&A usage pattern agent needs the canonical 7-phase\n    plan (P1_origination → P7_pmi) with done/in_progress/pending\n    status + MCP delegation chain — ¥30 composite vs ~7-turn\n    外部 LLM \"structure M&A phases + assign tools + flag status +\n    cite delegation\" chain (¥350). Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest: NO LLM,\n    deterministic phase plan + frozen MCP delegation map; status\n    inferred from current_phase index only.\n    For personas: 会計士 / 弁護士 / 中小企業診断士 office building\n    \"M&A progress dashboard\", FDE building cross-vendor M&A\n    usage pattern widget, agent triaging \"what's the next M&A phase\n    for this deal\", audit team reviewing M&A lifecycle plan.\n    Example: ma_lifecycle_compose(acquirer_bangou=\n    \"1234567890123\", target_bangou=\"2345678901234\",\n    current_phase=\"P3_dd\") -> {primary_result: {status: \"ok\",\n    acquirer_bangou: \"…\", target_bangou: \"…\", current_phase:\n    \"P3_dd\", phases: [{phase_idx: 0, phase_slug: \"P1_origination\",\n    status: \"done\", mcp_tool: \"search_programs\", args_hint: \"…\"},\n    {phase_idx: 2, phase_slug: \"P3_dd\", status: \"in_progress\",\n    mcp_tool: \"post_dd_batch\", args_hint: \"…\"}, …]}, envelope:\n    {tool_name: \"ma_lifecycle_compose\", lane_id: \"HE-14\",\n    schema_version: \"moat.he14.v1\"}}.\n    Not for: DD data only (use post_dd_batch directly); no\n    acquirer/target yet (use agent_briefing_pack); LLM-style M&A\n    narrative (this returns phase grid + delegation map only); 助言\n    / 申請書面 / 法解釈 (士業法 fence — 公認会計士法 §47条の2 /\n    弁護士法 §72 — emission belongs to named 士業, scaffold only);\n    M&A 成約保証 (景表法 fence — phase plan only, NOT 成約予測);\n    与信判断 (信用情報法 fence — phase grid only, NOT 信用評価);\n    confidential deal data (this is public phase scaffold, NOT\n    secured deal-data exchange — caller's responsibility);\n    deal-specific eligibility / 規制 (use combined_compliance_check\n    or regulatory_prep_pack downstream)."
    },
    {
      "name": "deep_health_am",
      "description": "jpcite サービス全体の health check (api / mcp / billing / data freshness / dashboard 5 component の集約)。本番監視・SLA breach 検知・on-call rollover 直前確認に使う。引数なし。返却: status (\"ok\"/\"degraded\"/\"unhealthy\") / latency_ms / components dict / overall。エラー時 503 + retry_after を返し、内部例外は raise せず envelope 化。\n\n    Status is ``ok`` / ``degraded`` / ``unhealthy``. Always returns a document —\n    never raises — so callers can use it as a heartbeat. Mirrors the REST\n    endpoint ``/v1/am/health/deep`` so MCP clients can introspect liveness\n    without scraping HTTP.\n\n    Example:\n        deep_health_am()\n        → {\"status\": \"ok\", \"checks\": [{\"name\": \"primary_corpus_db\", \"ok\": true, ...}, ...]}\n\n    When NOT to call:\n        - As a substitute for real data tools — health says \"public index reachable\",\n          NOT \"your query has results\". Use search_* / get_* for content.\n        - To verify a SINGLE table's integrity → run a targeted SELECT instead.\n        - On every user request — heartbeat is for monitoring, not per-call gating.\n\n    When to use: SRE / on-call / observability platform doing\n    pre-rollover liveness check across 5-component aggregate (api /\n    mcp / billing / data freshness / dashboard) — heartbeat\n    document never raises, mirrors REST /v1/am/health/deep so MCP\n    clients can introspect liveness without scraping HTTP — ¥3 vs\n    ~4-turn 外部 LLM \"fetch /healthz + /readiness + /liveness +\n    rollup\" chain (¥240). Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest: \"public index reachable\" ≠\n    \"your query has results\"; per-call gating is the wrong layer\n    (this is for monitoring); 5 component overall is degraded if\n    ANY single critical component fails.\n    For personas: on-call engineer doing pre-rollover smoke,\n    observability platform building dashboard tile, SRE testing\n    Fly deploy post-merge, CI synthetic check, AWS canary\n    pre-burn 8-verify SOT.\n    Example: deep_health_am() → {\"status\":\"ok\", \"latency_ms\":42,\n    \"components\":{\"primary_corpus_db\":{\"ok\":true, ...},\n    \"billing\":{\"ok\":true, ...}, \"mcp\":{\"ok\":true, ...},\n    \"data_freshness\":{\"ok\":true, \"as_of\":\"2026-05-29T...\"},\n    \"dashboard\":{\"ok\":true, ...}}, \"overall\":\"ok\",\n    \"checks\":[...]}.\n    Not for: per-request gating (heartbeat is monitoring layer);\n    single-table integrity (targeted SELECT instead); data quality\n    answer (public index reachable ≠ query has rows — use search_* / get_*);\n    SLA breach root-cause (this surfaces the breach, fixes belong\n    to runbook); 503 envelope replays (caller should NOT retry\n    indefinitely — respect retry_after); business-readiness gate\n    (production gate 7/7 is at api/scripts/production_gate level)."
    },
    {
      "name": "pack_construction",
      "description": "[INDUSTRY-PACK] 建設業 (JSIC D) peer group pack: top 10 programs (建設・住宅・耐震・改修 fence) + up to 5 国税不服審判所 裁決事例 (法人税・消費税) + up to 3 通達 references (法基通・消基通). Single ¥3/billable unit. NO LLM. §52/§47条の2 sensitive — information retrieval, not 税務助言. Compounds via _next_calls.\n\n        When to use: agent is profiling a JSIC D (建設業) peer group\n        — one ¥3 call hydrates 建設 / 住宅 / 耐震 / 改修 program\n        top 10 plus 法人税 / 消費税 裁決 + 法基通 / 消基通\n        references. Use as the peer group onboarding hop before\n        drilling into per-program detail. Result envelope ships\n        a _next_calls hint so the agent can chain into the next\n        retrieval cheaply.\n        For personas: 税理士 / 建築士 / 中小企業診断士 doing\n        建設業 client onboarding; AX engineer wiring a 建設業\n        portal funnel; FDE designing a peer group scaffolding chain;\n        国土交通省 / 経済産業局 staff building peer group briefings.\n        Example: prefecture=\"大阪府\", employee_count=22,\n        revenue_yen=240000000 → returns {\"peer group\": \"JSIC_D_建設業\",\n        \"programs\": [...top 10 耐震/改修/事業再構築...],\n        \"saiketsu\": [...up to 5 法人税/消費税...], \"tsutatsu\":\n        [...up to 3 法基通/消基通...], \"_next_calls\": [...chain\n        hint...], \"schema_version\": \"industry_pack.v1\",\n        \"_billing_unit\": 1, \"no_llm\": true}.\n        Not for: 個別物件の鑑定評価 (separate axis); 過去の採択実績\n        forecasting (use outcome_acceptance_probability);\n        per-program lineage walk (use outcome_program_lineage);\n        §52 final 税務助言 (this is retrieval substrate)."
    },
    {
      "name": "pack_manufacturing",
      "description": "[INDUSTRY-PACK] 製造業 (JSIC E) peer group pack: top 10 programs (ものづくり・設備投資・省エネ・GX・事業再構築 fence) + up to 5 国税不服審判所 裁決事例 (法人税・所得税) + up to 3 通達 references (法基通). Single ¥3/billable unit. NO LLM. §52/§47条の2 sensitive — information retrieval, not 税務助言.\n\n        When to use: agent is profiling a JSIC E (製造業) peer group\n        — one ¥3 call hydrates the ものづくり / 設備投資 /\n        省エネ / GX / 事業再構築 program top 10 plus 法人税 /\n        所得税 裁決 + 法基通 references for downstream walk.\n        Use as the peer group onboarding entry point before drilling\n        into per-program lineage or tax precedent. No LLM, no\n        税務助言, no 採択 prediction.\n        For personas: 税理士 / 中小企業診断士 doing 製造業 client\n        onboarding; AX engineer wiring a SME 製造業 portal funnel;\n        FDE designing a peer group scaffolding chain where one call\n        must hydrate programs + 判例 + 通達 axes; 経済産業局 staff\n        building peer group briefings.\n        Example: prefecture=\"愛知県\", employee_count=40,\n        revenue_yen=520000000 → returns {\"peer group\": \"JSIC_E_製造業\",\n        \"programs\": [...top 10 ものづくり/GX/再構築...],\n        \"saiketsu\": [...up to 5...], \"tsutatsu\": [...up to 3\n        法基通...], \"schema_version\": \"industry_pack.v1\",\n        \"_billing_unit\": 1, \"no_llm\": true}.\n        Not for: 過去の採択実績 forecasting (use\n        outcome_acceptance_probability for predictive axis);\n        per-program lineage walk (use program_full_context /\n        outcome_program_lineage); 税理士法 §52 final 助言 (this is\n        retrieval substrate, 税理士 reviews 採択 / 控除 判断)."
    },
    {
      "name": "pack_real_estate",
      "description": "[INDUSTRY-PACK] 不動産業 (JSIC K) peer group pack: top 10 programs (不動産・空き家・住宅・賃貸 fence) + up to 5 国税不服審判所 裁決事例 (所得税・相続税・法人税) + up to 3 通達 references (所基通・相基通). Single ¥3/billable unit. NO LLM. §52/§47条の2 sensitive — information retrieval, not 税務助言.\n\n        When to use: agent is profiling a JSIC K (不動産業) peer group\n        — assembling a single ¥3 retrieval pack with top 10 補助金\n        / 助成金 programs plus 国税不服審判所 裁決 + 通達 references\n        in one call. Use this before drilling into individual\n        program detail or tax precedent walk. Pure registry rollup;\n        no LLM inference, no 税務助言 emission.\n        For personas: 税理士 doing 不動産 client peer group scoping;\n        建築士 / 宅地建物取引士 surveying landlord-side incentives;\n        AX engineer wiring a 不動産 portal funnel; FDE designing\n        a peer group onboarding flow where one call must hydrate\n        programs + 判例 + 通達 axes.\n        Example: prefecture=\"東京都\", employee_count=12,\n        revenue_yen=180000000 → returns {\"peer group\": \"JSIC_K_不動産業\",\n        \"programs\": [...top 10...], \"saiketsu\": [...up to 5...],\n        \"tsutatsu\": [...up to 3 所基通/相基通...],\n        \"schema_version\": \"industry_pack.v1\", \"_billing_unit\": 1,\n        \"no_llm\": true}.\n        Not for: 個別物件の鑑定評価 (鑑定3手法 — use\n        koushi_kakaku_lookup + realestate_recent_deals for\n        evidence retrieval, not 鑑定意見); 税務助言 final 判断\n        (§52 fence — 税理士 reviews the pack); 過去の採択実績 prediction\n        (cohort_match / outcome_acceptance_probability for\n        forecasting axis)."
    },
    {
      "name": "industry_scale_region_view",
      "description": "[N7 peer group VIEW] Resolve a 業界(JSIC) × 規模(scale_class) × 地域(prefcode/citycode) peer group over source-derived dataset (~4,935 rows). Returns peer group statistics: program_ids/program_count, judgment_ids/judgment_count, tsutatsu_ids/tsutatsu_count, adoption_count, popularity_rank within the JSIC major, plus the matched jsic_name_ja + resolved prefecture. Tier B (¥6). NO LLM, NO HTTP, deterministic structured public index lookup. §52/§47条の2/§72/§1/§3 envelope — peer group membership only, NOT eligibility advice.\n\n    When to use: agent has a 業界 / 規模 / 地域 triple and needs the\n    peer group statistics (program_ids, judgment_ids, tsutatsu_ids,\n    adoption_count, popularity_rank within JSIC major) in one\n    deterministic structured public index lookup. ¥6 vs ~5-turn 外部 LLM peer group\n    enumeration (¥300). Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published.\n    For personas: 中小企業 経営者 (自社 peer group 業界×規模×地域 view),\n    行政書士 (顧問先 peer group segment lookup), AX_engineer wiring an\n    industry-scale-region picker UI, FDE 顧客 segment-aware substrate.\n    Example: jsic=\"D\", scale_class=\"中小\", prefcode=\"13000\",\n    citycode=None → returns {primary_result: {jsic: \"D\",\n    jsic_name_ja: \"建設業\", scale_class: \"中小\", prefecture:\n    \"東京都\", program_ids: [...], program_count: N, judgment_ids:\n    [...], judgment_count: M, tsutatsu_ids: [...], tsutatsu_count: K,\n    adoption_count: A, popularity_rank: R}, _billing_unit: 2,\n    _pricing_tier: \"B\"} envelope. citycode collapses to prefecture\n    with citycode_grain_note.\n    Not for: jsic letter outside A-U (rejected as invalid_argument);\n    scale_class outside {個人, 小規模, 中小, 中堅, 大企業} (rejected);\n    eligibility advice emission (peer group membership only — final\n    eligibility belongs to 士業 / 行政庁); 与信 / 信用情報 surface."
    },
    {
      "name": "invoice_risk_lookup",
      "description": "[R8-INVOICE-REVIEW] T-number 単発 review lookup. invoice_registrants × houjin_master を機械的照合し、0-100 score + tax_credit_eligible boolean + 6 ヶ月 / 1 年経過 heuristic で review_band (clear / caution / verify / block) を返す。NO LLM。§52 fence on 仕入税額控除 territory。\n\n        When to use: agent already holds a T-number (適格事業者番号\n        = T + 13 digits) on an invoice and wants a single-call risk\n        envelope (clear / caution / verify / block) before approving\n        the 仕入税額控除 entry. Public-registry-only score; no LLM,\n        no advisory opinion.\n        For personas: 経理 doing invoice approval; 税理士 verifying\n        client 仕入税額控除 prerequisites; AX engineer wiring an\n        invoice-ingest pipeline that needs scoring per row; FDE\n        designing 取引先 KYC stage where T-number lookup is the\n        primary gate.\n        Example: tnum=\"T8010001213708\" → returns {\"tnum\":..., \"risk\":\n        {\"band\": \"clear\", \"score\": 12, \"tax_credit_eligible\": true,\n        \"months_since_registration\": 27}, \"schema_version\":\n        \"r8.invoice.v1\", \"_billing_unit\": 1, \"no_llm\": true}.\n        Not for: 与信判断 / 信用調査 substitute (信用情報法 fence —\n        this is registry status, not creditworthiness); 仕入税額\n        控除 適用可否 final 助言 (税理士法 §52 fence — agent /\n        税理士 reviews the band, agent does not act on it without\n        税理士 sign-off); batch fan-out (use invoice_risk_batch\n        instead — single call is metered as 1 unit)."
    },
    {
      "name": "invoice_risk_batch",
      "description": "[R8-INVOICE-REVIEW] T-number 一括 review lookup (最大 100 件 / 1 metered call)。各 item は invoice_review_lookup と同じ envelope shape (review={…} or error=\"…\")。経理 fan-out で取引先一覧を 1 call で scoring する用途。NO LLM。§52 fence。\n\n        When to use: agent holds a list of T-numbers (up to 100) from\n        a monthly invoice export and wants to score them all in one\n        metered call rather than 100 separate lookups — saves\n        round-trips for 経理 fan-out / 取引先 reconciliation /\n        monthly close audit. Single billing unit covers the entire\n        batch.\n        For personas: 中小企業 経理 担当 doing monthly 仕入税額\n        控除 close; 税理士 month-end client review; AX engineer\n        building an invoice ledger batch scorer; FDE designing\n        nightly KYC refresh job over 取引先 master.\n        Example: tnums=[\"T8010001213708\",\"T1234567890123\",\"...\"] →\n        returns {\"results\": [{...same envelope as single lookup...},\n        ...], \"metered_call\": 1, \"schema_version\": \"r8.invoice.v1\",\n        \"no_llm\": true}. Per-item error envelopes preserve order so\n        the agent can join back to the original ledger row.\n        Not for: real-time per-row scoring (use single\n        invoice_review_lookup); lists > 100 (split and call twice — the\n        100 cap is hard); 与信判断 substitute (信用情報法 fence);\n        税務代理 / 税務助言 emission (税理士法 §52 fence — agent\n        consumes the band; final 仕入税額控除 適用 decision rests\n        with 税理士)."
    },
    {
      "name": "houjin_invoice_status",
      "description": "[R8-INVOICE-REVIEW] 法人番号 → 適格事業者番号 resolve + review envelope。invoice_registrants 側で houjin_bangou が見つからない場合は invoice_registration_number=null + registered=False + score=100 (block) を返す。NO LLM。§52 fence。\n\n        When to use: agent has a 13-digit 法人番号 and wants to\n        resolve it to the corresponding 適格事業者 (qualified invoice\n        issuer) status + review score in a single call — useful for\n        経理 onboarding, 取引先 KYC verification, or 仕入税額控除\n        前提条件 audit.\n        For personas: 税理士 doing 仕入税額控除 verification;\n        中小企業 経理 担当 onboarding new 取引先; FDE wiring\n        invoice-status check into 経理 SaaS; AX engineer building\n        bulk 取引先 risk dashboard (use invoice_risk_batch for fan-out).\n        Example: bangou=\"1234567890123\" → returns {bangou,\n        invoice_registration_number, registered, score, risk_factors,\n        _disclaimer}; if not registered → {invoice_registration_number:\n        null, registered: False, score: 100, risk_factors: [...]}.\n        Not for: 税務代理 (税理士法 §52 fence — status lookup is\n        reference, NOT 確定申告 prep); 与信判断 (信用情報法 — invoice\n        status is one signal among many, not 与信 substitute); bulk\n        100+ lookup (use invoice_risk_batch); 個人事業主 number lookup\n        without 法人番号 (this is 法人 path only)."
    },
    {
      "name": "jpcite_route",
      "description": "Route a user request to the cheapest sufficient P0 jpcite action. Free, deterministic, no external calls.\n\n        When to use: at the very start of an agent turn, when the user goal\n        is in free text and you don't yet know which paid packet (if any)\n        to buy. ``jpcite_route`` reads the goal + ``input_kind`` hint and\n        returns the cheapest sufficient outcome_contract_id (or \"no paid\n        action needed\") plus the next-step recipe. Always cheaper than\n        speculatively calling ``jpcite_preview_cost`` on every contract.\n        For personas: AX_engineer / FDE building agentic apps that must\n        cost-bound every turn; 税理士 / 行政書士 peer group agents that route\n        free-text client questions to the right downstream tool. See the\n        Agent Cost Sankey for the ¥3-240 envelope baseline.\n        Example: goal=\"過去の採択実績を出して\", input_kind=\"subsidy\",\n        max_price_jpy=240 → returns\n        {\"recommended_outcome_contract_id\": \"acceptance_probability\",\n        \"preview_call\": \"jpcite_preview_cost\", \"free_fallback\": [...]}\n        as a deterministic routing decision, no LLM, no network.\n        Not for: actually executing the work (use the returned\n        ``preview_call`` then ``jpcite_execute_packet``); LLM-style chat\n        compose (this is a routing classifier, not a generator); routing\n        across non-jpcite tools (federated MCP recommendation is a\n        separate surface — see ``federated_mcp_recommend``)."
    },
    {
      "name": "jpcite_preview_cost",
      "description": "Preview price, known gaps, consent needs, and no-hit caveat before a paid packet. Free.\n\n        When to use: AFTER ``jpcite_route`` has returned an\n        outcome_contract_id and BEFORE ``jpcite_execute_packet``. This\n        tool is the only sanctioned way to obtain the canonical price\n        envelope, the known data gaps (so the user is informed of\n        no-hit / partial-hit risk), and the consent needs (e.g. PII\n        upload, ToS acknowledgement) — required by the fail-closed\n        execute path. Always FREE.\n        For personas: every persona that touches a paid packet — 税理士\n        / 会計士 / 司法書士 / 行政書士 / 社労士 peer group agents and\n        AX_engineer / FDE apps. The preview output is what the agent\n        should render in a paywall / consent UX before charging.\n        Example: outcome_contract_id=\"adoption_heatmap\",\n        max_price_jpy=120 → returns\n        {\"price_jpy\": 30, \"known_gaps\": [...], \"consent_needs\": [...],\n        \"no_hit_caveat\": \"...\"} — fully deterministic, single structured public index\n        read, no AWS side-effect, no LLM.\n        Not for: actually buying the packet (use\n        ``jpcite_execute_packet`` after operator consent); rendering\n        retail prices on a marketing page (use ``site/pricing.html``\n        SOT); 助言-style cost justification (士業法 fence — agent\n        composes the user-facing justification from this raw data)."
    },
    {
      "name": "jpcite_execute_packet",
      "description": "Fail-closed execute entrypoint. It does not charge until accepted-artifact billing is wired.\n\n        When to use: as the final step of the\n        ``jpcite_route → jpcite_preview_cost → user consent →\n        jpcite_execute_packet`` flow. Only after the user (or\n        scoped_cap_token holder) has accepted the previewed price + the\n        consent needs. The path is fail-closed: missing token /\n        idempotency_key returns an error envelope rather than charging.\n        For personas: every peer group persona that completes a paid\n        outcome — 税理士 / 会計士 / 行政書士 / 司法書士 / 社労士 — plus\n        agent-integration engineers wiring a metered payment rail.\n        ``scoped_cap_token`` is the post-consent capability handle issued\n        by the payment rail; ``idempotency_key`` is the caller-side\n        guarantee for at-most-once execution.\n        Example: outcome_contract_id=\"adoption_heatmap\", a valid\n        capability token, idempotency_key=\"job-2026-05-28-001\",\n        max_price_jpy=120 → returns the artifact reference plus the\n        charged amount when metered billing is wired; else returns the\n        fail-closed envelope WITHOUT charging.\n        Not for: free preview (use ``jpcite_preview_cost``); cost\n        routing (use ``jpcite_route``); fetching an already-materialized\n        packet (use ``jpcite_get_packet``); ad-hoc 助言 generation\n        (士業法 fence — this is a packet executor, not an advice\n        composer)."
    },
    {
      "name": "jpcite_get_packet",
      "description": "Retrieve a P0 packet if materialized. Free and deterministic; no absence claim is made.\n\n        When to use: when the agent already has a ``packet_id`` (or\n        release_capsule_id) — either from a prior\n        ``jpcite_execute_packet`` response, a webhook event, or a user\n        link — and wants the materialized JSON payload. FREE call, pure\n        structured public index + filesystem read. Returns the packet body if found;\n        returns a structured \"not_materialized\" envelope otherwise\n        WITHOUT claiming the packet does not exist (it may be queued).\n        For personas: AX_engineer / FDE polling for an async\n        packet-ready event; 税理士 / 会計士 peer group agents resuming a\n        client task from a saved packet_id; long-running orchestrators\n        that fan out execute → poll get_packet.\n        Example: packet_id=\"rc1-p0-bootstrap-2026-05-28-001\" →\n        returns the full packet JSON if materialized, or\n        {\"status\": \"not_materialized\", \"retry_after_seconds\": 30, ...}\n        if still being produced. No charge regardless.\n        Not for: creating / executing a new packet (use\n        ``jpcite_execute_packet``); listing all available packet types\n        (use ``cost-calc`` or static catalog); 助言-style\n        interpretation of packet contents (士業法 fence — the agent\n        finishes the user-facing prose from the raw packet body)."
    },
    {
      "name": "search_kokkai_utterance",
      "description": "[KOKKAI] public dataset 国会会議録 keyword + date filter. Returns top rows with 3-axis citation (source_url + retrieved_at + sha256). Sensitive (§52 / §47条の2 / §72 / §3) — disclaimer envelope mandatory. NO LLM, single ¥3/billable unit billing.\n\n        When to use: agent is researching legislative intent for a\n        税法 / 業法 / 規制 (e.g. 税理士法, 適格請求書, AI規制) and\n        wants verbatim 国会会議録 utterances with full citation chain\n        (source URL + retrieved_at + sha256) — typical second call\n        after search_laws when the agent wants 議事録 context for\n        statutory interpretation substrate. Cite-ready, no LLM, no\n        synthesis.\n        For personas: 行政書士 / 税理士 / 弁護士 researching\n        legislative intent before drafting an opinion (with explicit\n        sign-off); 中小企業診断士 referencing a 制度趣旨 in 経営\n        診断; researcher producing reproducible legislative-history\n        corpora; AX engineer wiring a \"what did Diet say about X\"\n        retrieval surface.\n        Example: law_keyword=\"適格請求書\", date_from=\"2023-01-01\",\n        date_to=\"2024-12-31\", limit=10 → returns {\"law_keyword\":...,\n        \"rows\":[{\"date\":..., \"house\":..., \"committee\":..., \"speaker\":\n        ..., \"utterance\":\"...\", \"source_url\":..., \"retrieved_at\":...,\n        \"sha256\":...}, ...], \"schema_version\":\"kokkai.utterance.v1\",\n        \"no_llm\": true, \"_disclaimer\":\"§52/§72/§3 fence\"}.\n        Not for: 法解釈 final emission (弁護士法 §72 fence —\n        utterances are substrate, not interpretation); 税務助言\n        (税理士法 §52 / §47条の2); 政治的中立性 violation (avoid\n        framing utterances as endorsement — 政治資金規正法 §3 fence);\n        synthesis of \"what did the Diet conclude\" — returns verbatim\n        excerpts only, agent + 士業 author any synthesis."
    },
    {
      "name": "search_shingikai_minutes",
      "description": "[SHINGIKAI] public dataset 審議会 議事録 keyword filter. Returns top rows with 3-axis citation. Sensitive (§52 / §47条の2 / §72) — disclaimer envelope mandatory. NO LLM, single ¥3/billable unit billing.\n\n        When to use: when the agent needs to trace a 制度 / 通達 /\n        法令 BACK to the 審議会 (advisory council) deliberation that\n        produced it — for \"この制度はどの審議会で決まった?\" / \"ガイド\n        ライン の根拠は?\" provenance questions. deterministic retrieval keyword\n        search over shingikai_minutes. Each row carries the 3-axis\n        citation (source_url + retrieved_at + sha256) needed for\n        evidence-grade output. ¥3/billable unit. NO LLM.\n        For personas: 弁護士 / 弁理士 / 行政書士 peer group agents\n        building 行政 process audit trails; 中小企業診断士 / 税理士\n        peer group agents understanding 制度 design intent for client\n        memos; FDE building 規制 lineage tooling.\n        Example: council=\"個人情報保護委員会\",\n        agenda_keyword=\"生成AI\", limit=20 →\n        {\"results\": [{\"minutes_id\": \"...\", \"council\": \"...\",\n        \"agenda\": \"...\", \"date\": \"2025-12-...\",\n        \"source_url\": \"https://...\", \"retrieved_at\": \"...\",\n        \"sha256\": \"...\"}], \"disclaimer\": \"...\"}.\n        Not for: 国会 議事録 (use ``search_kokkai_utterances`` —\n        public dataset sister tool); LLM-style 議論要約 generation (士業法\n        fence — agent composes from the rows); free-text 全文 search\n        across other corpora (use ``opensearch_hybrid_search``);\n        speaker-attribution analysis (the row schema preserves the\n        original 発言者 but the agent must compose narrative claims)."
    },
    {
      "name": "unified_lifecycle_calendar",
      "description": "Returns merged calendar of tax sunset + program sunset + application close + law cliff events. Output is search-derived from public-source data; verify primary source (source_url) for business decisions.\n\n        WHAT: 4 source (source-derived dataset.effective_until / source-derived dataset\n        .effective_* (ISO のみ) / source-derived dataset.application_close_date /\n        source-derived dataset.last_amended) を UNION + bucket した event 一覧を返す。\n        kind ∈ {tax_sunset, program_sunset, amendment_snapshot,\n        application_close, law_amendment}。severity は forward-looking で\n        critical (≤30d) / warning (≤90d) / info (それ以外)。\n\n        WHEN:\n          - 「2026 年下半期に切れる税制+補助金 申請窓口を 1 画面で」\n          - 「半期 (H1/H2) 単位で何が cliff か」(granularity='half_year')\n          - 事業計画 / 投資判断 / 監査の sunset カレンダー作成\n\n        WHEN NOT:\n          - 税制のみ + 大綱 cliff bucket → list_tax_sunset_alerts\n          - 申請可能な program list → list_open_programs / active_programs_at\n          - 単一 program の lifecycle 履歴 → evaluate_program_lifecycle\n\n        RETURNS (envelope):\n          {\n            calendar: [\n              {period: \"YYYY-MM\"|\"YYYY-H1\"|\"YYYY-H2\",\n               events: [{kind, entity_id, title, date, severity, ...}]},\n              ...\n            ],\n            total_events: int,\n            severity_counts: {critical, warning, info},\n            window: {start_date, end_date, granularity, window_days},\n            data_as_of: str,                # JST today\n            sources_used: [str, ...],       # per-source source coverage\n            data_quality: {                 # honest caveats\n              amendment_snapshot_caveat: str,\n              law_amendment_coverage: str,\n            },\n            _disclaimer: str,\n          }\n\n        DATA QUALITY HONESTY: source-derived dataset は ISO YYYY-MM-DD\n        として読める effective_* のみ採用し、非 ISO 文字列を calendar に出さない。\n        source-derived dataset.last_amended も 28,048 中 ISO parseable は 101 行のみ。\n        残り (raw 改正履歴 string) は本 tool 範囲外。\n\n        WINDOW CAP: end - start <= 366 日。1 年超は code='out_of_range' で\n        422 相当を返す。多年スイープは年単位 pagination が必要。\n\n        CHAIN:\n          ← `list_tax_sunset_alerts` で税制のみ深掘り。\n          → `get_am_tax_rule(entity_id)` で個別 rule 詳細。\n          → `list_open_programs` で kind='application_close' の補助金本体探索。"
    },
    {
      "name": "program_lifecycle",
      "description": "[LIFECYCLE] Returns source-linked snapshot of program status (abolished / superseded / sunset_imminent / sunset_scheduled / amended / active / not_yet / unknown). Most rows lack historical diffs (eligibility change marker chain partial); use effective_from for filtering.\n\n        WHAT: `source-derived dataset` (14,596 rows / effective_from filled\n        on 140 rows / effective_until filled on 4 rows) と `source-derived dataset`\n        (successor_of=190 / replaces=9) を precedence 順で評価。LLM 推論\n        ゼロ、 deterministic retrieval。amendment_snapshot 由来の判定は known data-quality caveat\n        に従い ``confidence='low'`` で返却。\n\n        WHEN:\n          - 「事業再構築補助金 は今も使えるか?」(後継制度有無 + 終了予定)\n          - 「2026 年改正で影響受ける制度?」 (amended / sunset_imminent)\n          - 「申請前 に廃止リスクを 1 コールで確認したい」\n\n        WHEN NOT:\n          - 全税制 sunset list → list_tax_sunset_alerts\n          - 法令本文 → get_law_article_am\n          - 補助率/上限額 詳細 → search_programs + raw_json\n\n        RETURNS:\n          {\n            unified_id, name, record_kind, canonical_status,\n            status: one of [\n              'abolished', 'superseded', 'sunset_imminent',\n              'sunset_scheduled', 'amended', 'active',\n              'not_yet', 'unknown'\n            ],\n            status_label_ja: <Japanese label>,\n            evidence: {\n              amendment: { version_seq, effective_from_raw, effective_until_raw, source_url, ... } | null,\n              relation:  { relation_type, target_entity_id, confidence, ... } | null,\n              effective_dates: { effective_from: 'YYYY-MM-DD'|null, effective_until: 'YYYY-MM-DD'|null }\n            },\n            confidence: 'low' | 'medium' | 'high',\n            reason: <one-line determinism-trace>,\n            as_of: 'YYYY-MM-DD',\n            _disclaimer: 'Lifecycle status is derived from public-source snapshots; verify source_url before decisions.'\n          }\n\n        Errors return the canonical envelope:\n          - missing_required_arg : unified_id empty / whitespace\n          - invalid_date_format  : as_of did not parse as YYYY-MM-DD\n          - db_unavailable       : source database temporarily unavailable"
    },
    {
      "name": "program_abstract_structured",
      "description": "I18N — Returns audience-targeted, closed-vocab Japanese abstract for a single program. Translation is the customer LLM's job; we never call Anthropic API. official_name_ja + legal_id must stay verbatim (i18n_hints.official_name_must_keep_ja=true). Output is search-derived; verify primary source (source_urls) for application use.\n\n    WHAT: Reshapes ``programs.enriched_json`` into a 5-audience-aware,\n    ISO-style closed-vocab JSON. Returns only original Japanese\n    strings + finite enums — the customer LLM owns rendering into\n    en/vi/id/th/zh-CN/fil.\n\n    WHEN:\n      - 在日外国人雇用主が雇用助成金一覧を多言語で提示したい\n      - 税理士が顧問先 (外国人) に税制優遇制度を説明したい\n      - VC が投資先の R&D 補助金 portfolio を英文で投資委員会に出したい\n\n    WHEN NOT:\n      - 単純な検索 → search_programs (this tool returns 1 record only)\n      - 翻訳済テキストが欲しい → 呼び出し元側の LLM / 翻訳処理で実施\n      - 制度の as-of 履歴 → query_at_snapshot\n\n    Args:\n      program_id: unified_id ('UNI-...').\n      audience:   Closed enum, default 'foreign_employer'.\n\n    Returns:\n      JSON dict with the shape documented in the module docstring,\n      or the canonical error envelope on failure.\n\n    When to use: i18n abstract for 1 制度 to non-JA audience —\n    ¥3 vs ~4-turn 外部 LLM \"fetch program + extract eligibility +\n    structure into 5-audience template + i18n hints\" chain (¥240).\n    Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest: official_name_ja + legal_id stay\n    verbatim (never translate); translation is customer LLM's job;\n    output is search-derived (verify source_urls for application).\n    For personas: 在日外国人雇用主 reading 雇用助成金 in en/vi/id/\n    th/zh-CN/fil, 税理士 explaining 税制優遇 to 外国人 顧問先, VC\n    presenting R&D 補助金 portfolio in English to 投資委員会,\n    FDE building multilingual program-detail widget, agent\n    triaging \"show me this 補助金 for a foreign-employer audience\".\n    Example: program_abstract_structured(program_id=\"UNI-16b8d86302\",\n    audience=\"foreign_employer\") -> {program_id: \"UNI-…\",\n    official_name_ja: \"…\", legal_id: \"…\", audience:\n    \"foreign_employer\", eligibility: {…}, deadline: \"…\",\n    documents: […], contact_route: {…}, i18n_hints:\n    {render_languages_supported: [\"en\",\"vi\",\"id\",\"th\",\"zh-CN\",\n    \"fil\"], official_name_must_keep_ja: true, …},\n    source_urls: [\"…\"]}.\n    Not for: 単純検索 (use search_programs; this returns 1 record);\n    翻訳済テキスト (caller-side LLM); as-of 履歴 (use\n    query_at_snapshot); 採択保証 / 認定保証 (景表法 fence —\n    candidate scaffold only); 助言 / 申請書面作成 (士業法 fence —\n    税理士法 §52 / 行政書士法 §1 — emission belongs to named 士業);\n    legal_id / official_name_ja translation (must stay verbatim);\n    bulk i18n of 11K+ programs (1 record per call)."
    },
    {
      "name": "find_municipal_program_pdf",
      "description": "[M1 MUNICIPAL PDF] 自治体補助金 PDF metadata + Textract OCR 抜粋を 1-call で返す scaffold tool。W1 AWS 実行検証 ($4,939, Textract 1,718 PDF, 24-48h) 着地前は seed manifest (150 自治体) + SHA-256 placeholder signature。着地後は public corpus source-derived dataset から OCR 全文 + Ed25519 attestation を返す。\n\n        Pricing: ¥12 (Tier C composite — 4 × ¥3 atomic units: manifest read + filter + sig compute + OCR fetch placeholder).\n\n        WHEN_TO_USE:\n          * 自治体補助金 PDF の URL / freshness / OCR 抜粋を 1-call で取得したい\n          * 北区 (13117) / 板橋区 (13119) など Q1 / Q6 peer group fail を unblock したい\n          * agent が PDF 全文を fetch する前に metadata + freshness で gating したい\n          * Ed25519 attestation chain を pre-wire したい (今は placeholder、W1 着地で real)\n\n        WHEN_NOT_TO_USE:\n          * 自治体補助金の構造化 row (募集要綱 / 締切 / 助成額) が欲しい\n            → find_municipality_subsidies (DD2, ¥3) を使う\n          * 政令市の管下区 (例 横浜市青葉区) の PDF が欲しい\n            → 横浜市親 (citycode=14100) を呼び、W1 着地後の OCR 抜粋で区別する\n          * 国 (経産省 / 中企庁) の補助金 PDF が欲しい\n            → search_programs (¥3) で program_id 起点に直接 fetch\n          * 既知の Ed25519 fact_id の検証だけしたい\n            → fact_signature_verify_am (¥3) を直接呼ぶ\n\n        EXAMPLE INPUT:\n          find_municipal_program_pdf(prefcode=\"13000\", citycode=\"13117\", query=\"創業補助金\", limit=5)\n\n        EXAMPLE OUTPUT:\n          {\n            \"matches\": [\n              {\n                \"pdf_url\": \"https://www.city.kita.tokyo.jp/business/business-support/index.html\",\n                \"title\": \"東京都北区 補助金 / 助成金 index (placeholder — W1 Textract OCR pending)\",\n                \"freshness_iso\": \"2026-05-18\",\n                \"ed25519_sig\": \"<64-hex-char SHA-256 placeholder>\",\n                \"ocr_excerpt\": \"\",\n                \"_attest_status\": \"placeholder_pending_a_lands\",\n                \"prefcode\": \"13000\", \"citycode\": \"13117\", \"city_name\": \"東京都北区\",\n                \"tier\": \"priority_city\", \"verification_status\": \"anchor_verified\",\n                \"s3_prefix\": \"municipal_program_ocr/13000/13117/\"\n              }\n            ],\n            \"total\": 1,\n            \"source\": \"municipal_pdf_seed_2026_05_18 + textract OCR (pending W1 wet-run)\",\n            \"_attest_status\": \"placeholder_pending_a_lands\",\n            \"_billing_unit\": 4,\n            \"_next_calls\": [...]\n          }\n\n        Output is byte-stable for identical inputs (deterministic SHA-256 sig). NO LLM call. Single ¥12 Tier C billing event."
    },
    {
      "name": "search_municipality_subsidies",
      "description": "[MUNICIPALITY] 自治体補助金 page-diff listing over the dedicated municipality table. This dataset can be empty on the current public corpus; use `search_programs` for sellable broad 支援制度 discovery unless this tool returns rows. Returns rows with subsidy_url + retrieved_at + sha256 (3-axis citation) + per-row source_attribution (政府著作物 §13). NOT §52/§47条の2/§72/§3 sensitive (pure listing). NO LLM, single ¥3/billable unit when rows are available.\n\n        When to use: agent is sweeping a populated 自治体補助金\n        listing for a 都道府県 (+ optional 自治体名) and wants the\n        1次資料 listing — subsidy URL + retrieved_at + sha256 +\n        政府著作物 §13 attribution. If the result is empty or reports\n        a known gap, fall back to `search_programs` / `get_program`\n        over the broad 11,601-row public program catalog.\n        For personas: 中小企業診断士 / 行政書士 / 社労士 advising\n        a 自治体 peer group; AX engineer wiring a 自治体 portal\n        funnel; FDE designing a 自治体 補助金 watch service;\n        自治体 / 商工会議所 staff aggregating their own surface\n        for citation export.\n        Example: pref=\"東京都\", muni_name=\"新宿区\",\n        keyword=\"設備\", limit=20 → returns {\"rows\": [{\"muni_name\":\n        \"新宿区\", \"subsidy_url\": \"...\", \"retrieved_at\":\n        \"2026-05-28T...\", \"sha256\": \"...\", \"source_attribution\":\n        \"政府著作物 §13 — 出典明記必須\", \"subsidy_name\": \"...\",\n        \"eligibility_text\": \"...\", ...}, ...up to 20...],\n        \"schema_version\": \"municipality_subsidy.v1\",\n        \"_billing_unit\": 1, \"no_llm\": true}.\n        Not for: per-applicant eligibility 判定 (separate axis —\n        cohort_match for fit, hojo_decision for live judgement);\n        過去の採択実績 forecasting (use outcome_acceptance_probability);\n        per-自治体 申請書作成 (§1 fence — 行政書士 reviews);\n        body fetching from the URL (the tool returns listing\n        rows only; agent / customer LLM fetches body if needed);\n        claiming live all-municipality coverage before row evidence."
    },
    {
      "name": "find_saiketsu",
      "description": "[DISCOVER-CASE-LAW] 国税不服審判所 (KFS) 公表裁決事例 を全文検索 (FTS5 trigram on nta_saiketsu)。出力は citation のみで税務助言 (税理士法 §52) ではない。出典 source_url で原典確認必須。\n\n        WHAT: Returns matching 裁決事例 rows with title / fiscal_period / tax_type /\n        decision_date / decision_summary / source_url. The full text is not\n        returned (cite by source_url instead — file size discipline).\n\n        WHEN:\n          - \"居住者判定で争われた裁決事例は?\"\n          - \"重加算税の隠ぺい仮装認定が覆った事例\"\n          - \"外国子会社合算税制の取消事例 直近 3 年\"\n\n        WHEN NOT:\n          - 通達の条文を直接引きたい → ``cite_tsutatsu``.\n          - 国税庁公式の質疑応答 → ``find_shitsugi``.\n          - 文書回答事例 (事前照会回答) → ``find_bunsho_kaitou``.\n\n        RETURN: {total, limit, offset, results[{volume_no, case_no,\n        decision_date, fiscal_period, tax_type, title, decision_summary,\n        source_url}], _disclaimer}.\n\n        LIMITATIONS:\n          - Coverage is 直近 ~5 年 of published 裁決事例. 古い volume rows are\n            ingested incrementally — older years may show 0 hits.\n          - tax_type is parsed from KFS volume index <h2> labels and may be\n            empty for some rows.\n          - decision_date may be NULL when the page header lacks a 元号 date.\n\n        When to use: 税理士 / 弁護士 / agent triaging KFS 公表裁決\n        事例 on a specific dispute pattern (居住者判定, 重加算税,\n        外国子会社合算税制 取消) — ¥3 vs ~7-turn 外部 LLM \"search\n        KFS index + locate 裁決 + extract 争点 + 判断\" chain (¥420).\n        Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest: citation + source_url only; full text\n        NOT returned (cite via source_url for primary verification).\n        For personas: 税理士 office prepping a 不服申立 / 審査請求\n        (similar-pattern grounding), 弁護士 office building a\n        税務訴訟 brief (裁決→判例 chain), FDE building \"show me KFS\n        rulings on 重加算税\" widget, agent triaging \"did taxpayers\n        ever win on X argument?\" question.\n        Example: find_saiketsu(query=\"居住者判定\",\n        tax_type=\"所得税\", year_from=2020, limit=5) → {total:8,\n        results:[{volume_no:\"122\", case_no:\"3\",\n        decision_date:\"2024-01-15\", fiscal_period:\"令和3年分\",\n        tax_type:\"所得税\", title:\"...\", decision_summary:\"...\",\n        source_url:\"https://www.kfs.go.jp/...\"}, ...],\n        _disclaimer:\"<§52>\"}.\n        Not for: 通達条文 (cite_tsutatsu); 一般 Q&A (find_shitsugi);\n        文書回答事例 (find_bunsho_kaitou); 税務代理 / 税務助言\n        (税理士法 §52 fence — agent surfaces citations, final\n        助言 / 代理 belongs to 税理士); 法解釈 final ruling\n        (substrate only — 裁決 is one tribunal's call, 判例 may\n        differ); 与信判断 (信用情報法 fence — public ruling\n        record only, not 与信)."
    },
    {
      "name": "cite_tsutatsu",
      "description": "[CITE-TSUTATSU] Lookup a 通達 article by code. Returns title + body excerpt + source_url. 出力は citation のみで税務助言 (税理士法 §52) ではない。\n\n        WHAT: Direct lookup against ``nta_tsutatsu_index`` (which projects\n        `source-derived dataset` rows where ``article_kind='tsutatsu'``). For deep\n        dives use the existing ``get_law_article_am`` tool with the\n        ``law_canonical_id`` returned here.\n\n        WHEN:\n          - \"法基通 9-2-3 の本文を引きたい\"\n          - \"所基通 36-1 の発出時期は?\"\n          - \"消基通 5-1-1 を citation した resp の source_url は?\"\n\n        WHEN NOT:\n          - 法令本文 (措置法・基本三法) → ``get_law_article_am``.\n          - 裁決事例 → ``find_saiketsu``.\n          - Q&A 形式の事例 → ``find_shitsugi``.\n\n        RETURN: {total: 0|1, results[{code, law_canonical_id, article_number,\n        title, body_excerpt, parent_code, source_url, last_amended}], _disclaimer}.\n        Returns 0 results if the code does not match an indexed row — the\n        ingest source refresh may not have refreshed yet, or the code uses a\n        non-canonical separator.\n\n        LIMITATIONS:\n          - Only 法人税基本通達 / 消費税基本通達 are fully ingested at present\n            (~2,007 articles). 所得税基本通達 / 相続税基本通達 / 財産評価基本通達\n            are pending — those codes will return 0 until the ingest source refresh lands.\n          - body_excerpt is the first 500 chars; the full body lives in\n            `source-derived dataset.text_full`` (use ``get_law_article_am``)."
    },
    {
      "name": "find_shitsugi",
      "description": "[DISCOVER-QA] 国税庁 質疑応答事例 を全文検索 (FTS5 trigram on nta_shitsugi)。出力は citation のみで税務助言 (税理士法 §52) ではない。出典 source_url で原典確認必須。\n\n        WHAT: Returns matching Q&A pairs with question (照会要旨) / answer\n        (回答要旨) / related_law (関係法令通達) / category / source_url.\n\n        WHEN:\n          - \"ガス爆発事故の損害賠償金は課税? 質疑応答事例\"\n          - \"医療費控除 通勤費 質疑応答\"\n          - \"中小企業者の判定 消費税 公式 Q&A\"\n\n        WHEN NOT:\n          - 通達条文の直接引用 → ``cite_tsutatsu``.\n          - 裁決例 → ``find_saiketsu``.\n          - 文書回答事例 (事前照会回答) → ``find_bunsho_kaitou``.\n\n        RETURN: {total, limit, offset, results[{slug, category, question,\n        answer, related_law, source_url}], _disclaimer}.\n\n        LIMITATIONS:\n          - Coverage tracks 国税庁公開ページ which may be ~10,000 items;\n            ingest is incremental and a freshly-launched 質疑応答 may not\n            appear for 1-7 days.\n          - related_law is free-text and may concatenate multiple law refs.\n\n        When to use: 税理士 / 公認会計士 office triaging \"is there a\n        precedent 国税庁 Q&A on this edge case\" — paginated FTS5 trigram\n        search over the 質疑応答事例 corpus with optional 税目 category\n        filter (9 categories: shotoku / gensen / joto / sozoku / hyoka /\n        hojin / shohi / inshi / hotei). ¥3 vs ~4-turn 外部 LLM \"search\n        NTA Q&A + filter by category + paginate\" chain (¥240). Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest: ingest is incremental — a 質疑応答 published\n        within the last 1-7 days may not appear yet.\n        For personas: 税理士 office answering a client's edge-case\n        消費税 / 所得税 / 法人税 question with NTA precedent retrieval,\n        公認会計士 office cross-checking 税効果会計 stance against NTA\n        Q&A, 中小企業 keieisha self-research before approaching a 税理士,\n        FDE building a 税務 Q&A panel surfacing NTA primary sources.\n        Example: question_kw=\"医療費控除 通勤費\", category=\"shotoku\",\n        limit=10, offset=0 → returns {total:N, limit:10, offset:0,\n        results:[{slug:\"…\", category:\"shotoku\", question:\"…\",\n        answer:\"…\", related_law:\"所得税法 第73条…\", source_url:\n        \"https://www.nta.go.jp/…\"}, …], _disclaimer:\"…\"}.\n        Not for: question_kw < 1 char (rejected with hint); 通達 直接引用\n        (use cite_tsutatsu); 裁決例 retrieval (use find_saiketsu); 文書\n        回答事例 (use find_bunsho_kaitou); 税務助言 emission (税理士法\n        §52 fence — output is citation only, NEVER 税務代理 / 助言);\n        proof of \"no NTA precedent\" claim (incremental ingest has 1-7\n        day gap — absence is NOT exhaustive); related_law parsing\n        as structured data (free-text, may concatenate multiple law refs)."
    },
    {
      "name": "find_bunsho_kaitou",
      "description": "[DISCOVER-RULING] 国税庁 文書回答事例 (事前照会回答) を全文検索。出力は citation のみで税務助言 (税理士法 §52) ではない。出典 source_url で原典確認必須。\n\n        WHAT: 文書回答事例 are formal NTA written responses to pre-ruling\n        inquiries from taxpayers. Each row contains 照会の趣旨 + 回答 +\n        response_date + source_url.\n\n        WHEN:\n          - \"M&A における持株会社化の文書回答\"\n          - \"事業承継税制 適用関係 文書回答\"\n          - \"ストックオプション 文書回答\"\n\n        WHEN NOT:\n          - 一般 Q&A → ``find_shitsugi``.\n          - 裁決例 (争訟結果) → ``find_saiketsu``.\n          - 通達条文 → ``cite_tsutatsu``.\n\n        RETURN: {total, limit, offset, results[{slug, category, response_date,\n        request_summary, answer, source_url}], _disclaimer}.\n\n        LIMITATIONS:\n          - 文書回答事例 are 事案固有の判断 — citing one as 一般則 is risky.\n            Always read the 照会の趣旨 carefully before using the response in\n            advice.\n          - Some older 文書回答 are PDF-only and parsing is best-effort —\n            answer may be truncated or empty.\n\n        When to use: 税理士 office or agent triaging a specific\n        pre-ruling fact pattern (M&A 持株会社化, 事業承継 適用関係,\n        ストックオプション) — ¥3 vs ~7-turn 外部 LLM \"search NTA\n        Q&A + locate written response + extract 照会の趣旨 + 回答\"\n        chain (¥420). Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest: citation only, NEVER\n        税務助言 / 税務代理; one response is 事案固有 and citing\n        it as 一般則 is risky — always read 照会の趣旨 first.\n        For personas: 税理士 office prepping a 事前照会 (照会の趣旨\n        case-pattern grounding), 行政書士 office referencing\n        pre-ruling in cross-domain matters, FDE building \"show me\n        NTA written responses on topic X\" widget, agent triaging\n        \"is there a written response on this M&A scheme?\" question.\n        Example: find_bunsho_kaitou(topic=\"事業承継税制 適用関係\",\n        limit=5) → {total:23, results:[{slug:\"...\",\n        category:\"sozoku\", response_date:\"2024-03-15\",\n        request_summary:\"...\", answer:\"...\",\n        source_url:\"https://www.nta.go.jp/...\"}, ...],\n        _disclaimer:\"<§52>\"}.\n        Not for: 一般 Q&A (find_shitsugi); 裁決例 / 争訟結果\n        (find_saiketsu); 通達条文 (cite_tsutatsu); 税務代理 /\n        税務助言 (税理士法 §52 fence — agent shows the citation,\n        final 助言 / 代理 belongs to 税理士); 一般則 の確定\n        (事案固有判断 is the explicit scope — substrate only)."
    },
    {
      "name": "opensearch_hybrid_search",
      "description": "[PREVIEW — pending_upstream_lane] OpenSearch BM25 + kuromoji hybrid search contract. Returns a zero-billing preview envelope unless an operator-configured live endpoint is available. NOT an 採択 forecast — 行政書士法 §1 / 税理士法 §52 / 弁護士法 §72 fence.\n\n        When to use: agent has a free-text JA / EN query and needs\n        to search across the full jpcite unified corpus (program /\n        law / law_article / case / adoption / court / invoice /\n        enforcement — ~600K docs, 8 corpora) with kuromoji-analyzed\n        BM25 + optional vector hybrid. Use as 1st-stage retrieval\n        before reranking (e.g., feed into rerank_results).\n        For personas: AX engineer building 2-stage retrieval (this\n        + cross-encoder rerank); FDE composing search-driven agent\n        UX; 税理士 / 弁護士 / 行政書士 research pipeline; peer group\n        lead tuning retrieval breadth × filter scope.\n        Example: query=\"輸出免税 証憑\", corpus_kind=\"case\",\n        prefecture=\"東京都\", top_n=20 → returns {hits: [{corpus_kind,\n        doc_id, title, snippet, score, _highlight}, ...], total,\n        _disclaimer}.\n        Not for: 採択 forecast (this is retrieval, not prediction);\n        legal opinion (弁護士法 §72 fence); 申請代理 (行政書士法 §1);\n        税務代理 (税理士法 §52); large-result-set bulk export (cap\n        top_n=50); private / 未公開 docs (corpus is 公開資料 only)."
    },
    {
      "name": "outcome_houjin_360",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1] release outcome — 法人 due diligence 360. Heavy ¥900 (3 ¥3 units). NO LLM. Returns JPCIR envelope (Evidence + OutcomeContract + citations + known_gaps) from precomputed S3 packet.\n\n        When to use: agent wants a single-call \"everything we know\n        about this 法人\" rollup — precomputed JPCIR envelope\n        bundling registry, 採択 history, 行政処分, invoice status,\n        亍管轄, and lineage citations. Heavy packet (¥900 = 3 ¥3\n        units) — only when the agent commits to a full DD scope.\n        For personas: 中小企業診断士 / 経営コンサル building a\n        full 経営診断書 substrate; AX engineer prefetching a\n        counterparty profile for batch KYC; FDE wiring an entity-\n        360 summary panel; researcher producing reproducible DD\n        snapshots. NOT a credit report.\n        Example: houjin_bangou=\"8010001213708\" → returns\n        {\"houjin_bangou\":..., \"evidence\":{...registry rollup...},\n        \"outcome_contract\":{...JPCIR fields...}, \"citations\":[...],\n        \"known_gaps\":[...], \"schema_version\":\"wave59.houjin360.v1\",\n        \"no_llm\": true, \"metered_units\": 3}.\n        Not for: real-time per-row scoring (use cheaper houjin_\n        resolve / invoice_review_lookup — this is heavy); 与信判断 /\n        信用調査 substitute (信用情報法 fence — public registry\n        only); 法解釈 (弁護士法 §72 fence); 税務代理 / 申請代理\n        prep (税理士法 §52 / 行政書士法 §1 fence — agent / 士業\n        author the prose, jpcite supplies the substrate); novel\n        houjin synthesis (this returns precomputed S3 packet only)."
    },
    {
      "name": "outcome_program_lineage",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1] release outcome — 制度系譜 (amendment lineage). Mid ¥600 (2 ¥3 units). NO LLM. Returns JPCIR envelope with predecessor/successor chain from source-derived dataset.\n\n        When to use: agent has a specific 制度 / 補助金 / 法令 program_id and needs the multi-version amendment lineage (predecessor → current → successor) to ground a \"this rule replaced X / will sunset to Y\" claim with citable snapshot evidence. Returns JPCIR envelope (Evidence + OutcomeContract + citations + known_gaps); client agent finishes the prose. NO LLM-inferred lineage — pure snapshot graph from source-derived dataset.\n        For personas: 税理士 / 行政書士 / 中小企業診断士 peer group agents tracking 制度 transitions across fiscal years; AX_engineer building amendment-aware compliance dashboards.\n        Example: program_id=\"jp_subsidy_jigyou_shoukei_2024\" → JPCIR envelope with predecessor_chain[] + successor_chain[] + snapshot_dates + citations.\n        Not for: real-time amendment monitoring (use list_pending_alerts or amendment_alert tools); cross-program comparison (use search_programs); free-text 制度 lineage interpretation (士業法 fence — agent composes)."
    },
    {
      "name": "outcome_acceptance_probability",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1] release outcome — 採択事例 peer group observation. Mid ¥600 (2 ¥3 units). NO LLM. Returns JPCIR envelope with source-linked observed peer group counts from source-derived adoption records.\n\n        When to use: agent has a specific 補助金 / 制度 program_id + industry (JSIC major) + prefecture context and wants observed historical adoption examples and peer group counts as ingredient evidence — NOT a forecast, acceptance-rate claim, or guarantee. Returns JPCIR envelope (Evidence + OutcomeContract + citations + known_gaps); client agent finishes the user-facing recommendation prose. NO 士業 act of advice — pure historical peer group observation from source-derived adoption records.\n        For personas: 税理士 / 中小企業診断士 / 行政書士 peer group agents qualifying client expectations before drafting an application; AX_engineer surfacing \"your peer group has N observed adoption records with cited sources\" decision support.\n        Example: program_id=\"jp_subsidy_monodukuri_2024\", industry_jsic=\"C\", prefecture=\"13\" → JPCIR envelope with observed_adoption_record_count + sample_size + cohort_size + known_gaps.\n        Not for: free-text \"will I be accepted\" advice (士業法 fence — agent composes); single-houjin scoring (use find_gap_programs); future-period projection (this is historical only)."
    },
    {
      "name": "outcome_tax_ruleset_phase_change",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1] release outcome — 税制段階変更. Mid ¥600 (2 ¥3 units). NO LLM. Returns JPCIR envelope with tax-rule + 通達 + 改正履歴 chain.\n\n        When to use: when the agent needs the FULL historical chain of\n        税制 phase changes for a specific tax rule — base 法令条文 +\n        all 通達 + 改正 history with effective_from / sunset_at — to\n        ground \"この税率はいつから適用?\" / \"この段階区分はいつ変わる?\"\n        / \"経過措置はいつまで?\" questions. Reads precomputed release\n        JPCIR envelope, NOT a live SQL join. ¥600 / 2 ¥3 units. NO LLM.\n        For personas: 税理士 / 会計士 peer group agents preparing 申告書\n        cross-FY phase changes; FDE building 税制 timeline UI.\n        Example: rule_id=\"jp_tax_corporate_phase_3_2026\" →\n        {\"envelope_kind\": \"jpcir\", \"evidence\": {...},\n        \"outcome_contract\": {...}, \"citations\": [law/tsutatsu/amendment\n        triples], \"known_gaps\": [...]}. JPCIR envelope format.\n        Not for: live SQL over 通達 (use ``search_tsutatsu`` for ad-hoc);\n        LLM-style 税制 advice generation (士業法 fence — agent\n        composes user-facing prose from the chain); cross-tax-type\n        comparison (use ``outcome_regulatory_q_over_q_diff`` for\n        quarter-over-quarter diff). Run ``jpcite_preview_cost`` first\n        to surface the ¥600 price + consent needs."
    },
    {
      "name": "outcome_regulatory_q_over_q_diff",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1] release outcome — 法令改正 Q-over-Q diff. Heavy ¥900 (3 ¥3 units). NO LLM. Returns JPCIR envelope with quarterly law diff.\n\n        When to use: when the agent needs the side-by-side OLD vs NEW\n        diff of a 法令 over a single fiscal quarter — with\n        article-level deletions, additions, and modifications + the\n        downstream 通達 ripple. Powers \"前四半期と比べて何が変わった?\"\n        questions. Reads precomputed release JPCIR envelope. ¥900 / 3\n        ¥3 units (heavy). NO LLM. NO live e-Gov fetch.\n        For personas: 税理士 / 会計士 peer group agents reviewing 改正\n        impact on client positions; 弁護士 peer group agents preparing\n        amendment-impact memos; 中小企業診断士 advising on regulatory\n        changes affecting a 制度.\n        Example: law_id=\"405AC0000000088\" (個人情報保護法),\n        fiscal_quarter=\"2026-Q1\" → {\"envelope_kind\": \"jpcir\",\n        \"evidence\": {...}, \"outcome_contract\": {...}, \"citations\": [\n        old/new article triples + tsutatsu ripple], \"known_gaps\": [...]}.\n        Not for: full law history (use ``outcome_program_lineage`` for\n        program-side lineage); single-article fetch (use\n        ``find_laws_cited_by_case`` or ``search_chunks``); 助言-style\n        impact assessment generation (士業法 fence — agent composes\n        the user-facing impact memo from the diff). Run\n        ``jpcite_preview_cost`` first to surface the ¥900 + consent."
    },
    {
      "name": "outcome_enforcement_seasonal_trend",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1] release outcome — 行政処分季節性. Light ¥300 (1 ¥3 unit). NO LLM. Returns JPCIR envelope with monthly enforcement-action seasonality.\n\n        When to use: when the agent needs the MONTHLY rollup of 行政\n        処分 (administrative enforcement actions) for a JSIC major\n        industry — to ground \"今 監査 / 立入検査 が増える時期?\" or\n        \"業界 D の処分は春が多いのか\" peer group timing questions. Reads\n        precomputed release JPCIR envelope from\n        source-derived dataset. ¥300 / 1 ¥3 unit (lightest tier). NO\n        LLM. peer group-level only, NOT per-houjin.\n        For personas: 弁護士 / 行政書士 peer group agents advising\n        client risk-period; 中小企業診断士 peer group agents preparing\n        coupled 内部統制 plans; AX_engineer building a 業界 seasonality\n        dashboard.\n        Example: jsic_major=\"D\" (建設業) →\n        {\"envelope_kind\": \"jpcir\", \"evidence\": {...},\n        \"outcome_contract\": {...}, \"monthly_counts\": [\n        {\"month\": \"01\", \"actions\": 12}, ...], \"citations\": [...],\n        \"known_gaps\": [...]}. JPCIR envelope format.\n        Not for: per-houjin enforcement history (use\n        ``get_houjin_360_am``); cross-industry comparison (use\n        ``outcome_prefecture_program_heatmap`` for spatial heatmap);\n        LLM-style risk-period forecasting (士業法 fence — agent\n        composes from the seasonality data); single-month spike root\n        cause analysis (run ``search_case_facts`` on related cases)."
    },
    {
      "name": "outcome_bid_announcement_seasonality",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1] release outcome — 入札季節性. Light ¥300 (1 ¥3 unit). NO LLM. Returns JPCIR envelope with monthly bid-announcement seasonality.\n\n        When to use: when the agent needs the MONTHLY rollup of 入札\n        公告 (bid announcements) for a specific ministry / agency — to\n        ground \"MAFF の補助金 公告 は何月が多い?\" or \"経産省 入札の\n        山はいつ?\" timing questions. Reads precomputed release JPCIR\n        envelope from source-derived dataset. ¥300 / 1 ¥3 unit\n        (lightest tier). NO LLM.\n        For personas: 中小企業診断士 peer group agents helping clients\n        time 入札 entry; 行政書士 peer group agents preparing 入札 dossier\n        rollout calendars; AX_engineer building a 入札 公告 calendar\n        widget.\n        Example: ministry_code=\"maff\" (農林水産省) →\n        {\"envelope_kind\": \"jpcir\", \"evidence\": {...},\n        \"outcome_contract\": {...}, \"monthly_counts\": [\n        {\"month\": \"04\", \"announcements\": 78}, ...], \"citations\": [\n        bid links], \"known_gaps\": [...]}. JPCIR envelope.\n        Not for: per-bid 公告 detail (use ``search_chunks`` against\n        bid corpus); cross-ministry comparison (call this tool per\n        ministry and compose); 助言-style 入札戦略 generation (士業法\n        / 入札 fairness fence — agent composes); 落札 history (use\n        a separate awards lookup tool). Run ``jpcite_preview_cost``\n        first."
    },
    {
      "name": "outcome_succession_event_pulse",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1] release outcome — 事業承継 event pulse. Mid ¥600 (2 ¥3 units). NO LLM. Returns JPCIR envelope with succession-event signal + program matcher.\n\n        When to use: when the agent needs the 事業承継 signal pulse\n        for a specific 法人 — 代表者 generational change, capital\n        change, structure change, M&A signal — plus the matching\n        事業承継 補助金 / 税制特例 lookup. Powers \"この会社、承継\n        フェーズに入った?\" + \"使える 事業承継 制度は?\" 1-call. ¥600\n        / 2 ¥3 units. NO LLM.\n        For personas: 中小企業診断士 / 税理士 peer group agents\n        diagnosing 承継 readiness; 司法書士 peer group agents preparing\n        承継 registry changes; M&A FDE building 承継 pipeline tools.\n        Example: houjin_bangou=\"1234567890123\" →\n        {\"envelope_kind\": \"jpcir\", \"evidence\": {...},\n        \"outcome_contract\": {...}, \"succession_signals\": [{type,\n        observed_at, severity}], \"matching_programs\": [{program_id,\n        deadline}], \"citations\": [...], \"known_gaps\": [...]}.\n        Not for: real-time 法人登記 fetch (use ``get_houjin_360_am``\n        for current 360 snapshot); 助言-style 承継戦略 generation\n        (士業法 fence — agent composes from the signals + matching\n        programs); pre-承継 valuation (use a separate valuation\n        tool). Run ``jpcite_preview_cost`` first for the ¥600 +\n        consent envelope."
    },
    {
      "name": "outcome_prefecture_program_heatmap",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1] release outcome — 47 都道府県 × 制度 heatmap. Mid ¥600 (2 ¥3 units). NO LLM. Returns JPCIR envelope with prefecture × program heatmap rollup.\n\n        When to use: when the agent needs a 47 都道府県 × 制度 type\n        rollup (program counts + 採択額 totals + 採択率 by region) for\n        a specific prefecture's perspective. Powers \"東京都の 補助金\n        密度は他県と比べて?\" / \"Heatmap で見たい\" geographic\n        comparison surfaces. ¥600 / 2 ¥3 units. NO LLM. Reads\n        precomputed release + release JPCIR envelope.\n        For personas: 中小企業診断士 peer group agents preparing 進出\n        recommendations; 行政書士 peer group agents comparing 自治体\n        制度 coverage; AX_engineer building a 地方移転 / 補助金\n        heatmap dashboard.\n        Example: prefecture=\"東京都\" → {\"envelope_kind\": \"jpcir\",\n        \"evidence\": {...}, \"outcome_contract\": {...},\n        \"heatmap_rows\": [{program_type, count, total_amount_yen,\n        adoption_rate}], \"neighbors\": [{prefecture, distance, ...}],\n        \"citations\": [...], \"known_gaps\": [...]}.\n        Not for: 1 prefecture × 1 制度 detail (use\n        ``programs_by_region_am`` for raw rows); cross-prefecture\n        arbitrage opportunity (use ``outcome_cross_prefecture_arbitrage``\n        for prefecture-A vs prefecture-B gap analysis); 助言-style\n        進出 recommendation generation (士業法 / 不動産業法 fence —\n        agent composes). Run ``jpcite_preview_cost`` first."
    },
    {
      "name": "outcome_cross_prefecture_arbitrage",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1/§3] release outcome — 都道府県間アービトラージ. Heavy ¥900 (3 ¥3 units). NO LLM. Returns JPCIR envelope with cross-prefecture program gap + 移転メリット rollup.\n\n        When to use: when the agent needs a SIDE-BY-SIDE comparison of\n        two prefectures' 制度 coverage + 採択 economics + 移転メリット\n        delta — for \"東京 vs 北海道 — どちらが補助金的に有利?\" type\n        decision support. Heavy ¥900 / 3 ¥3 units, NO LLM. Reads\n        release + release precomputed JPCIR envelope, NOT a live\n        prefecture join.\n        For personas: 中小企業診断士 peer group agents helping 拠点移転\n        decisions; 行政書士 / 税理士 peer group agents preparing 移転\n        cost-benefit memos; FDE building a 拠点最適化 engine.\n        Example: prefecture_a=\"東京都\", prefecture_b=\"北海道\" →\n        {\"envelope_kind\": \"jpcir\", \"evidence\": {...},\n        \"outcome_contract\": {...}, \"gap_rows\": [{program_type,\n        a_count, b_count, a_total_yen, b_total_yen, delta_yen}],\n        \"transfer_benefits\": [...], \"citations\": [...],\n        \"known_gaps\": [...]}. JPCIR envelope.\n        Not for: single-prefecture heatmap (use\n        ``outcome_prefecture_program_heatmap``); per-houjin 移転\n        scenario (use ``get_houjin_360_am`` then this tool);\n        助言-style 拠点移転 recommendation (士業法 / 宅建業法 /\n        景表法 fence — agent composes the user-facing recommendation\n        from the gap data). Run ``jpcite_preview_cost`` first for\n        the ¥900 + consent envelope."
    },
    {
      "name": "policy_upstream_watch",
      "description": "[POLICY_UPSTREAM] public dataset cross-axis upstream signal rollup. Per keyword: kokkai count + shingikai count + ongoing-pubcomment count + most-recent evidence URL on each axis. Drives \"what should I be watching this week\" digests for any keyword set in 1 ¥3 call. NO LLM, single ¥3/billable unit billing. §52/§47条の2/§72/§1 envelope mandatory.\n\n        When to use: agent has 1..20 業法 / 制度 keyword (e.g. ['DX', 'GX', '事業承継'])\n        and wants a cross-axis upstream signal rollup over the past watch_period_days\n        (default 90) — kokkai utterance count + shingikai minutes count + ongoing pubcomment\n        count + most-recent evidence URL on each axis. Drives \"what should I watch this\n        week\" digests. Single ¥3/billable unit.\n        For personas: 税理士 / 公認会計士 producing monthly \"tax-rule pipeline\" briefing\n        scaffold (final §52 / §47条の2 belongs to respective peer group); 弁護士 / 司法書士\n        monitoring 業法 amendment pipeline (final §72 / §3 belongs to respective peer group);\n        FDE / journalist tracking 政策上流 signals; AX_engineer wiring a \"policy-pipeline\n        digest\" widget; researcher producing reproducible upstream-signal time series.\n        Example: keywords=[\"DX\", \"GX\", \"事業承継\"], watch_period_days=90 → per-keyword\n        kokkai_count + shingikai_count + pubcomment_count + recent_evidence_url + envelope.\n        Not for: free-text 法解釈 / 税務助言 / 監査意見 emission (use peer group artifact\n        builders; final 法解釈 / 税務代理 / 監査意見 belongs to 弁護士 / 税理士 / 公認会計士);\n        per-topic deep timeline (use policy_upstream_timeline); future-amendment date\n        prediction (this is past-tense signal rollup, NOT forecast). NO LLM inference\n        inside this tool."
    },
    {
      "name": "policy_upstream_timeline",
      "description": "[POLICY_UPSTREAM] public dataset single-topic timeline across 5 stages (kokkai → shingikai → pubcomment → law_amendment → program_launch). Each event carries 3-axis citation (source_url + retrieved_at + sha256) + lead_time_horizon_months. NO LLM, single ¥3/billable unit billing. §52/§47条の2/§72/§1 envelope mandatory.\n\n        When to use: agent has a single 業法 / 制度 keyword\n        (e.g. '事業承継' / '適格請求書' / 'AI規制') and\n        wants the merged chronological timeline across all\n        5 upstream stages — 国会 → 審議会 → パブコメ → 法\n        改正 → 制度 launch — each event tagged with 3-axis\n        citation + lead_time_horizon_months so the caller\n        can estimate \"how long until this hits a regulated\n        peer group\". deterministic retrieval union across upstream tables;\n        no LLM; descriptive timeline surfacing.\n        For personas: コンプライアンス担当 building upstream\n        radar dashboard; 弁護士 / 税理士 / 行政書士 /\n        公認会計士 tracking 制度 lead time (NOT 法解釈\n        emission); 中小企業 経営者 doing forward-looking\n        policy planning; AX engineer wiring a \"policy\n        timeline\" widget; FDE composing regulatory-radar\n        surface; researcher producing reproducible\n        lead-time corpora.\n        Example: topic=\"事業承継\", limit=50 → returns\n        {\"topic\":\"事業承継\",\"timeline\":[{\"stage\":\"kokkai\",\n        \"event_date\":\"2025-11-12\",\"title\":\"...\",\"source_url\":\n        ...,\"retrieved_at\":\"...\",\"sha256\":\"...\",\n        \"lead_time_horizon_months\":18}, {\"stage\":\n        \"shingikai\", ...}, {\"stage\":\"pubcomment\", ...},\n        {\"stage\":\"law_amendment\", ...}, {\"stage\":\n        \"program_launch\", ...}], \"n\":42, \"schema_version\":\n        \"deep46.policy_timeline.v1\", \"no_llm\": true,\n        \"_billing_unit\":1, \"disclaimer\":\"§52/§47条の2/§72/§1\n        envelope\"}.\n        Not for: 法解釈 emission (弁護士法 §72 fence — timeline is\n        descriptive surfacing, NOT 法解釈); 監査意見 (公認会計士法 §47\n        条の2 fence); 税務代理 (税理士法 §52 fence); 申請代理 (行政書士法\n        §1); 制度 enactment / 採択 保証 (景表法 fence — lead time is\n        statistical, NOT enactment guarantee)."
    },
    {
      "name": "portfolio_optimize_precomputed_am",
      "description": "Top 8 program ranked recommendations for a 法人 (precomputed daily). Reads source-derived dataset (data update, regular source refresh) — distinct from compatibility_tools.portfolio_optimize_am which composes source-derived dataset at request time. Optimized flow for 税理士 顧問先 fan-out. NO LLM, 1 ¥3 billable unit. §52/§1/§72 envelope."
    },
    {
      "name": "houjin_risk_score_am",
      "description": "0-100 composite review score for a 法人 (daily refresh). 40 enforcement + 30 invoice + 15 adoption + 15 credit_age. Pure SELECT against source-derived dataset. NO LLM, 1 ¥3 billable unit. §52 envelope."
    },
    {
      "name": "program_forecast_30yr_am",
      "description": "30-year x 12-month Markov chain forecast for a program (monthly refresh). Returns per-(year, month) state distribution over {active, paused, sunset, renewed} + expected_call_count cumulative. Pure SELECT against source-derived dataset. NO LLM, 1 ¥3 unit. Not §52 sensitive — statistical projection."
    },
    {
      "name": "alliance_opportunities_am",
      "description": "Top 10 partner 法人 候補 for a source 法人 (weekly refresh). Composes co-adoption + JSIC chain + size balance + region proximity into a 0-100 score. Pure SELECT against source-derived dataset. NO LLM, 1 ¥3 billable unit. §52/§1/§72 envelope."
    },
    {
      "name": "graph_vec_search_am",
      "description": "Top-k semantic similar entity via structured public index-vec k-NN over source-derived dataset (503,930 rows x 12 record_kinds). deterministic retrieval k-NN on precomputed embeddings. NO LLM at request time. 1 ¥3 unit. \n\nWhen to use: when the agent has a free-text query and wants the top-k most semantically similar public corpus entities (法人 / 制度 / 法令 / 判例 / 通達 / 採択事例) in one call. Uses the precomputed source-derived dataset* tables (release Axis 4 + downstream embeddings) with a deterministic hash-fallback when no embedding model is registered. Cheaper than hitting OpenSearch for low-stakes similarity questions; equivalent ordering when an embedding model is materialized. For personas: AX_engineer / FDE building agentic search UX; 税理士 / 会計士 / 行政書士 peer group agents looking up 似た制度 / 類似 判例 / 同業 法人 for context grounding. Example: query_text='ものづくり補助金 採択戦略', record_kinds=['program','case'], top_k=10 → {'results': [{'record_kind': 'program', 'entity_id': '...', 'score': 0.82, 'name_ja': 'ものづくり補助金', ...}], 'model_id': 'sentence-jpcite-v1', 'dim': 768}. Deterministic, NO LLM, single structured public index scan. Not for: production-grade semantic search (use opensearch_hybrid_search for tuned BM25 + dense hybrid); cross-encoder reranking (use rerank_results); LLM-style answer generation from the top-k (士業法 fence — agent composes from the entity rows); single-kind lookup with strong filter (use the kind-specific tool — e.g. search_programs)."
    },
    {
      "name": "prerequisite_chain",
      "description": "[R5-PREREQUISITE-CHAIN] Returns curated prerequisite chain for a program (認定 / 計画 / 登録) with preparation_time_days + preparation_cost_yen. Coverage is partial (135/8,203 programs = 1.6%); empty chain ≠ no prerequisites — verify primary source (公募要領 / obtain_url).\n\n        WHAT: `source-derived dataset` (795 rows / 135 programs / 1.6%\n        coverage) を起点に、対象 program の前提取得物を kind 別 (cert /\n        plan / membership / agency_relation / id / doc) に列挙し、\n        ``preparation_time_days`` + ``preparation_cost_yen`` を集計。\n        ``related_canonical_id`` が解決済の rung は ``depth`` 分まで再帰\n        (現状 100% NULL のため depth=1 化、forward-compat)。\n\n        WHEN:\n          - 「ものづくり補助金で加点を取るために要る認定は?」\n          - 「事業再構築補助金、申請前に何を整える?(認定・登録・会員)」\n          - 「前提取得だけで何ヶ月 / いくら掛かるか?」\n\n        WHEN NOT:\n          - 補助金そのものの探索 → search_programs\n          - 認定の詳細仕様 → search_certifications + get_program\n          - 適格・除外判定 → rule_engine_check\n          - tax 措置の sunset → list_tax_sunset_alerts\n\n        RETURNS (envelope):\n          {\n            program_id: str,\n            prerequisite_chain: [\n              { kind, name, required_or_optional, preparation_time_days,\n                preparation_cost_yen, obtain_url, rationale,\n                related_canonical_id, depth }, ...\n            ],\n            total_preparation_time_days: int,\n            total_preparation_cost_yen: int,\n            realistic: bool,                # depth<=5 AND time<=180d AND cost<=¥1M\n            warnings: [ str, ... ],         # depth>5 / time / cost cliffs\n            data_quality: {\n              coverage_pct: 1.6,            # surfaced unconditionally\n              programs_with_bundle: 135,\n              programs_total: 8203,\n              recursion_resolvable: bool,\n              caveat?: str                  # present when chain is empty\n            },\n            _disclaimer: str                # 一次資料 / 専門家 advisory\n          }\n\n        DATA QUALITY HONESTY: 1.6% coverage means 98.4% of programs have\n        no curated bundle yet. The tool ALWAYS surfaces\n        ``data_quality.coverage_pct`` so an empty chain is never read as\n        authoritative — silent miss is forbidden under 景表法 / 消費者\n        契約法 fences.\n\n        CHAIN:\n          ← `search_programs` supplies target_program_id.\n          → `search_certifications(name)` for cert spec depth.\n          → `rule_engine_check(program_id, applicant_profile)` for\n            adjudication once prerequisites are obtained."
    },
    {
      "name": "get_provenance",
      "description": "[PROVENANCE] Returns source attribution for the entity at point-in-time of last fetch — all rows from source-derived dataset × source-derived dataset JOIN with license_summary. include_facts=True adds per-fact provenance via source-derived dataset.source_id where set.\n\n    WHAT: 1) source-derived dataset × source-derived dataset で entity に紐づく全 source rows\n    (role, source_url, domain, license, source_type, fetched_at). 2) per-license\n    rollup ``license_summary``. 3) ``include_facts=True`` のとき source-derived dataset\n    × source-derived dataset via source_id で fact-level provenance も返却 (source_id NULL の\n    fact は skip — entity-level sources を引用すること).\n\n    WHEN:\n      - 「この補助金の出典 URL 一覧と license は?」(再配布前の確認)\n      - 「どの primary_source / pdf_url / application_url が紐付いているか」\n      - 「この entity の facts は どの source から取得したか」(include_facts=True)\n\n    WHEN NOT:\n      - 単一 fact_id の出典 → get_provenance_for_fact\n      - search 系 (entity 検索) → search_programs / search_certifications / etc.\n\n    RETURN:\n      {entity_id, total_sources, sources[{role, source_url, domain, license,\n       source_type, fetched_at, source_id, ...}], license_summary{license: count},\n       facts? (when include_facts=True), total_facts? (same)}.\n      seed_not_found / no_matching_records は canonical envelope を返却。"
    },
    {
      "name": "get_provenance_for_fact",
      "description": "[PROVENANCE-FACT] Returns source attribution for a single fact_id at point-in-time of last fetch. Resolves source-derived dataset.source_id → source-derived dataset. When source_id is NULL (legacy fact pre-2026-04-25), falls back to entity-level source-derived dataset candidate list.\n\n    WHAT: source-derived dataset row → source_id → source-derived dataset 1 件返却.\n    source_id が NULL の legacy fact は entity-level source-derived dataset から\n    候補 list を返す (``fallback=True``).\n\n    Example:\n        get_provenance_for_fact(fact_id=12345)\n        → {\"fact_id\": 12345, \"entity_id\": \"...\", \"field_name\": \"amount_max_yen\",\n           \"field_value_text\": \"5000000\", \"source\": {\"source_id\": 42,\n           \"source_url\": \"...\", \"license\": \"pdl_v1.0\"}, \"fallback\": false}\n\n    When NOT to call:\n        - For entity-level provenance (all sources for an entity) → use get_provenance(entity_id).\n        - For 補助金 program lineage (public corpus) → use get_program (carries source_url inline).\n        - For 法令 / tax / 判例 detail → those tools embed source_url in their own response.\n        - For bulk fact discovery → use search_* tools and read each row's source_url.\n\n    RETURN:\n      {fact_id, entity_id, field_name, field_value_text, source? (when source_id is set),\n       fallback_sources?[…] (when source_id NULL — candidates from source-derived dataset),\n       fallback: bool, license_summary{}}"
    },
    {
      "name": "get_pubcomment_status",
      "description": "[PUBCOMMENT] public dataset e-Gov パブコメ 公示 follow. Returns 公示中 + 直近 90 日終了 案件 with 3-axis citation (full_text_url + retrieved_at + sha256) + peer_group_impact rollup. Lead time 30-60 日, sensitive (§52 / §47条の2 / §72 / §1) — disclaimer envelope mandatory. NO LLM, single ¥3/billable unit billing.\n\n        When to use: agent has a 業法 keyword (e.g. '税理士法'\n        / '適格請求書' / '個人情報保護法') and wants the\n        e-Gov パブコメ 公示 (Public Comment) follow — both\n        live announcements and the trailing 90-day closed\n        slate — each row tagged with 3-axis citation\n        (full_text_url + retrieved_at + sha256) plus\n        peer_group_impact rollup so the caller can grade\n        downstream legislative risk. deterministic retrieval retrieval over\n        pubcomment_announcement; no LLM; descriptive\n        surfacing of public 公示.\n        For personas: コンプライアンス担当 watching\n        upcoming 業法 changes; 行政書士 / 弁護士 / 税理士\n        / 公認会計士 tracking pre-amendment lead time\n        (NOT 法解釈 emission); 中小企業 経営者 doing\n        upstream policy radar; AX engineer wiring a\n        \"incoming legislation\" widget; FDE designing a\n        regulatory-radar surface.\n        Example: law_keyword=\"適格請求書\", limit=20 →\n        returns {\"law_keyword\":\"適格請求書\", \"active\":\n        [{\"comment_id\":...,\"target_law\":\"...\",\"title\":...,\n        \"comment_window_end\":\"2026-06-30\",\"full_text_url\":\n        ...,\"retrieved_at\":\"...\",\"sha256\":\"...\"}, ...],\n        \"closed_recent\":[...], \"peer_group_impact\":{...},\n        \"schema_version\":\"deep45.pubcomment.v1\",\n        \"no_llm\": true, \"_billing_unit\":1,\n        \"disclaimer\":\"§52/§47条の2/§72/§1 envelope\"}.\n        Not for: 法解釈 emission (弁護士法 §72 fence — pubcomment text is\n        descriptive surfacing); 監査意見 (公認会計士法 §47条の2 fence);\n        税務代理 (税理士法 §52); 申請代理 (行政書士法 §1 fence); 採択 /\n        legislation passage 保証 (景表法 fence — pubcomment lead time\n        is statistical, NOT enactment guarantee)."
    },
    {
      "name": "realestate_recent_deals",
      "description": "[REAL-ESTATE / Q8 Q15 / Tier C ¥12] 近隣取引事例の集約 (国土交通省 取引価格情報 API ベース)。area_code (5桁 MLIT 市区町村コード) を起点に radius_m / days_back / limit でフィルタした取引事例 (TradePrice / PricePerUnit / Area / BuildingYear 他) を返却。鑑定評価 3 手法のうち取引事例比較法のインプット用。NO LLM、出典明記必須 (§13). W3 AWS ingest 完了前は scaffold envelope (`status=scaffold_pending_w3_aws_data`).\n\n        When to use: 不動産鑑定士 / 司法書士 / 弁護士 agent has a 5-digit MLIT\n        municipality code (area_code) and wants recent transaction cases (TradePrice /\n        PricePerUnit / Area / BuildingYear etc.) filtered by radius_m / days_back / limit\n        as input for 取引事例比較法 (one of the 3 鑑定評価 methods). Tier C ¥12; pure\n        scaffold material. W3 AWS ingest 完了前 returns scaffold envelope.\n        For personas: 不動産鑑定士 producing 鑑定評価書 cite-able transaction comps\n        (final 鑑定評価書 emission belongs to 不動産鑑定士 under 不動産鑑定評価基準);\n        司法書士 substantiating 不動産登記 transaction context (final §3 belongs to\n        司法書士); M&A advisor / 中小企業診断士 scoping real-estate-bound asset value;\n        AX_engineer wiring a \"comps lookup\" widget.\n        Example: area_code=\"13113\" (渋谷区), radius_m=500, days_back=365, limit=10 →\n        recent transactions with TradePrice / PricePerUnit / Area / BuildingYear and\n        citation envelope (§13 出典明記).\n        Not for: free-text 鑑定評価書 drafting (final 鑑定評価書 emission belongs to\n        不動産鑑定士); 不動産登記書面 (final §3 belongs to 司法書士); single-address\n        appraisal (this is comp-based aggregation, not per-property valuation);\n        future-value forecasting (use time-series tools for trend signals). NO LLM\n        inference inside this tool."
    },
    {
      "name": "koushi_kakaku_lookup",
      "description": "[REAL-ESTATE / Q8 Q15 / Tier A ¥3] 公示価格 + 都道府県地価調査の標準地点をルックアップ。address を渡すと都道府県プレフィックス match → 該当年の標準地番号・公示価格 (円/m²) ・用途・形状・建ぺい率・容積率・前年比 etc. を返却。MLIT XCT001/XCT002 ベース、商用利用可 (出典明記必須). 鑑定評価3手法 (取引事例 / 原価 / 収益) full coverage 入口。W3 ingest 前は scaffold envelope.\n\n        When to use: agent has an address string and wants the\n        公示価格 / 都道府県地価調査 standard-point row for a\n        specific year (公示 3月 / 地価調査 9月). Use as the\n        entry point for 鑑定評価3手法 (取引事例 / 原価 / 収益)\n        chain — the standard-point row provides 円/m² + 用途\n        + 建ぺい率 / 容積率 / 前年比 grounding before chaining\n        into recent deals or 原価 axis. MLIT XCT001/XCT002\n        base, 商用利用可 with 出典明記.\n        For personas: 不動産鑑定士 / 宅地建物取引士 / 司法書士\n        doing 標準地点 lookup; 銀行 担保評価 staff; AX engineer\n        wiring a real-estate platform; FDE designing a 不動産\n        portfolio scaffolding chain; 税理士 doing 相続税\n        路線価 cross-check (note: 公示価格 ≠ 路線価, separate\n        axis).\n        Example: address=\"東京都新宿区西新宿2-8-1\", year=2026\n        → returns {\"address\": \"...\", \"year\": 2026,\n        \"standard_point_id\": \"5-1\", \"公示価格_yen_per_m2\":\n        4720000, \"用途\": \"商業地域\", \"建ぺい率\": 80,\n        \"容積率\": 1000, \"前年比\": 1.082, \"source\": \"MLIT\n        XCT001 — 出典明記必須\", \"schema_version\":\n        \"realestate.koushi.v1\", \"_billing_unit\": 1,\n        \"no_llm\": true}.\n        Not for: 鑑定評価意見書 final emission (鑑定士 reviews —\n        this is evidence retrieval); 路線価 lookup (separate\n        国税庁 axis); 取引事例 deep dive (use\n        realestate_recent_deals for 取引事例 axis);\n        相続税 / 贈与税 評価 final 判断 (§52 fence). Before W3\n        ingest finishes, returns scaffold envelope — wire now\n        but don't surface as live appraisal in customer copy."
    },
    {
      "name": "realestate_touki_kankatsu",
      "description": "[REAL-ESTATE / Q8 Q13 / Tier A ¥3] 不動産登記の管轄法務局ルーティング。address → 都道府県解決 → 9 区分の地方法務局管区 (札幌/仙台/東京/名古屋/大阪/広島/高松/福岡/那覇) → 該当する地方法務局・支局リストを返却。登記簿謄本 bulk fetch (¥332-600/件) は scope 外 — operator が per-case で trigger。W3 完了後は市区町村単位の支局ピンポイント解決に拡張。法務省 公開資料 (PDL v1.0)、§3 司法書士独占業務遵守。NO LLM.\n\n        When to use: agent has a 不動産 address and needs the\n        managing 法務局 / 支局 — name + address + 管轄区域 +\n        phone + online-application flag — so the caller can\n        route the 登記 work to the right window. Pure\n        address-prefecture-region lookup over 法務省 PDL data;\n        no LLM; routing substrate ONLY, NOT 登記申請書面 起案.\n        Use as the routing hop before 司法書士 referral or\n        operator-triggered 登記簿謄本 bulk fetch.\n        For personas: 司法書士 confirming jurisdiction before\n        filing (NOT replacement for §3 独占業務); 不動産業 /\n        宅建士 sizing 登記 usage pattern; M&A DD researcher mapping\n        target's 法務局; AX engineer wiring a \"find my\n        法務局\" widget; FDE composing 不動産 routing surface.\n        Example: address=\"東京都港区六本木6-10-1\" → returns\n        {\"address\":\"東京都港区六本木6-10-1\", \"prefecture\":\n        \"東京都\", \"regional_bureau\":\"東京法務局\", \"branch\":\n        {\"name\":\"港出張所\",\"address\":\"東京都港区芝5-...\",\n        \"jurisdiction\":\"港区全域\",\"phone\":\"03-XXXX-XXXX\",\n        \"online_application\": true}, \"schema_version\":\n        \"realestate.touki_kankatsu.v1\", \"no_llm\": true,\n        \"_billing_tier\":\"A\", \"_billing_unit\":1}.\n        Not for: 登記申請書面 起案 (§3 司法書士 独占業務 fence — agent\n        does NOT draft 申請書); 登記簿謄本 bulk fetch (scope 外 —\n        operator per-case trigger only, ¥332-600/件); 法解釈 of\n        登記 制度 (弁護士法 §72); 鑑定評価 (不動産鑑定士法 fence); 採択 /\n        審査 結果保証 (景表法 fence — routing is informational)."
    },
    {
      "name": "recommend_similar_program",
      "description": "Vector k-NN over source-derived datasetS (programs). Re-ranked by cosine + verification_count + source-derived dataset (W22-9). NOT an 採択 forecast — 行政書士法 §1 / 税理士法 §52 fence; the LLM must surface the disclaimer envelope.\n\n        When to use: agent has a seed 制度 (補助金 / 助成 / 融資) and\n        wants top-k vector-similar programs to populate a \"you may\n        also consider\" surface — typical second call after search_\n        programs / find_programs_by_jsic when the agent wants to\n        widen the candidate set before scoring application probability.\n        For personas: 中小企業診断士 building a 補助金 portfolio\n        scaffold; 経営コンサル / FDE wiring a program-recommender\n        UI; AX engineer prototyping discovery cascade; researcher\n        evaluating retrieval recall against ground-truth pairs.\n        Example: program_id=\"UNI-METI-monozukuri-2024\", k=10 → returns\n        {\"seed_program_id\":..., \"neighbours\":[{\"program_id\":...,\n        \"cosine\": 0.87, \"source-derived dataset\": 0.62}, ...],\n        \"schema_version\":\"wave22.recsim.v1\", \"no_llm\": true,\n        \"_disclaimer\": \"NOT 採択 forecast\"}.\n        Not for: 採択 probability prediction (use\n        score_application_probability separately — this is just\n        similarity); 申請代理 prep (行政書士法 §1 fence — the agent\n        decides; jpcite retrieves); 税務助言 (税理士法 §52); novel\n        program suggestion (this only returns existing canonical\n        programs, not synthesized ones)."
    },
    {
      "name": "recommend_similar_case",
      "description": "Vector k-NN over source-derived datasetC (source-derived dataset). Cosine distance with optional density boost. NOT an 採択 forecast — 行政書士法 §1 / 税理士法 §52 fence; the LLM must surface the disclaimer envelope.\n\n        When to use: agent has a seed case_study (採択事例) and\n        wants top-k similar 採択 case studies for inspiration / pattern\n        matching — useful for 補助金 application drafting (find\n        similar successful applicants), 事業計画 benchmarking, or\n        peer group lookup by 業務内容.\n        For personas: 中小企業診断士 prepping 経営診断 with\n        similar 採択 reference cases; 補助金 navigator drafting\n        application with reference to similar 採択 patterns; FDE\n        composing 採択事例 dossier; AX engineer wiring case-similarity\n        retrieval into agent stack.\n        Example: case_id=\"CS-12345\", k=10 → returns {neighbours:\n        [{case_id, cosine_distance, density_boost, summary}, ...],\n        _disclaimer}.\n        Not for: 採択 forecast (use outcome_acceptance_probability —\n        different surface, this is similarity not prediction);\n        申請代理 (行政書士法 §1 fence — similar cases as scaffolding,\n        NOT 申請書 generation); legal opinion (弁護士法 §72);\n        私的 / 非公開 case (corpus is 公表 採択事例 only)."
    },
    {
      "name": "recommend_similar_court_decision",
      "description": "Vector k-NN over source-derived datasetJ (court_decisions). Cosine distance with optional density boost. NOT a legal opinion — 弁護士法 §72 / 行政書士法 §1 fence; the LLM must surface the disclaimer envelope.\n\n        When to use: agent has a seed 判例 (court_decisions) row and\n        wants top-k semantically similar 判例 for legal-history dossier\n        building, precedent gathering, or fact-pattern matching against\n        a known prior case.\n        For personas: 弁護士-led research pipeline gathering 判例\n        precedents; 税理士 prepping 国税不服審判所 vs 判例 pivot\n        dossier; 行政書士 finding similar 行政訴訟 precedent; FDE\n        composing 判例 reference packet; AX engineer indexing the\n        判例 similarity space.\n        Example: case_id=\"HAN-12345\", k=10 → returns {neighbours:\n        [{case_id, court, decision_date, cosine_distance, density_boost,\n        head_note}, ...], _disclaimer}.\n        Not for: legal opinion drafting (弁護士法 §72 fence — similar\n        判例 as reference scaffolding, NOT 法解釈); 申請代理 (行政\n        書士法 §1); 与信判断 (信用情報法); free-text legal Q&A (use\n        search_chunks for unstructured retrieval); private / 未公開\n        court decision (corpus is 公開 判例 only)."
    },
    {
      "name": "programs_by_region_am",
      "description": "Programs hit-map for a 5-digit region code.\n\n        Returns programs split by `national` / `prefecture` / `municipality`\n        with per-bucket totals. Designated wards walk one hop up\n        (ward → designated_city → prefecture). Tier filter S/A/B/C only.\n\n        When to use: agent has a 5-digit 全国地方公共団体コード\n        (or computed it via search_regions_am) and wants the\n        per-level hit-map — what national, prefecture, and\n        municipality programs map to this region. Use as the\n        region-pivot entry hop before drilling into specific\n        peer group packs or per-program detail.\n        For personas: 中小企業 経営者 self-screening regional\n        program coverage; 中小企業診断士 / 経営コンサル sizing\n        local 補助金 opportunities; AX engineer wiring a\n        region-pivot widget; FDE designing a 自治体 dashboard;\n        municipality 補助金 担当 verifying ingest coverage.\n        Example: region_code=\"13105\" (文京区), limit=20 → returns\n        {\"region_code\":\"13105\", \"region_name\":\"文京区\",\n        \"national\":{\"programs\":[...up to 20...], \"total\":312},\n        \"prefecture\":{\"programs\":[...up to 20...], \"total\":47},\n        \"municipality\":{\"programs\":[...up to 20...], \"total\":8},\n        \"schema_version\":\"region.hitmap.v1\", \"no_llm\": true}.\n        Not for: 採択保証 / 過去の採択実績 (景表法 fence — these are\n        program availability, not selection probability); 申請\n        代理 (行政書士法 §1 fence); 税務助言 on 自治体 補助金\n        (税理士法 §52 fence); per-program eligibility verdict\n        (use check_eligibility / intel_match); 法解釈 of regional\n        制度 (弁護士法 §72 fence)."
    },
    {
      "name": "region_coverage_am",
      "description": "Per-level program hit count + coverage_gap flag for a region.\n\n        coverage_gap is True when the region is non-national AND has zero\n        rows mapped to its prefecture-level OR municipality-level bucket\n        (used to surface ingest 未着手 自治体 to the operator).\n\n        When to use: agent / operator wants a per-region coverage\n        audit — quick \"do we have any prefecture or municipality\n        programs mapped to this 5-digit code\" signal. coverage_gap\n        flags 未着手 自治体 so ingest can be prioritised. Use as\n        the moat-hole detection hop in catalog quality work.\n        For personas: jpcite operator running ingest gap audits;\n        AX engineer wiring a coverage-radar widget; FDE designing\n        a 自治体 health-check panel; researcher producing\n        coverage-quality corpora; 中小企業 経営者 sanity-checking\n        whether their 自治体 is covered before relying on the\n        program list.\n        Example: region_code=\"20322\" (a hypothetical\n        未着手 村) → returns {\"region_code\":\"20322\",\n        \"region_name\":\"...\", \"level\":\"municipality\",\n        \"national_count\":312, \"prefecture_count\":29,\n        \"municipality_count\":0, \"coverage_gap\": true,\n        \"schema_version\":\"region.coverage.v1\", \"no_llm\": true}.\n        Not for: 採択保証 / 過去の採択実績 (景表法 fence — this is\n        ingest coverage, not selection); 申請代理 (行政書士法\n        §1 fence); definitive \"this 自治体 has no programs\"\n        claim (false negatives possible — coverage_gap is an\n        ingest signal, not a market guarantee); 税務助言 (税理士\n        法 §52 fence); 法解釈 (弁護士法 §72 fence)."
    },
    {
      "name": "search_regions_am",
      "description": "Free-text search over source-derived dataset (1,966 rows). Exact > prefix > substring rank.\n\n        When to use: when the agent has a free-text Japanese place name\n        (自治体名) from the user — e.g. \"豊島区\", \"上越市\", \"東京都\" — and\n        needs the canonical ``region_code`` (5-digit) + ``region_level``\n        (nation / prefecture / designated_city / designated_ward /\n        municipality) before calling\n        ``programs_by_region_am`` / ``region_coverage_am`` or any\n        geo-restricted subsidy / 行政 lookup. Single structured public index read, NO\n        LLM, deterministic ranking (exact > prefix > substring).\n        For personas: 行政書士 / 司法書士 peer group agents normalizing\n        client-supplied 住所; 税理士 / 会計士 agents geocoding a 法人\n        for 地方税 / 補助金 scope; AX_engineer building region-aware\n        agentic UX.\n        Example: q=\"つくば市\", level=\"municipality\", limit=5 →\n        {\"results\": [{\"region_code\": \"08220\",\n        \"name_ja\": \"つくば市\", \"region_level\": \"municipality\", ...}]}\n        ranked by exact > prefix > substring match. Free.\n        Not for: address → lat/lon geocoding (use a geocoder); cross-\n        prefecture 法人 lookup (use ``get_houjin_360_am``); free-text\n        program search (use ``search_programs``); 助言-style 行政区分\n        interpretation (士業法 fence — agent composes)."
    },
    {
      "name": "rule_engine_check",
      "description": "[R9-UNIFIED-RULE-ENGINE] Returns rule evaluation result + applicable law citations across 6 corpora (49,247 rows): exclusion + compat_matrix (48,815 rows, of which 4,849 are 'unknown' status) + combo + subsidy + tax + validation. Output is search-derived; verify primary source for business decisions.\n\n        WHAT: Runs the precedence ladder (absolute → exclude → prerequisite →\n        compat:incompatible → compat:case_by_case → compat:compatible → combo →\n        subsidy/tax → validation) over the unified view `source-derived dataset` and\n        returns a single verdict + per-rule trace. First DENY wins, BUT\n        contradictions between corpora surface as ``error.code='rules_conflict'``\n        with both rule_ids — never silently merged.\n\n        WHEN:\n          - 「program A と program B を併給できる?」(pairwise compat)\n          - 「この補助金、申請して大丈夫?(他制度との衝突は?)」\n          - Pairwise compat lookup against the compat_matrix corpus.\n          - Replace the 5 disjoint legacy tools (check_exclusions /\n            combined_compliance_check / get_am_tax_rule / search_certifications /\n            list_open_programs) with one call.\n\n        WHEN NOT:\n          - Free-text discovery → use search_programs first, then pass the\n            resulting program_id here.\n          - The full ruleset list of all 49,247 rows (no program filter) →\n            this tool requires a program_id.\n\n        RETURNS:\n          {\n            judgment: \"allow\" | \"deny\" | \"review\" | \"unknown\" | \"conflict\",\n            program_id: str,\n            alongside_programs: list[str],\n            evidence: [\n              {\n                rule_id, rule_kind, source ∈ {source-derived dataset,\n                source-derived dataset, source-derived dataset, source-derived dataset,\n                source-derived dataset, source-derived dataset},\n                scope_program_id, pair_program_id, severity, message_ja,\n                source_url, effect ∈ {deny, allow, review, unknown, info}\n              }, ...\n            ],\n            confidence: 0.0-1.0,\n            data_quality: {\n              exclusion_join_coverage_pct: float (0-100, partial mapping; inspect coverage_pct),\n              rules_evaluated: int,\n              rules_total_corpus: 49247\n            },\n            reason?: str (when judgment=unknown — explains why),\n            _disclaimer: str (景表法 fence + 社労士/税理士/弁護士 advisory),\n            error?: { code: \"rules_conflict\", evidence: [both rules] }\n          }\n\n        DATA QUALITY HONESTY: source-derived dataset.program_a uses Japanese\n        human names while source-derived dataset uses canonical IDs. Cross-corpus\n        join coverage is currently ~0% (60 distinct human names, 0 mapped).\n        The response surfaces ``data_quality.exclusion_join_coverage_pct`` so\n        callers see partial recall transparently rather than receiving silent\n        misses (景表法 / fraud-review fence).\n\n        CHAIN:\n          ← `search_programs` / `search_certifications` supply program_id.\n          → `get_program(unified_id)` for the program detail view.\n          → `get_am_tax_rule(measure)` for tax_rule depth.\n          → Use `check_exclusions` (legacy) only when this tool returns\n            error.code='subsystem_unavailable' or for backward compatibility."
    },
    {
      "name": "semantic_search_legacy_am",
      "description": "いつ使う: 1024-dim e5-large embedding を持つ agent が canonical 1-row-per-canonical_id corpus で cosine top-k を 1 call で取りたい時。 入力: embedding (1024d L2-normalised float list), corpus (default 'program'), top_k (1-100, default 20)。 出力: results (canonical_id / primary_name / record_kind / source_url / l2_distance / cosine_similarity)、corpus_state ('ready' | 'empty' | 'db_unavailable' | 'vec_extension_unavailable' | 'unknown_corpus' | 'embedding_dim_mismatch')。 エラーは envelope に包んで 200 を返す (例外を投げない)。\n\n        When to use: agent already has a 1024-dim L2-normalised\n        embedding from its own (multilingual-e5-large) encoder and\n        wants a deterministic cosine top-k lookup against a canonical\n        1-row-per-id corpus (program / law / case_study / enforcement /\n        corporate_entity / statistic / tax_measure). ¥3 vs ~3-turn\n        外部 LLM vector search emulation (¥180). Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. jpcite\n        does NOT call any LLM API — encoder is caller-side.\n        For personas: AX_engineer wiring a semantic search surface\n        (caller-side encoder), FDE 顧客 vector index pipeline,\n        researcher building reproducible cosine top-k baseline against\n        jpcite canonical corpus.\n        Example: embedding=[0.013, -0.025, …] (1024 floats),\n        corpus=\"program\", top_k=20 → returns {results:\n        [{canonical_id: \"UNI-it-2025-001\", primary_name: \"IT導入\n        補助金…\", record_kind: \"program\", source_url: \"https://…\",\n        l2_distance: 0.42, cosine_similarity: 0.83}, …],\n        corpus_state: \"ready\", _billing_unit: 1} envelope. Errors\n        wrapped in envelope (200 OK), never raised.\n        Not for: embedding dim != 1024 (envelope returns\n        embedding_dim_mismatch); unknown corpus (returns\n        unknown_corpus); top_k > 100 (rejected, cap 100); 助言 emission\n        (semantic match scaffold only — final 助言 belongs to 士業);\n        encoder call (jpcite NEVER calls LLM API — caller-side only)."
    },
    {
      "name": "semantic_search_v2_am",
      "description": "いつ使う: plain-text query から source-derived dataset 503k+ corpus を hybrid 検索 (BM25 + 384d e5-small + cross-encoder) — semantic_search_am の v2-suffix alias、Anthropic registry 互換維持 + dim 19 audit MCP-glob 充足のため. 入力: query (string 2-512), top_k (1-50, default 10), rerank (bool, default True), record_kinds (optional). 出力: results (top-k entities w/ canonical_id, primary_name, record_kind, source_url, scores), fts_count, vec_count, rrf_state, reranker_state, _billing_unit (1 or 2), _disclaimer (§52/§72/§1). エラー: db_unavailable で空配列 + state marker; reranker 不在で skipped.\n\n        When to use: agent has a free-form 日本語 / English / 中国語 /\n        한국어 query and wants the v2-suffix alias of semantic_search_am\n        (Anthropic registry compat alias maintained for dim 19 MCP-glob\n        audit — same 503k+ corpus + hybrid pipeline as the canonical\n        tool). ¥3 (rerank=False) / ¥6 (rerank=True) vs ~3-5 turn 外部 LLM \"search 503k corpus + rank semantically\" chain (¥180-300).\n        Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest: this is an alias, not a new\n        capability — runtime callers should prefer semantic_search_am.\n        For personas: AX_engineer needing the v2 alias for an\n        Anthropic-registry-strict client (older bundle), FDE migrating\n        from an external semantic_search_v2 endpoint, agent doing a\n        peer group-bounded record_kinds query (e.g. limit to ['program',\n        'case_study'] for 補助金 surface narrowing).\n        Example: query=\"freee の請求書 #1234 が必要\", top_k=10,\n        rerank=True, record_kinds=[\"program\",\"case_study\"] → returns\n        {results:[{canonical_id:\"e:…\", primary_name:\"…\", record_kind:\n        \"program\", source_url:\"https://www.…\", scores:{…}}, …],\n        fts_count:N, vec_count:M, rrf_state:\"ok\", reranker_state:\"ok\",\n        _billing_unit:2}.\n        Not for: query < 2 chars or > 512 chars (rejected); top_k > 50\n        (capped); cross-tenant retrieval (each call is single tenant);\n        legal-source 法令解釈 emission (search returns sourced 一次資料\n        excerpts only — final interpretation belongs to 弁護士 §72 /\n        税理士 §52); 採択保証 / 監査適正性保証 (statistical retrieval\n        only, never endorsement)."
    },
    {
      "name": "semantic_search_am",
      "description": "いつ使う: plain-text 検索 query から hybrid 検索結果 (BM25 + 384d e5-small + cross-encoder) を返す。入力: query (string 2-512), top_k (1-50, default 10), rerank (bool, default True), record_kinds (optional list). 出力: results (top-k entities w/ canonical_id, primary_name, record_kind, source_url, scores). エラー: db_unavailable で空配列 + state marker。reranker 不在で skipped。\n\n        When to use: agent has a plain-text query (日本語/EN/中文/한국어\n        OK) and wants the best mixed-precision recall across all 12\n        record_kinds — runs BM25 + 384d multilingual-e5-small + optional\n        cross-encoder reranker locally (NO API call). Cheapest entry point\n        to the moat — top-k canonical_id rollup as substrate for downstream\n        tools.\n        For personas: AX_engineer wiring a query-to-canonical_id hop\n        before deep tools; 士業 peer group discovery substrate; researcher\n        producing reproducible recall@k baselines.\n        Example: query=\"インボイス制度 経過措置\", top_k=10, rerank=True,\n        record_kinds=[\"program\",\"law\"] → returns dict{results:[\n        {canonical_id, primary_name, record_kind, source_url, scores}, …\n        ], reranker_used: true, _disclaimer: ...} sorted by combined\n        score.\n        Not for: 自由文回答 emission (NO LLM at request time, retrieval\n        only); fresh-query 採択保証 / 法解釈 emission (景表法 / 弁護士法\n        §72 / 税理士法 §52 fence); single canonical_id lookup (use\n        ``get_houjin_360_am`` / record-kind-specific tools instead)."
    },
    {
      "name": "match_due_diligence_questions",
      "description": "DD question checklist (30-60 items) tailored to industry × program portfolio × 与信 review by joining dd_question_templates (60 rows, data update) with houjin / adoption / enforcement / invoice corpora. Pure pattern-match, NO LLM. §52/§72 sensitive — checklist, not advice.\n\n        When to use: agent is preparing a DD (due diligence)\n        question deck for a target 法人 — wants 20-60 questions\n        tailored to industry × program portfolio × 与信 review by\n        joining the 60-row template table with houjin /\n        adoption / enforcement / invoice corpora. Use as the\n        DD substrate hop before client kickoff or 監査 / M&A\n        scoping. deterministic retrieval pattern-match; no LLM; checklist\n        emission, NOT 助言 emission.\n        For personas: M&A DD researcher building target\n        question deck; 監査法人 / 会計士 onboarding new\n        client; 経営コンサル kickoff prep; AX engineer\n        wiring a \"DD question checklist builder\" widget; FDE composing\n        DD-scoping surfaces; 中小企業診断士 building DD\n        material for 経営承継.\n        Example: houjin_bangou=\"1234567890123\", deck_size=\n        40 → returns {\"houjin_id\":..., \"deck\":[{\"q_id\":...,\n        \"category\":\"governance\",\"question_text\":\"...\",\n        \"source\":\"dd_question_templates\",\"rationale\":\n        \"industry=39 + 採択 history triggers governance\n        depth\"}, ...], \"deck_size\":40, \"schema_version\":\n        \"wave22.dd_deck.v1\", \"no_llm\": true}.\n        Not for: 監査意見 emission (公認会計士法 §47条の2 fence —\n        questions are checklist, NOT 監査意見); 法解釈 of cited risk\n        factors (弁護士法 §72 fence); 税務代理 (税理士法 §52); 信用情報\n        emission (信用情報法 fence — DD risk ≠ credit info); 与信\n        判断 (banking rule fence — risk_axis is descriptive only)."
    },
    {
      "name": "prepare_kessan_briefing",
      "description": "月次 / 四半期 summary of program-eligibility changes since last 決算 by joining source-derived dataset + source-derived dataset within the FY window. Compounds saved_searches digest cadence. §52 sensitive — 決算 territory, briefing only, not 税務代理.\n\n        When to use: agent is preparing a 月次 / 四半期 briefing\n        for a specific 法人 about program-eligibility changes since\n        the last 決算 — cross-joins source-derived dataset with\n        source-derived dataset inside the FY window. Use as the cadence\n        digest hop before the 顧問 / 税理士 reviews the substrate.\n        Pure retrieval, NO LLM, NO 税務代理.\n        For personas: 税理士 / 会計士 preparing monthly client\n        briefings (substrate only, §52 sensitive); 中小企業 経営者\n        self-reviewing pre-決算 status; AX engineer wiring a 決算\n        timeline widget; FDE building 月次 reporting panels; 監査\n        担当 cadence digest authoring.\n        Example: houjin_bangou=\"T0000012345678\", fiscal_year=2026,\n        cadence=\"monthly\" → returns {\"houjin_bangou\":...,\n        \"fiscal_year\":2026, \"cadence\":\"monthly\", \"windows\":[\n        {\"yyyymm\":\"2026-04\", \"amendments\":[...], \"tax_ruleset\n        _changes\":[...], \"delta_summary\":{...}}, ...],\n        \"schema_version\":\"wave22.kessan.v1\", \"no_llm\": true}.\n        Not for: 税理士法 §52 final 税務代理 / 税務助言 (this is\n        substrate, the 税理士 themselves draft the briefing);\n        会計監査 意見 (公認会計士法 §47条の2 fence); 申請代理\n        (行政書士法 §1 fence); 配当 / 法人税 額の確定 (this is\n        diff signal only — actual 確定 is the 税理士's domain)."
    },
    {
      "name": "forecast_program_renewal",
      "description": "Probability + window of program renewal in next FY based on historical source-derived dataset cadence + source-derived dataset density. 4-signal weighted average (frequency / recency / pipeline / snapshot). NOT sensitive — statistical, not advice.\n\n        When to use: agent wants the next-FY renewal probability\n        + likely window for a single 制度 / 補助金 — 4-signal\n        weighted average (round frequency / recency / pipeline /\n        snapshot density). Use as the forward-looking timing hop\n        right after candidate selection. deterministic retrieval stats, no\n        LLM, no advisory.\n        For personas: 中小企業 経営者 deciding whether to wait\n        for renewal; 中小企業診断士 / 経営コンサル sequencing\n        client filings around expected renewals; AX engineer\n        wiring a renewal-radar widget; FDE building a 制度\n        watchlist panel; researcher producing reproducible\n        cadence stats.\n        Example: program_id=\"UNI-METI-monozukuri-2024\",\n        horizon_fy=2027 → returns {\"program_id\":...,\n        \"horizon_fy\":2027, \"renewal_probability\": 0.72,\n        \"expected_window\":{\"open_from\":\"2027-04-10\",\n        \"open_until\":\"2027-07-15\"}, \"signals\":{\"frequency\": 0.85,\n        \"recency\": 0.61, \"pipeline\": 0.68, \"snapshot\": 0.74},\n        \"schema_version\":\"wave22.renewal.v1\", \"no_llm\": true,\n        \"disclaimer\":\"statistical, not advice\"}.\n        Not for: 採択 forecasting per applicant (use\n        score_application_probability); 行政手続の保証\n        (景表法 fence — surface as \"statistical estimate\", never\n        \"公募 確定\"); 政策決定 prediction (this is cadence\n        statistics, not policy intelligence); 申請代理 prep\n        (行政書士法 §1 fence)."
    },
    {
      "name": "cross_check_jurisdiction",
      "description": "Registered (法務局) vs invoice (NTA) vs operational (交付) jurisdiction breakdown. Detects 不一致 for 税理士 onboarding — flags prefecture mismatches between houjin_master / invoice_registrants / adoption_records. §52/§72 sensitive — heuristic detection, not 税務代理.\n\n        When to use: agent is onboarding a 法人 and wants the\n        cross-source jurisdiction breakdown — 法務局 registered\n        vs NTA invoice vs 交付 operational prefecture — to detect\n        mismatches as an early-warning signal before drafting\n        client documents. Pure cross-source retrieval; the\n        practitioner (税理士 / 弁護士) decides whether a 不一致\n        is material.\n        For personas: 税理士 / 会計士 onboarding new clients;\n        弁護士 / 司法書士 verifying registered jurisdiction; AX\n        engineer wiring a onboarding-risk widget; FDE building\n        a counterparty mapping panel; 中小企業 経営者 self-review\n        before tax / 補助金 filing.\n        Example: houjin_bangou=\"T0000012345678\" → returns\n        {\"houjin_bangou\":..., \"jurisdictions\":{\n        \"houjin_master\":{\"prefecture\":\"東京都\"},\n        \"invoice_registrants\":{\"prefecture\":\"東京都\"},\n        \"adoption_records\":{\"prefecture\":\"神奈川県\"}},\n        \"mismatch_flags\":[\"adoption_pref_vs_houjin_pref\"],\n        \"schema_version\":\"wave22.juris.v1\", \"no_llm\": true,\n        \"disclaimer\":\"heuristic detection, not 税務代理\"}.\n        Not for: 税理士法 §52 final 税務代理 (this is heuristic\n        substrate — 税理士 owns the decision); 弁護士法 §72 法的\n        判断 (mismatch interpretation belongs to 弁護士); 司法書士\n        登記申請 代理 (司法書士 owns 登記 actions); 与信 / 信用\n        判断 (信用情報法 fence — this is public registry only)."
    },
    {
      "name": "bundle_application_kit",
      "description": "Complete downloadable kit assembly: program metadata + cover letter scaffold + 必要書類 checklist + similar 採択例 list. Pure file assembly, NO LLM, NO DOCX generation. §1 sensitive — 申請書面作成は行政書士の独占業務、当社は scaffold + 一次 URL のみ提供.\n\n        When to use: agent has settled on a 制度 / 補助金 and a\n        client profile, and wants a single-call kit bundle —\n        program metadata, cover-letter scaffold (NOT a draft), 必要\n        書類 checklist (with download URLs), and similar 採択 cases\n        for inspiration. Scaffold only; the 申請書面 itself is\n        authored downstream by the agent + 行政書士.\n        For personas: 行政書士 / 中小企業診断士 starting an\n        application engagement; 経営者 self-prep before approaching\n        a 士業; AX engineer wiring an application-prep cascade; FDE\n        designing an application-kit UX page.\n        Example: program_id=\"UNI-METI-monozukuri-2024\", profile={\n        \"houjin_bangou\":\"8010001213708\",\"jsic\":\"D\",\"capital\":50000000}\n        → returns {\"program\":{...metadata...}, \"cover_letter\":\n        {\"header\":{...filled from profile...}, \"body_template\":\n        \"[scaffold only]\"}, \"checklist\":[{\"doc_name\":..., \"url\":...,\n        \"deadline\":...}], \"similar_cases\":[...], \"schema_version\":\n        \"wave22.kit.v1\", \"no_llm\": true, \"_disclaimer\":\"行政書士法\n        §1 — 申請書面作成は scaffold のみ\"}.\n        Not for: 申請書面 final draft (行政書士法 §1 fence —\n        agent + 行政書士 author the prose); LLM-style narrative\n        generation (this is file assembly); DOCX / PDF export\n        (returns structured JSON only — render downstream); 税務\n        助言 (税理士法 §52); 法解釈 of 鈎裕件 (弁護士法 §72\n        fence)."
    },
    {
      "name": "shihoshoshi_dd_pack_am",
      "description": "[public dataset 司法書士] 司法書士 peer group dedicated DD pack — 1-call で 商業登記前 360° (source-derived dataset + corp.* facts) + 不動産登記前 cross_check_jurisdiction + 反社相当 enforcement (fine/grant_refund/subsidy_exclude) + 業務 boundary 警告 (§52/§72/§1 keyword fence) を unified envelope で返す。NO LLM。§3 fence 厳守 — 登記・供託・簡裁訴訟代理は司法書士独占業務、jpcite は scaffold のみ。\n\n        When to use: 司法書士 agent has a 13-digit 法人番号 (with or without 'T' prefix)\n        and wants a 1-call DD pack covering 商業登記前 360° (source-derived dataset + corp.*\n        facts), 不動産登記前 jurisdiction cross-check, 反社相当 enforcement history\n        (fine / grant_refund / subsidy_exclude), and §52/§72/§1 boundary warnings — all\n        in a unified envelope. Single ¥3/billable unit. Pure scaffold material.\n        For personas: 司法書士 producing 登記前 due diligence scaffold for 顧問先 or M&A\n        target (final §3 登記・供託・簡裁訴訟代理 belongs to 司法書士); 弁護士 cross-\n        peer group reading enforcement history (final §72 belongs to 弁護士); 中小企業診断士 /\n        M&A advisor scoping 法人 status before introducing 司法書士; AX_engineer wiring\n        a \"司法書士 DD\" widget; researcher producing 法人 DD baseline studies.\n        Example: houjin_bangou=\"3450001000777\" → unified envelope with commercial_registration\n        + jurisdiction_check + enforcement_history + boundary_warnings + _next_calls + snapshot_id.\n        Not for: 登記書面 / 供託書面 drafting (final §3 belongs to 司法書士; this is\n        scaffold material); 簡裁訴訟代理 (use peer group artifact builders + 司法書士 hand-off);\n        free-text 法律相談 (use 弁護士 peer group under §72); 申請書面 (use 行政書士 peer group\n        under §1); per-axis atomic call (use cross_check_jurisdiction / check_enforcement_am).\n        NO LLM inference inside this tool."
    },
    {
      "name": "get_source_manifest",
      "description": "[EVIDENCE-GRAPH] Returns the full source manifest for one program: per-fact provenance (where source_id is populated) + entity-level rollup (source-derived dataset) + license set + publisher count + first/last fetched_at. Honest sparse signal — empty fact_provenance when source_id bulk fill has not reached the program peer group.\n\n    WHAT: 1) per-fact provenance rows where available (sparse; many\n    programs still have no field-level provenance). 2) entity-level\n    rollup (source_count, license_set, latest/oldest fetched_at,\n    unique_publishers). 3) public program metadata fallback when an entity\n    has no fact-level provenance yet.\n\n    WHEN:\n      - 「この補助金の出典 URL を全部洗い出したい」(再配布前の license 確認)\n      - 「per-field provenance ありますか?」(answer = mostly no, surfaced honestly)\n      - Evidence Graph cite-chain audit / 90-day deliverable verification\n\n    WHEN NOT:\n      - Single-fact provenance → get_provenance_for_fact(fact_id)\n      - Entity-level provenance only → get_provenance(entity_id)\n      - Plain program lookup → search_programs / get_program (public corpus)\n\n    RETURN:\n      {program_id, primary_name, primary_source_url, primary_license,\n       fact_provenance[{field_name, source_id, source_url, publisher,\n       fetched_at, license, checksum}], fact_provenance_coverage_pct,\n       summary{field_paths_covered, source_count, license_set,\n       latest_fetched_at, oldest_fetched_at, unique_publishers},\n       _disclaimer}.\n      seed_not_found / db_unavailable は canonical envelope を返却。"
    },
    {
      "name": "list_static_resources_am",
      "description": "Manifest of curated jpcite taxonomies (制度 / 用語 / 助成区分 / 義務 etc.).\n\n    Returns 8 entries (seido / glossary / money_types / obligations /\n    dealbreakers / sector_combos / crop_library / source-derived dataset). Each\n    entry carries id + filename + size_bytes; use ``get_static_resource_am``\n    with the id to fetch the full payload.\n\n    Example:\n        list_static_resources_am()\n        → {\"total\": 8, \"results\": [{\"id\": \"seido\", \"filename\": \"seido.json\", ...}, ...]}\n\n    When NOT to call:\n        - To LOAD a specific taxonomy → use get_static_resource_am(resource_id=...).\n        - For the runtime program list (実データ) → use search_programs / list_open_programs.\n        - For example client profiles → use list_example_profiles_am instead.\n        - For database-level enum values (industry_jsic etc.) → use enum_values_am.\n\n    0 件の場合は `hint` (再検索の提案) と `retry_with` (関連 tool 候補) を返します。\n\n    When to use: agent / FDE building a controlled-vocabulary lookup\n    pipeline needs to discover the canonical 8 taxonomy resource_ids\n    (seido / glossary / money_types / obligations / dealbreakers /\n    sector_combos / crop_library / source-derived dataset) and their sizes\n    before fetching the full payload via get_static_resource_am. ¥3 vs\n    ~2-turn 外部 LLM \"list available taxonomies + their sizes\" chain\n    (¥120). Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest: returns empty-with-hint envelope when\n    files are missing — never raises.\n    For personas: AX_engineer wiring a vocabulary-driven validator\n    (e.g. validate user-supplied money_types value), FDE building a\n    UI dropdown from a fresh taxonomy fetch, agent discovering\n    available reference data before drilling down with\n    get_static_resource_am.\n    Example: (no args) → returns {total:8, results:[{id:\"seido\",\n    filename:\"seido.json\", size_bytes:42768}, {id:\"glossary\", …}, …8\n    entries…]}.\n    Not for: enumerating runtime program data (use search_programs /\n    list_open_programs); enumerating example client profiles (use\n    list_example_profiles_am); resolving database enum values\n    (industry_jsic / prefecture — use enum_values_am); fetching\n    payload content (use get_static_resource_am)."
    },
    {
      "name": "get_static_resource_am",
      "description": "Load one curated taxonomy / lookup file. Returns full JSON + license.\n\n    Resolves controlled-vocabulary keys (e.g. seido kind codes, money_types,\n    obligations) to their human labels and parent groupings. Pure file read,\n    zero compute, zero LLM.\n\n    Example:\n        get_static_resource_am(resource_id=\"seido\")\n        → {\"resource_id\": \"seido\", \"content\": [...], \"license\": \"CC0-1.0\"}\n\n    When NOT to call:\n        - To DISCOVER which resource_ids exist → use list_static_resources_am first.\n        - For a CLIENT-INTAKE profile shape → use get_example_profile_am instead.\n        - For runtime program search (q=\"設備投資\") → use search_programs / list_open_programs.\n        - For statutory text → use search_laws / get_law (taxonomy is metadata, not law).\n\n    When to use: agent / FDE has a controlled-vocabulary resource_id\n    (one of 8: seido / glossary / money_types / obligations /\n    dealbreakers / sector_combos / crop_library / source-derived dataset) and\n    needs the full JSON payload with license for downstream label\n    resolution. ¥3 vs ~2-turn 外部 LLM \"look up taxonomy + map kind\n    codes to human labels\" chain (¥120). Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest: returns\n    seed_not_found error with self-correcting hint when an unknown\n    resource_id is passed.\n    For personas: AX_engineer building a 助成区分 → human-label\n    mapping (money_types resource), FDE wiring a 義務 surface tagged\n    with obligations resource, validation pipeline resolving 制度 kind\n    codes to a parent group via seido resource, agent surfacing\n    dealbreaker reasons with their controlled labels.\n    Example: resource_id=\"money_types\" → returns {resource_id:\n    \"money_types\", content:[{code:\"GRANT\", label_ja:\"補助金\", …},\n    {code:\"LOAN\", label_ja:\"融資\", …}, …], license:\"CC0-1.0\"}.\n    Not for: discovering valid resource_ids (use\n    list_static_resources_am first); fetching example client profiles\n    (use get_example_profile_am); statutory text retrieval (use\n    search_laws / get_law — taxonomy is metadata, not law); runtime\n    program search (use search_programs / list_open_programs); cross-\n    taxonomy join (caller composes joins client-side)."
    },
    {
      "name": "list_example_profiles_am",
      "description": "Manifest of canonical client-intake example payloads (PII-clean).\n\n    Use these as reference shapes when constructing ``business_profile`` /\n    ``profile`` arguments for downstream tools (validation, eligibility,\n    tax-applicability, bid-screening). Returns id + label + summary; pass\n    each id to ``get_example_profile_am`` for the full JSON payload.\n\n    Example:\n        list_example_profiles_am()\n        → {\"total\": 5, \"results\": [{\"profile_id\": \"ichigo_20a\", ...}, ...]}\n\n    When NOT to call:\n        - To fetch the actual profile JSON → use get_example_profile_am(profile_id).\n        - For the controlled-vocabulary list (industry codes / 助成区分) →\n          use list_static_resources_am instead.\n        - For real client records — these are CC0 fixtures, not anonymised data.\n\n    0 件の場合は `hint` (再検索の提案) と `retry_with` (関連 tool 候補) を返します。\n\n    When to use: agent / FDE building a downstream-tool integration\n    needs the canonical 5 example client profile_ids (ichigo_20a /\n    rice_200a / new_corp / dairy_100head / minimal) — PII-clean\n    fixtures — to discover available reference shapes before fetching\n    full payloads via get_example_profile_am. ¥3 vs ~2-turn 外部 LLM\n    \"list available example profiles + their shape\" chain (¥120).\n    Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest: CC0 fixtures, NOT anonymised real client\n    records — caller must NEVER substitute these for actual client\n    input.\n    For personas: AX_engineer running an integration smoke test\n    (validate_business_profile fixture call), FDE building a\n    \"try-it-now\" UI surfacing example shapes, agent demoing a\n    downstream tool with deterministic input, developer onboarding\n    needing copy-paste seeds for evaluate_tax_applicability /\n    bid_eligible_for_profile / DD tools.\n    Example: (no args) → returns {total:5, results:[{profile_id:\n    \"ichigo_20a\", label:\"いちご農家 20a\", summary:\"…\"}, …5 entries…]}.\n    Not for: fetching actual profile JSON (use get_example_profile_am);\n    real client record retrieval (these are CC0 fixtures — never\n    substitute for production client data); controlled-vocabulary\n    enumeration (use list_static_resources_am for taxonomies);\n    database-level enum values (use enum_values_am)."
    },
    {
      "name": "get_example_profile_am",
      "description": "Return one canonical client profile JSON as a complete-payload example.\n\n    Use this as a copy-paste seed for the ``business_profile`` argument to\n    ``evaluate_tax_applicability`` / ``bid_eligible_for_profile`` / DD tools —\n    every required key is present with a plausible value.\n\n    Example:\n        get_example_profile_am(profile_id=\"ichigo_20a\")\n        → {\"profile_id\": \"ichigo_20a\", \"profile\": {...}, \"license\": \"CC0-1.0\"}\n\n    When NOT to call:\n        - To enumerate available profile_ids → use list_example_profiles_am.\n        - To fetch a TAXONOMY (seido / glossary / 助成区分) → use get_static_resource_am.\n        - For a real client's data — these are PII-clean fixtures, not real records.\n\n    When to use: agent / FDE has a profile_id (one of 5: ichigo_20a /\n    rice_200a / new_corp / dairy_100head / minimal) and needs the full\n    CC0 example client payload as a copy-paste seed for a downstream\n    tool's business_profile argument — every required key is present\n    with a plausible value. ¥3 vs ~2-turn 外部 LLM \"construct a valid\n    business_profile shape with all required keys\" chain (¥120).\n    Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest: PII-clean fixture, NOT anonymised real client\n    data — the profile is structurally complete, never client-specific.\n    For personas: AX_engineer wiring a smoke test for\n    evaluate_tax_applicability / bid_eligible_for_profile / DD tools,\n    FDE building a \"try this example\" demo flow surfacing seeded\n    inputs, developer onboarding needing a deterministic complete\n    business_profile shape, integration test pinning a fixture payload.\n    Example: profile_id=\"ichigo_20a\" → returns {profile_id:\"ichigo_20a\",\n    profile:{industry_jsic:\"…\", area_a:20, kojin_or_houjin:\"…\", …all\n    required keys…}, license:\"CC0-1.0\"}.\n    Not for: discovering valid profile_ids (use list_example_profiles_am\n    first); fetching taxonomy / 助成区分 / glossary (use\n    get_static_resource_am); real client data retrieval (these are\n    CC0 fixtures — never substitute for production client input); 採択\n    / 助言 emission downstream (substrate only); persistent profile\n    storage (call returns a fresh fixture every time)."
    },
    {
      "name": "match_succession_am",
      "description": "[SUCCESSION-MATCH] M&A / 事業承継 制度 matcher: scenario (親族内 / 第三者M&A / 役員従業員) と 売上 / 従業員数 / 代表者年齢 から、適用候補となる 補助金・税制 (事業承継税制 / 相続税精算課税)・法令支援 (経営承継円滑化法) を返す。deterministic retrieval, NO LLM. 1 unit = 1 call. §52 / §72 envelope.\n\n        WHEN:\n          - 「後継者問題を抱える中小企業はどの制度を使えるか?」\n          - 「親が会社を子に渡したい時の税制は?」\n          - 「M&Aで第三者承継する場合の補助金は?」\n          - 「役員に株式を譲渡する EBO の支援策は?」\n\n        WHEN NOT:\n          - 個別の相続税・贈与税 の申告計算 → 税理士へ\n          - 経営承継円滑化法 認定申請の代行 → 認定経営革新等支援機関へ\n          - 特定 M&A案件 の評価 → FA / M&A仲介機関へ\n          - 単一制度の探索 → search_programs\n\n        RETURNS (envelope):\n          {\n            scenario, scenario_label_ja,\n            profile_summary: { current_revenue_jpy, employee_count, owner_age },\n            is_chusho_kigyo: bool,\n            early_succession_advised: bool,\n            primary_levers: [str],\n            programs: [{unified_id, name, tier, source_url, ...}],\n            tax_levers: [{name, summary, primary_source_url, applicability_note}],\n            legal_support: [{unified_id, law_title, source_url, ...}],\n            next_steps: [str],\n            provenance: { data_origin, program_corpus_size, ... },\n            _disclaimer: str (mandatory)\n          }\n\n        When to use: 税理士 / 中小企業診断士 / 認定経営革新等支援\n        機関 office or agent triaging 事業承継 / M&A scheme (親族\n        内 / 第三者承継 / EBO) for an SME client — by scenario ×\n        売上 × 従業員数 × 代表者年齢 — returning applicable\n        補助金 + 税制 (事業承継税制 / 相続税精算課税) + 法令支援\n        (経営承継円滑化法) with profile_summary + early_succession\n        flag + next_steps — ¥3 vs ~7-turn 外部 LLM \"search 補助金\n        + 税制特例 + 法令支援 + 中小企業判定 + advise\" chain (¥420).\n        Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest: deterministic retrieval, NO LLM; output\n        is candidate list + 中小企業判定 boolean (not 採択 / 適用\n        保証); next_steps is scaffold, not 助言.\n        For personas: 税理士 office screening 顧問先 で 事業承継\n        制度適用候補, 中小企業診断士 office prepping 経営承継計画\n        for SME client, 認定経営革新等支援機関 surfacing initial\n        ladder before deep advisory, FDE building \"show me 制度\n        ladder for client X facing 後継者問題\" widget, agent\n        triaging \"EBO で使える支援策は?\" question.\n        Example: match_succession_am(scenario=\"m_and_a\",\n        current_revenue=300_000_000, employee_count=25,\n        owner_age=72) → {scenario:\"m_and_a\",\n        scenario_label_ja:\"第三者承継・M&A\",\n        profile_summary:{current_revenue_jpy:300000000,\n        employee_count:25, owner_age:72}, is_chusho_kigyo:true,\n        early_succession_advised:true,\n        primary_levers:[\"事業承継・引継ぎ補助金\", \"経営承継円滑化法\",\n        \"M&A仲介\"], programs:[{unified_id:\"...\", name:\"...\",\n        tier:\"S\", source_url:\"...\"}, ...], tax_levers:[{name:\n        \"事業承継税制 特例措置\", summary:\"...\",\n        primary_source_url:\"https://www.nta.go.jp/...\",\n        applicability_note:\"...\"}, ...], legal_support:[{\n        unified_id:\"law:keieishoukei_enkatsukahou\",\n        law_title:\"経営承継円滑化法\", source_url:\"...\", ...}],\n        next_steps:[\"特例承継計画 を 認定経営革新等支援機関 へ\n        提出\", ...], provenance:{data_origin:\"am.programs +\n        am.tax_rules + am.law_articles\",\n        program_corpus_size:11601, ...}, _disclaimer:\"<§52/§72>\"}.\n        Not for: 個別 相続税 / 贈与税 申告計算 (税理士法 §52 fence\n        — agent surfaces lever candidates, final 計算 / 申告 belongs\n        to 税理士); 経営承継円滑化法 認定申請代理 (認定経営革新等\n        支援機関 fence — agent scaffolds, final 申請 belongs to\n        認定機関); M&A案件 評価 / DD (FA / M&A 仲介機関 fence);\n        単一制度 lookup (search_programs); 採択 / 適用保証 (景表法\n        fence — candidate list, NOT 保証); 後継者選定 / 株価評価\n        (substrate only — 助言 belongs to 士業)."
    },
    {
      "name": "succession_playbook_am",
      "description": "[SUCCESSION-PLAYBOOK] 標準 事業承継 playbook (7 step) + advisor chain (税理士 + M&A仲介 + 認定支援機関 + 司法書士 + 弁護士) + cliff dates (特例承継計画 提出期限 / 特例措置 適用期限). NO LLM. 1 unit. §52 envelope.\n\n        WHEN:\n          - 「事業承継ってまず何から始めればいい?」\n          - 「税理士・M&A仲介・弁護士・司法書士の役割分担は?」\n          - 「特例承継計画 の提出期限はいつ?」\n\n        WHEN NOT:\n          - scenario 別 制度マッチ → match_succession_am\n          - 個別案件の advisory → 認定経営革新等支援機関へ\n\n        RETURNS (envelope):\n          {\n            overview_ja, typical_horizon_years, advisor_chain: [str],\n            steps: [{step_no, label_ja, advisor_kind, horizon, deliverables, primary_sources}],\n            cliff_dates: [{date, label_ja, note}],\n            primary_sources: [{name, url}],\n            _disclaimer: str (mandatory)\n          }\n\n        When to use: 中小企業 keieisha / 認定経営革新等支援機関 / 税理士\n        office triaging \"where do I start with 事業承継\" — needs the\n        canonical 7-step playbook + 5-actor advisor chain + cliff dates\n        (特例承継計画 / 特例措置 expiry) in one ¥3 call before\n        scenario-specific matching. ¥3 vs ~5-turn 外部 LLM \"what's the\n        standard 事業承継 sequence + who does what + statutory deadlines\"\n        chain (¥300). Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest: returns 標準 playbook, not\n        client-specific — scenario matching belongs to match_succession_am.\n        For personas: 中小企業 keieisha first-time 承継 enquiry, 税理士\n        office onboarding a 承継 engagement, 認定経営革新等支援機関 doing\n        intake-level guidance for SMEs, M&A 仲介 office showing the\n        full advisor chain to position their role, FDE building a\n        承継-stage decision tree UI.\n        Example: (no args) → returns {overview_ja:\"…\",\n        typical_horizon_years:5, advisor_chain:[\"税理士\",\"M&A仲介\",\n        \"認定経営革新等支援機関\",\"司法書士\",\"弁護士\"], steps:[…7\n        entries…], cliff_dates:[{date:\"2027-03-31\", label_ja:\"特例\n        承継計画 提出期限\", note:\"…\"}, …], primary_sources:[…],\n        _disclaimer:\"…\", _billing_unit:1}.\n        Not for: scenario-specific 制度 matching (use\n        match_succession_am); 個別案件 advisory emission (税理士法 §52 /\n        弁護士法 §72 / 行政書士法 §1 fence — final 助言 belongs to the\n        named advisor); 株価評価 / 相続税試算 (税理士 §52 fence);\n        legal 遺留分対応 / 種類株式設計 (弁護士 §72 / 司法書士 §3);\n        cliff-date overrides — surfaced dates reflect current law,\n        future amendments require re-fetch."
    },
    {
      "name": "list_tax_sunset_alerts",
      "description": "[TIMELINE-TAX] Returns tax measures whose effective_until falls within the next N days, plus 大綱 cliff date buckets. Output is search-derived from source-derived dataset (57 rows with effective_until); verify primary source (source_url) for sunset confirmation.\n\n    WHAT: `source-derived dataset.effective_until`` が today..today+days_until に入る\n    rule を `source-derived dataset` (parent measure) と JOIN して返す。同じ\n    measure が複数 rule_type を持つ場合は別行 (= 別 rule) として返す。\n\n    WHEN:\n      - 「来年度どの税制優遇が消えるか?」\n      - 「2027-03-31 cliff の影響範囲は?」(only_critical=True で絞れる)\n      - 事業計画 / 投資判断における sunset alert\n\n    WHEN NOT:\n      - 全税制 list が欲しい → search_tax_incentives\n      - 特定 rule の詳細 → get_am_tax_rule(measure_name_or_id)\n      - 廃止後の後継制度 → get_am_tax_rule + ``note`` フィールド参照\n\n    RETURNS (envelope):\n      {\n        total: int,\n        results: [\n          {\n            measure: { canonical_id, name, canonical_status },\n            rule_type: str,                # credit / deduction / ...\n            base_rate_pct: float|null,\n            cap_yen: int|null,\n            effective_from: str|null,\n            effective_until: str,          # YYYY-MM-DD\n            days_remaining: int,\n            article_ref: str|null,\n            source_url: str,\n            note: str|null,\n            is_critical_cliff: bool,\n          }, ...\n        ],\n        cliff_dates: { \"2027-03-31\": 29, ... },  # bucket counts (within window)\n        data_as_of: str,                          # today JST ISO date\n        filter_applied: { days_until, only_critical, limit },\n      }\n\n    On failure / empty result returns the canonical error envelope\n    (``code`` ∈ {``no_matching_records``, ``db_unavailable``}) with\n    ``retry_with`` pointing back to ``search_tax_incentives``.\n\n    0 件の場合は `hint` (再検索の提案) と `retry_with` (関連 tool 候補) を返します。"
    },
    {
      "name": "tax_rule_full_chain",
      "description": "[TAX-CHAIN] 税制 (TAX-*) を巡る解釈一式を 1 call で取得: 規定本文 + 根拠条文 (laws) + 通達 (nta_tsutatsu_index) + 裁決事例 (nta_saiketsu) + 判例 (court_decisions) + 改正履歴 (sibling tax_rulesets). 出力は citation のみで税務助言 (税理士法 §52) ・法令解釈 (弁護士法 §72) ・監査意見 (公認会計士法 §47条の2) ではない。各 row source_url で原典確認必須。\n\n        When to use: 税理士 / 会計士 agent has a 税制 (TAX-*)\n        id and wants the full interpretation surface in 1 ¥3\n        call — 規定本文 + 根拠条文 (laws) + 通達\n        (nta_tsutatsu_index) + 裁決事例 (nta_saiketsu) + 判例\n        (court_decisions) + 改正履歴 (sibling tax_rulesets).\n        Skips multi-tool fan-out (search_laws → search_tsutatsu\n        → search_saiketsu → ...) for one metered call. Use\n        include / max_per_axis to narrow.\n        For personas: 税理士 prepping a 法人税 / 所得税 /\n        消費税 解釈 memo; 会計士 doing 監査評価 with full\n        precedent chain; 中小企業診断士 advising on tax\n        treatment options; AX engineer wiring a tax-rule\n        explainer; FDE designing a tax chain composition tool.\n        Example: rule_id=\"TAX-0a1b2c3d4e\",\n        include=[\"laws\",\"tsutatsu\",\"saiketsu\"],\n        max_per_axis=5 → returns {\"rule_id\":\n        \"TAX-0a1b2c3d4e\", \"rule_body\": \"...\", \"laws\":\n        [...up to 5...], \"tsutatsu\": [...up to 5...],\n        \"saiketsu\": [...up to 5...], \"schema_version\":\n        \"tax_chain.v1\", \"_billing_unit\": 1, \"no_llm\": true},\n        each row carrying source_url for 原典確認.\n        Not for: 税務助言 final 判断 (税理士法 §52 fence —\n        税理士 reviews chain); 法令解釈 final (弁護士法 §72\n        fence); 監査意見 (公認会計士法 §47条の2 fence);\n        per-axis deep walk (use search_tax_incentives /\n        search_kokkai_utterance for surface-specific narrowing).\n        Always cross-check each row source_url against current\n        原典 — chain is a snapshot."
    },
    {
      "name": "get_am_tax_rule",
      "description": "[DISCOVER-TAX-RULE] Returns structured tax rule rows for a 税制措置 (rate / cap / 根拠条文 / 適用期限) from source-derived dataset. One measure can return multiple rows when both 特別償却 and 税額控除 exist. Output is search-derived; verify primary source (source_url) for filing decisions.\n\n    WHAT: source-derived dataset から (tax_measure_entity_id, rule_type) PK の\n    structured row を返す。1 つの税制で「特別償却 or 税額控除」が両方\n    存在する場合は 2 行返る。\n\n    WHEN:\n      - 顧客: 「DX 投資減税を使いたい」「5G税制はまだ使える?」\n        「エンジェル A型 と B型 の違い」\n      - LLM: search_tax_incentives が free-text で候補を出した後、\n        特定の measure_id をこの tool に渡して rate / 期限 / 条文 を\n        確定させる use case がメイン。\n\n    WHEN NOT:\n      - 全税制を横断検索したい → search_tax_incentives\n      - 条文内容そのもの → search_by_law\n      - 補助金 → search_programs\n      - 併用可能制度の全グラフ → related_programs (relation graph)\n\n    RETURNS (envelope):\n      {\n        total: int,\n        results: [\n          {\n            tax_measure: { canonical_id, name, canonical_status },\n            rule_type: str,\n            base_rate_pct: float|null,\n            cap_yen: int|null,\n            eligibility: dict,   # JSON from eligibility_cond_json\n            combinable_with: [canonical_id, ...],\n            effective_period: { from, until },\n            article_ref: str,    # 租税特別措置法 第X条\n            source: { url, fetched_at },\n            note: str|null,\n          }, ...\n        ],\n        hint?: str,              # e.g. 「該当制度は廃止済み」 (only on success)\n      }\n\n    On failure / no result, returns the canonical envelope:\n      { total: 0, results: [], error: { code, message, hint, severity,\n        retry_with, ... } } where ``code`` is one of ``seed_not_found``\n      (measure_name_or_id did not resolve), ``no_matching_records``\n      (measure resolved but no source-derived dataset rows), or ``db_unavailable``."
    },
    {
      "name": "query_at_snapshot_v2",
      "description": "[AUDIT, SENSITIVE — §52 / §47条の2] Time Machine. Returns the program's eligibility / amount / deadline frozen at as_of, with 3-axis citation (source_url + source_fetched_at + source_sha256). Pivots off source-derived dataset (14,596 captures, 144 definitive-dated). NOT 採択 prediction; factual replay only.\n\n        When to use: 監査 / 税務代理 agent needs to know what the program looked like at\n        a specific historical date (as_of YYYY-MM-DD JST). Returns frozen eligibility +\n        amount + deadline at that date, with 3-axis citation (source_url + source_fetched_at\n        + source_sha256). Pivots off source-derived dataset (14,596 captures, 144 definitive-\n        dated). Pure factual replay; NOT 採択 prediction.\n        For personas: 公認会計士 / 監査法人 producing 監査調書 referring to the program state\n        as of 期末日 (final §47条の2 監査意見 belongs to 公認会計士); 税理士 substantiating\n        a past-period eligibility claim during 税務調査 (final §52 税務代理 belongs to\n        税理士); 弁護士 reading the past-state of a regulation in litigation; AX_engineer\n        wiring a \"time travel\" widget.\n        Example: program_id=\"program:IT_DOUNYUU_HOJOKIN\", as_of=\"2025-04-01\" → returns the\n        program's eligibility + amount + deadline frozen on that date with citation envelope.\n        Not for: future-state forecast (this is past-tense factual replay; use forecast_program_renewal\n        for forward-looking signals); 採択 prediction (use outcome_acceptance_probability);\n        free-text 監査意見 / 税務助言 emission (use peer group artifact builders). NO LLM\n        inference inside this tool."
    },
    {
      "name": "query_program_evolution",
      "description": "[AUDIT, SENSITIVE — §52 / §47条の2] Time Machine — 12-month evolution grid. Runs query_at_snapshot at every month-end of `year` in one call (single ¥3 metered event, 11 stored resultd reads). Surfaces change_months for diligence walks. NOT 採択 prediction; factual replay only.\n\n        When to use: 監査 / 行政書士 / 中小企業診断士 agent\n        wants the 12-month replay of a 制度 over `year` — the\n        end of each month snapshot of program metadata + status\n        + amendment events, with change_months surfaced for\n        diligence walks. Use for amendment archaeology,\n        regulatory watch back-tests, and 採択判断 baseline\n        reconstruction. 1 metered event covers all 12 reads\n        (11 are stored resultd replay).\n        For personas: 監査法人 / 公認会計士 doing 監査 evidence\n        replay; 行政書士 reconstructing 申請 baseline for\n        retrospective claim; 弁護士 prepping a 改正 impact\n        timeline; AX engineer wiring a regulatory diff watcher;\n        FDE designing a 制度 history scaffold.\n        Example: program_id=\"UNI-MONOZUKURI\", year=2024 →\n        returns {\"program_id\": \"...\", \"year\": 2024,\n        \"snapshots\": [{\"month_end\": \"2024-01-31\", \"program\":\n        {...}}, ..., {\"month_end\": \"2024-12-31\", \"program\":\n        {...}}], \"change_months\": [\"2024-04-30\", \"2024-09-30\"],\n        \"schema_version\": \"time_machine.evolution.v1\",\n        \"_billing_unit\": 1, \"no_llm\": true}.\n        Not for: 過去の採択実績 forecasting (use outcome_acceptance_\n        probability — this is factual replay only); 税理士法\n        §52 final 判断 (§52 fence — replay is evidence\n        substrate); 監査意見 final 表明 (§47条の2 fence);\n        future-month snapshot (use query_snapshot_as_of_v2 for\n        a specific date instead)."
    },
    {
      "name": "program_timeline_am",
      "description": "[TIMELINE] Per-program annual adoption rollup + next_round (closest open / upcoming source-derived dataset) + competition_proxy (adoption_per_round). Reads source-derived dataset (201,845) + source-derived dataset (1,256). Single ¥3/billable unit. NO LLM. §52 / §47条の2 / §1 sensitive — information retrieval, not 申請代理 / 税務助言.\n\n        When to use: agent has a program canonical_id (UNI-... or program:...) and wants\n        the per-program annual adoption history + the closest open / upcoming round +\n        a competition proxy (adoption_per_round). Reads 201K source-derived dataset + 1.2K\n        source-derived dataset. Pure factual rollup; competition_proxy is structural, NOT a\n        forecast.\n        For personas: 中小企業診断士 / 行政書士 producing 経営改善計画 scaffold material\n        with adoption history (final §1 申請代理 belongs to 行政書士); FDE building per-\n        program adoption dashboards; 税理士 reading the adoption history for refund risk\n        planning; AX_engineer wiring a \"program lifecycle\" widget; researcher producing\n        per-program adoption baseline studies.\n        Example: program_id=\"program:IT_DOUNYUU_HOJOKIN\", years=5 → returns yearly adoption_count\n        + total_amount_yen + distinct_houjin + next_round + competition_proxy with citation\n        envelope.\n        Not for: 採択 prediction (use outcome_acceptance_probability; competition_proxy is\n        a retrospective ratio, NOT prediction); cross-program timeline (use cases_timeline_trend_am);\n        free-text 申請書面 drafting (use 行政書士 peer group artifact builders under §1). NO LLM\n        inference inside this tool."
    },
    {
      "name": "cases_timeline_trend_am",
      "description": "[TIMELINE-TREND] 業種 (JSIC prefix) × 地域 (prefecture) × 時間 (year) trend over source-derived dataset: yearly adoption_count / distinct_houjin / distinct_program_count / total_amount_yen + trend_flag (least-squares slope). Single ¥3/billable unit. NO LLM. §52 / §47条の2 / §1 sensitive.\n\n        When to use: agent wants a 業種 × 地域 × 時間 timeline\n        of 採択 trends — yearly adoption_count + distinct_houjin\n        + distinct_program_count + total_amount_yen + trend_flag\n        (least-squares slope). Use as a peer group planning input\n        before deciding which program family / region to push.\n        Factual rollup only; trend_flag is a structural\n        slope-sign, not a forecast.\n        For personas: 中小企業診断士 / 行政書士 doing 業種 ×\n        地域 peer group briefing; 自治体 / 商工会議所 staff\n        building peer group report; AX engineer wiring an analytics\n        dashboard; FDE designing a 採択 peer group time-series\n        view; researchers benchmarking 採択 distribution shifts.\n        Example: industry=\"E29\", prefecture=\"愛知県\", years=5\n        → returns {\"industry\": \"E29\",\n        \"prefecture\": \"愛知県\", \"years\": 5,\n        \"rows\": [{\"year\": 2022, \"adoption_count\": 482,\n        \"distinct_houjin\": 318, \"distinct_program_count\": 67,\n        \"total_amount_yen\": 4820000000, \"trend_flag\": \"flat\"},\n        ...up to 5...], \"schema_version\":\n        \"timeline_trend.v1\", \"_billing_unit\": 1, \"no_llm\":\n        true}.\n        Not for: 過去の採択実績 forecasting (use outcome_acceptance_\n        probability for predictive axis — trend_flag is slope,\n        not probability); per-houjin recommendation (use\n        cohort_match or recommend_programs_for_houjin);\n        税務 final 助言 (§52 fence); 行政書士 申請書作成\n        (§1 fence); 監査意見 (§47条の2 fence). The slope-sign\n        is structural — does not endorse a single program over\n        another."
    },
    {
      "name": "upcoming_rounds_for_my_profile_am",
      "description": "[UPCOMING-ROUNDS] Match every source-derived dataset closing in the next horizon_days against the calling key's client_profiles via JSIC × prefecture × target_types × last_active_program overlap. Authenticated only — anon receives empty match list. Single ¥3/billable unit. NO LLM. 行政書士法 §1 sensitive — pure schedule data, not 申請代理.\n\n        When to use: authenticated agent (api_key_hash injected by MCP dispatcher) wants\n        the list of source-derived dataset windows closing in the next horizon_days that\n        match the calling key's persisted client_profiles via JSIC × prefecture × target_types\n        × last_active_program overlap. Anonymous callers receive an empty match list.\n        Pure schedule retrieval; 1 ¥3 unit.\n        For personas: 行政書士 building a \"my-clients-this-month\" briefing dashboard (final\n        §1 申請代理 belongs to 行政書士); 中小企業診断士 prioritising client outreach by\n        deadline; 自治体 / 商工会議所 LP teams matching against their peer group book; AX_engineer\n        wiring an \"upcoming rounds\" widget for an authenticated agent.\n        Example: api_key_hash=<auto>, horizon_days=60 → returns matched rounds in the next\n        60 days keyed by profile_id with JSIC × prefecture overlap rationale.\n        Not for: anonymous discovery (use list_open_programs for the unfiltered list);\n        per-program calendar (use get_program_calendar_12mo); 申請書面 drafting (use 行政書士\n        peer group artifact builders under §1). NO LLM inference inside this tool."
    },
    {
      "name": "search_trademark_published",
      "description": "[TRADEMARK-PUBLISHED] 商標公報 + 意匠公報 + 国際商標公報 search (INPIT + 特許庁 gazette OCR moat). NO LLM, ¥3/billable unit metered. `_disclaimer` 必須。\n\n        WHAT\n        ----\n        商標公報 (公開 / 登録 / 国際 / 意匠) の application_number / 出願人 /\n        Nice 区分 / 指定商品役務 / publication_date / 個別 PDF URL を\n        deterministic に検索。Q7 弁理士 peer group moat = 外部 LLM 単独では\n        架空 placeholder しか吐けない領域 (jpcite empirical 0% citation\n        accuracy, STRATEGY_V3 §2 Q7).\n\n        Indexed corpus (post-W2 AWS-I, $884 scenario C):\n          * TM_PUB 公開商標公報 (weekly Tue, 50p/issue, 104 weeks)\n          * TM_REG 商標公報 (登録商標, weekly Wed, 50p/issue)\n          * TM_INTL 国際商標公報 (Madrid Protocol, weekly, 30p/issue)\n          * DSGN 意匠公報 (weekly Tue, 40p/issue)\n        合計 17,680 page × 2 years (2024-05-20 〜 2026-05-18 retention floor).\n\n        WHEN\n        ----\n          - 「Class 9 × 35 × 42 で先行商標を全部出して」(SaaS / SW 出願前 FTO)\n          - 「株式会社 X が直近 2 年で何の商標を出してる?」(競合 watch)\n          - 「商標 'public corpus' が登録されているか?」(出願戦略 / 抵触調査)\n          - 「2026 年 5 月の公開商標公報 50 件を date 順に列挙」\n\n        WHEN NOT\n        --------\n          - 弁理士による拒絶理由通知応答 → 弁理士法 §75 独占業務、本ツール対象外\n          - 商標分類 (Nice/Vienna/JLA) 解説 → 別ツール: list_static_resources_am\n          - 特許 (発明) 公報の検索 → 別 lane (W2 は 商標 + 意匠 限定、特許は別 lane)\n          - 海外 (中国 / 韓国 / EU) 商標 → country='JP' 限定、TM5 拡張は別 lane\n          - 文書/プロセ作成 → scaffold-only clause、本ツールは information retrieval のみ\n\n        RETURNS (envelope)\n        ------------------\n        ::\n\n            {\n              input: {text, applicant_name, nice_class, country, limit},\n              total: int,\n              limit, offset, results: [\n                {\n                  publication_type: \"TM_PUB\" | \"TM_REG\" | \"TM_INTL\" | \"DSGN\",\n                  publication_date: \"YYYY-MM-DD\",\n                  year, iso_week, expected_pages,\n                  application_number: \"商願YYYY-NNNNNN\" | null (pre-W2),\n                  applicant_name: str | null (pre-W2),\n                  applicant_address: str | null (pre-W2),\n                  nice_class: [int] | null (pre-W2),\n                  trademark_string: str | null (pre-W2),\n                  status: \"published\" | \"registered\" | \"scaffold_metadata_only\",\n                  source_url: str,\n                  _data_status: \"pre_aws_i_scaffold\" | \"live\"\n                },\n                ...\n              ],\n              data_status: \"pre_aws_i_scaffold\" | \"live\",\n              data_status_note: str,\n              source_manifest: {id, created_at_utc, scope_window},\n              _disclaimer, _billing_unit, _next_calls\n            }\n\n        DATA QUALITY HONESTY\n        --------------------\n        Pre-AWS-I (W2) wet-run の現時点では `data_status=\"pre_aws_i_scaffold\"`\n        を返し、per-record OCR フィールド (application_number / applicant_name /\n        nice_class / goods_services / trademark_string) は null。Issue-level\n        metadata (publication_type / publication_date / 期待 page 数) のみ\n        seed manifest (100 issues) から返す。W2 wet-run ($884) 後、Glue\n        table `trademark_published_ocr` を読み substitution する。\n\n        BILLING\n        -------\n        Tier A — 1 tool call = 1 ¥3 課金単位 (税込 ¥3.30)。\n\n        Cost saving vs 外部 LLM alone\n        ------------------------------\n        Q7 弁理士 peer group 経験値: 外部 LLM で先行商標 lookup を試みると 7-turn\n        ¥56-85 / 質問 + ハルシネーション (架空 application_number / 架空\n        出願人 = 0% citation accuracy)。jpcite ¥3-12 / 質問 で deterministic\n        な公報番号 + 出願人 + 出願日 + Nice 区分 + 個別 PDF URL を引ける。\n        cost saving (benchmark pending) + citation accuracy 0% → 100%。"
    },
    {
      "name": "validate",
      "description": "[VALIDATE] applicant_data を source-derived dataset の active 述語で評価し、\n    rule 単位の passed/failed/deferred を返す (deferred = jpcite で評価できない外部依存述語).\n\n    WHAT:\n      `source-derived dataset` の active=1 / effective window 有効 / scope 適合 rule を選び、\n      python_dispatch 述語のうち既知の intake validation 述語はローカル実装で評価、\n      それ以外 (sql_expr / json_logic / 未登録 dispatch) は ``passed=null`` で deferred 返却。\n      評価結果は `source-derived dataset` に ``INSERT OR IGNORE``、同 (rule, entity, applicant_hash)\n      は SELECT-first で stored result 返却。\n\n    WHEN:\n      - LLM が \"この applicant_data に sanity 違反がないか\" 一括 check したい\n      - 画面やワークフローに出す前段で training_hours/work_days/weekly_hours の桁ミス除去\n      - 申請額 50 億超 / 開始年 ±20/+10 範囲外 / 生年-自己申告年齢 1y 以上ずれ の検出\n\n    WHEN NOT:\n      - 制度個別の eligibility 判定 → check_exclusions / search_programs\n      - 文書粒度の fact-check → 別 tool\n      - sql_expr / json_logic 述語が登録されたら本 tool では deferred 返却\n\n    RETURNS (envelope):\n      {\n        total: int,\n        applicant_hash: str,\n        scope: str,\n        entity_id: str | null,\n        summary: { passed: int, failed: int, deferred: int },\n        results: [\n          {\n            rule_id: int,\n            predicate_ref: str,\n            predicate_kind: 'python_dispatch' | 'sql_expr' | 'json_logic',\n            passed: true | false | null,\n            severity: 'info' | 'warning' | 'critical',\n            message_ja: str,\n            evaluated_at: str | null,\n            stored resultd: bool,\n          }, ...\n        ]\n      }"
    },
    {
      "name": "evidence_with_provenance_chain",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1] release chain — evidence_with_provenance (dim P + Q + O + N). Locks a fact to a monthly snapshot, builds an Ed25519-signable canonical payload, and gates the response behind k=5 peer group floor. Returns ComposedEnvelope with composed_steps (time_machine.query_as_of + explainable_fact.canonical_payload + anonymized_query.check_k_anonymity) + compression_ratio. NO LLM, 3 ¥3 units (税込 ¥9.90 — heavy compound tier).\n\n        When to use: agent needs one fact locked to a monthly snapshot,\n        signable canonical Ed25519 payload, and k=5 peer group floor in one\n        atomic call (provenance + signing + anonymity). ¥9.90 vs 4\n        atomic dim P+Q+O+N round trips. Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published.\n        guarantee.\n        For personas: 会計士 (期末 fact 改ざん不能 lineage substrate),\n        税理士 (改正前後 lineage with tamper-evident citation),\n        AX_engineer wiring a tamper-evident fact API for 顧客 audit,\n        FDE 顧客 immutable fact ledger pipeline.\n        Example: fact_id=\"fact:program:UNI-it-2025-001:adoption_rate:\n        2024-Q4\", cohort_size=12, dataset_id=\"programs\", as_of_date=\n        \"2025-04-01\", source_doc=\"https://www.meti.go.jp/…\" → returns\n        ComposedEnvelope with composed_steps: time_machine.query_as_of\n        (pivot 2025-04) + explainable_fact.canonical_payload\n        (canonical_payload_hex) + check_k_anonymity (12 >= 5 →\n        supported), compression_ratio, citation chain envelope.\n        Not for: cohort_size < 5 (downgrades to \"partial\" with warning,\n        agent must respect); free-form fact lineage (use dim Q atomic);\n        現在時点 rolling fact (set as_of_date=\"\" for rolling envelope);\n        助言 emission (lineage is fact-immutability proof, not 助言)."
    },
    {
      "name": "session_aware_eligibility_check_chain",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1] release chain — session_aware_eligibility_check (dim L + M + K). Opens a 24h session_context, evaluates rule_tree, enqueues a predictive_service event so the subject is notified the next time the underlying ruleset changes, then closes the session. Returns ComposedEnvelope with composed_steps (session_context.open_session + rule_tree.evaluate_tree + predictive_service.enqueue_event + session_context.close_session) + verdict + session_token_id. NO LLM, 3 ¥3 units (heavy compound tier).\n\n        When to use: agent needs a one-shot \"evaluate eligibility AND keep\n        watching for change\" call — session_context preserves subject\n        state for 24h, rule_tree returns the deterministic verdict, and\n        predictive_service enqueues a re-eval the moment the underlying\n        ruleset (program / amendment / houjin) mutates. ¥9 (3 ¥3 units)\n        vs ~7-turn 外部 LLM \"evaluate + watch + retry next month\" chain\n        (¥420). Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest: rule_tree omitted → session+watch\n        only, no verdict.\n        For personas: AX_engineer wiring a long-running eligibility\n        watcher, FDE building a multi-tenant subscription-renewal pipe,\n        agent setting up a 24h-window re-check for a 補助金 amendment.\n        Example: subject_id=\"houjin:1234567890123\",\n        predictive_target_id=\"program:jigyou_saikouchiku\",\n        rule_tree_json={\"op\":\"and\",\"children\":[…]} → returns\n        {composed_steps:[…], verdict:{result:\"eligible\", reasons:[…]},\n        session_token_id:\"sess_…\", _billing_unit:3} envelope.\n        Not for: rule_tree without dim M schema (rejected at evaluate);\n        sessions > 24h (close_session forces expiry); 採択保証 / 採択\n        prediction (eligibility != 採択); 与信判断 emission (final 助言\n        belongs to 士業); persistent PII storage (saved_context is opaque\n        free-shape — caller must avoid raw 個人情報 / 個人特定 keys)."
    },
    {
      "name": "federated_handoff_with_audit_chain",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1] release chain — federated_handoff_with_audit (dim P + R + N). When jpcite cannot answer, asks the curated 6-partner federation (freee/mf/notion/slack/github/linear) for a handoff recommendation, then writes one APPI-grade audit row (peer group hash + redact policy + outcome reason). Returns ComposedEnvelope with composed_steps (federated_mcp.recommend_handoff + anonymized_query.write_audit_entry) + recommendations[] + audit_entry. NO LLM, no HTTP, 3 ¥3 units (heavy compound tier).\n\n        When to use: agent has a gap jpcite cannot answer and needs both\n        a federated partner recommendation AND a tamper-evident audit\n        row for the handoff event (regulator / customer auditor proof).\n        ¥9 (3 ¥3 units) vs ~6-turn 外部 LLM \"which partner + write audit\"\n        chain (¥360). Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest: never self-references; audit\n        row is APPI k=5 peer group-hash, never raw 個人情報.\n        For personas: FDE wiring an agent router with regulator-grade\n        provenance, AX_engineer building a multi-MCP delegation pipe\n        with audit trail, 士業 office surface re-routing 顧客 query to\n        the right partner while preserving consent trail.\n        Example: query_gap=\"freee の請求書 #1234 が必要\",\n        industry=\"サービス業\", size=\"sme\" → returns {composed_steps:[…],\n        recommendations:[{partner_id:\"freee\", …}], audit_entry:\n        {cohort_hash:\"sha256:…\", redact_policy:\"appi_k5\",\n        outcome_reason:\"gap_routed\"}, _billing_unit:3}.\n        Not for: max_results > 6 (capped — federation hard cap); self-\n        reference (jpcite/public corpus/public corpus rejected at registry load);\n        raw PII surface in query_gap (caller must redact 個人名 / 個人\n        番号 before submission); partner credential / token surface\n        (caller owns auth to delegated partner); 与信判断 emission\n        (delegation routing only — final 助言 belongs to delegated\n        partner + 士業)."
    },
    {
      "name": "temporal_compliance_audit_chain",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1] release chain — temporal_compliance_audit (dim Q + M + O). Resolves two monthly snapshots, runs counterfactual_diff (added/removed/changed/unchanged + content_hash_changed), evaluates a rule_tree over the diff, then builds an Ed25519-signable canonical payload for the verdict. Returns ComposedEnvelope with composed_steps (time_machine.query_as_of:baseline + :compare + counterfactual_diff + rule_tree.evaluate_tree + explainable_fact.canonical_payload). The \"monthly closing compliance regression\" surface. NO LLM, 3 ¥3 units (heavy compound tier).\n\n        When to use: 税理士 / 公認会計士 / 監査役 / 内部統制 office\n        running monthly closing wants a deterministic \"what changed in\n        the rulebook between baseline and compare snapshot + did the\n        client still pass\" trace with a signable payload for the\n        regulator. ¥9 (3 ¥3 units) vs ~8-turn 外部 LLM \"diff + re-eval\n        + canonical packaging\" chain (¥480). Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest:\n        canonical_payload is signable substrate — the actual sign\n        belongs to sign_fact via the operator's key.\n        For personas: 税理士 office monthly closing compliance regression,\n        公認会計士 監査調書 compliance walkthrough, 内部統制 J-SOX\n        change-management evidence package, FDE building monthly auto-\n        eval pipeline.\n        Example: dataset_id=\"programs\",\n        baseline_as_of_date=\"2026-04-01\",\n        compare_as_of_date=\"2026-05-01\", rule_tree_json={…} → returns\n        {composed_steps:[…], diff:{added:5, removed:2, changed:14},\n        verdict:{result:\"still_eligible\"}, canonical_payload:\"…ed25519\n        signable bytes…\", _billing_unit:3}.\n        Not for: snapshots > 24 months apart (diff blows up); rule_tree\n        without dim M schema (rejected); 採択保証 (compliance != 採択);\n        unsigned canonical_payload as authoritative regulator evidence\n        (caller must call sign_fact downstream); 与信判断 / 監査意見\n        emission (final 監査意見 belongs to 公認会計士 §47条の2)."
    },
    {
      "name": "anonymized_aggregate_query",
      "description": "[ANONYMIZED, SENSITIVE — §52/§47条の2/§72/§1] release dim N k-anonymity + PII-redact gate. Returns aggregates only when cohort_size >= K_ANONYMITY_MIN (5); otherwise returns absent envelope. PII fields in optional aggregates dict are stripped via structured whitelist + 6-pattern text redact (policy version dim-n-v1.1.0). Writes one append-only JSONL audit row per call. NO LLM, single ¥3 unit. 1M-entity statistical layer moat.\n\n        When to use: agent needs k=5 floor + PII redact + append-only\n        APPI audit trail in one call for a peer group aggregate surface.\n        ¥3 vs ~4-turn 外部 LLM \"redact + verify k + audit\" chain (¥240).\n        Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. 1M-entity statistical layer with policy versioned.\n        For personas: 会計士 (peer group 集計 APPI-grade redact substrate),\n        個人情報保護委員会 audit trail builder, AX_engineer wiring a\n        privacy-safe peer group dashboard, FDE 多テナント 安全な aggregate\n        surface.\n        Example: industry=\"製造業\", region=\"東京都\", size=\"sme\",\n        cohort_size=12, aggregates={avg_revenue: 50000000,\n        median_employee: 25, customer_name: \"山田\"} → returns {support\n        _state: \"supported\" (12>=5), aggregates: {avg_revenue: …,\n        median_employee: …} (customer_name stripped), audit_entry:\n        {timestamp, policy_version: \"dim-n-v1.1.0\", k: 5, cohort_size:\n        12, …}, _billing_unit: 1} envelope.\n        Not for: cohort_size < 5 (returns absent envelope — agent must\n        not surface aggregate); 個人特定 / 名寄せ 用途 (purpose violates\n        dim N spec); custom k threshold (K_ANONYMITY_MIN=5 hard floor);\n        aggregates dict outside JSON-serialisable types."
    },
    {
      "name": "sign_fact",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1] release dim O sign_fact. Builds the canonical UTF-8 payload bytes for (fact_id, FactMetadata 4-axis). Returns canonical_payload_hex deterministically (single source of truth shared with api/fact_verify). When AUTONOMATH_FACT_SIGN_PRIVATE_KEY env is set (32-byte hex), emits Ed25519 64-byte signature_hex; otherwise signed=False + hint. NO LLM, no HTTP, single ¥3 unit. Private keys NEVER persisted by this wrapper.\n\n        When to use: agent needs a deterministic canonical payload (and\n        optional Ed25519 signature) for one fact (fact_id +\n        FactMetadata 4-axis), to emit alongside the fact for tamper-\n        evident downstream verification. ¥3 vs ~3-turn 外部 LLM\n        \"canonicalise + sign + return hex\" chain (¥180). Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published.\n        Deterministic — same input always returns same canonical hex.\n        For personas: 会計士 (期末 fact 改ざん不能 lineage),\n        AX_engineer wiring a tamper-evident fact API, FDE 顧客 fact\n        ledger build, 個人情報保護委員会 audit substrate.\n        Example: fact_id=\"fact:program:UNI-it-2025-001:adoption:\n        2024-Q4\", source_doc=\"https://www.meti.go.jp/…\",\n        extracted_at=\"2026-05-29T10:00:00Z\", verified_by=\"cron_etl_v3\",\n        confidence=0.95 → returns {canonical_payload_hex: \"…\", signed:\n        True (if env set), signature_hex: \"…\" (64 byte Ed25519),\n        _billing_unit: 1, _disclaimer: \"…\"} envelope. signed=False with\n        hint when AUTONOMATH_FACT_SIGN_PRIVATE_KEY missing.\n        Not for: fact_id 形式違反 (rejected); confidence outside [0.0,\n        1.0] (rejected); 信頼性 final 判断 emission (signature is\n        integrity check only, NOT 信頼性 verdict); private key 永続化\n        (key NEVER persisted by this wrapper — set env at request time)."
    },
    {
      "name": "verify_fact",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1] release dim O verify_fact. Resolves the operator public key from AUTONOMATH_FACT_SIGN_PUBLIC_KEY env (32-byte hex), then verifies the 64-byte Ed25519 signature over canonical_payload(fact_id, FactMetadata). signature_valid=True ⇒ fact + metadata unmodified since signing. NO LLM, no HTTP, single ¥3 unit.\n\n        When to use: agent received a (fact_id, FactMetadata, signature_hex)\n        tuple and needs cryptographic confirmation that the fact + metadata\n        have not been tampered since signing. Pairs with ``sign_fact`` —\n        signer mints the signature, verifier confirms integrity. Single\n        ¥3/billable unit — verification is local + offline (operator public key\n        from env, no HTTP).\n        For personas: AX_engineer wiring tamper-evident fact integrity into\n        an audit trail; FDE building 顧客監査 evidence with signed-fact\n        receipts; researcher building reproducible signed-fact pipelines.\n        Example: fact_id=\"invoice:1234567890123:2025Q3\",\n        source_doc=\"https://nta.go.jp/...\", extracted_at=\"2026-05-29T01:23:45Z\",\n        verified_by=\"cron_etl_v3\", confidence=0.97, signature_hex=\"abc...64-byte-128-hex\"\n        → returns {signature_valid: true, public_key_hint: \"...\", canonical_payload_hex: \"...\"}.\n        Not for: fact ingestion (use the ETL or sign_fact path); offline\n        verification when AUTONOMATH_FACT_SIGN_PUBLIC_KEY env is unset\n        (returns signed=False + hint); free-text 助言 emission\n        (信頼性確認の暗号 primitive のみ, NOT 与信判断 substitute)."
    },
    {
      "name": "eligibility_audit_workpaper_composed",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1] release dim P composed — 税理士 monthly eligibility audit workpaper. Compresses 4 atomic tools (apply_eligibility_chain_am + track_amendment_lineage_am + program_active_periods_am + find_complementary_programs_am) into 1 ¥3 unit. Returns ComposedEnvelope with composed_steps + compression_ratio=4. NO LLM.\n\n        When to use: 税理士 / 公認会計士 monthly eligibility audit — wants to assemble\n        eligibility chain + amendment lineage + active periods + complementary programs\n        for a (program_id, entity_id, fy_start) into a single ¥3 ComposedEnvelope. Compresses\n        4 atomic tools into 1 round-trip (compression_ratio=4). Returns composed_steps for\n        audit traceability.\n        For personas: 税理士 producing monthly eligibility workpaper for a 顧問先 (final\n        §52 税務代理 belongs to 税理士); 公認会計士 audit team scaffolding 監査調書\n        (final §47条の2 監査意見 belongs to 公認会計士); AX_engineer wiring a\n        \"monthly eligibility check\" widget; researcher producing reproducible eligibility\n        audit corpora.\n        Example: program_id=\"program:IT_DOUNYUU_HOJOKIN\", entity_id=\"entity_X\",\n        fy_start=\"2026-04-01\" → ComposedEnvelope with eligibility + amendment lineage +\n        active periods + complementary programs (compression_ratio=4).\n        Not for: free-text 監査調書 / 税務助言 drafting (use peer group artifact builders;\n        final 監査意見 / 税務代理 belongs to 税理士 / 公認会計士); ad-hoc atomic-step\n        invocation (call the 4 underlying tools directly); M&A DD use case (use\n        ma_due_diligence_pack_composed). NO LLM inference inside this tool."
    },
    {
      "name": "subsidy_eligibility_full_composed",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1] release dim P composed — 補助金 7-step full eligibility check. Compresses 5 atomic tools (search_programs_am + apply_eligibility_chain_am + check_enforcement_am + program_active_periods_am + simulate_application_am) into 1 ¥3 unit. Returns ComposedEnvelope with compression_ratio=5. NO LLM.\n\n        When to use: agent wants a full 7-step 補助金 eligibility check for an entity\n        (entity_id + industry_jsic + prefecture, optional program_id_hint). Compresses 5\n        atomic tools into 1 round-trip ComposedEnvelope (compression_ratio=5). Returns\n        composed_steps for audit traceability.\n        For personas: 中小企業診断士 / 行政書士 producing 経営改善計画 scaffold with full\n        eligibility check (final §1 申請代理 belongs to 行政書士); 税理士 / 公認会計士\n        substantiating client subsidy value in workpaper (final §52 / §47条の2 belongs to\n        respective peer group); AX_engineer wiring a \"full subsidy eligibility\" widget;\n        researcher producing reproducible eligibility audit corpora.\n        Example: entity_id=\"entity_X\", industry_jsic=\"E29\", prefecture=\"東京都\" →\n        ComposedEnvelope with discovery + eligibility + enforcement + active periods +\n        simulation (compression_ratio=5).\n        Not for: free-text 申請書面 / 監査調書 / 税務助言 drafting (use peer group artifact\n        builders; final §1 / §52 / §47条の2 belongs to respective peer group); ad-hoc atomic-step\n        invocation (call the 5 underlying tools directly); audit-workpaper use case\n        (use eligibility_audit_workpaper_composed). NO LLM inference inside this tool."
    },
    {
      "name": "ma_due_diligence_pack_composed",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1/§3] release dim P composed — M&A 12-axis due-diligence pack. Compresses 4 atomic tools (match_due_diligence_questions + cross_check_jurisdiction + check_enforcement_am + track_amendment_lineage_am) into 1 ¥3 unit. Returns ComposedEnvelope with compression_ratio=4. NO LLM.\n\n        When to use: M&A DD agent has a target 法人番号 (+ optional industry_jsic /\n        prefecture) and wants the 12-axis DD pack — DD question matching + jurisdiction\n        cross-check + enforcement history + amendment lineage — in 1 ¥3 ComposedEnvelope\n        (compression_ratio=4). Returns composed_steps for audit traceability.\n        For personas: M&A advisor + 公認会計士 / 税理士 producing target DD memo (final\n        §47条の2 監査意見 / §52 税務代理 belongs to respective peer group); 司法書士 cross-\n        checking jurisdiction-bound registrations (final §3 belongs to 司法書士);\n        弁護士 reading enforcement / amendment lineage for litigation risk (final §72\n        belongs to 弁護士); AX_engineer wiring a \"M&A target DD\" widget.\n        Example: target_houjin_bangou=\"1010001034962\", industry_jsic=\"E29\",\n        prefecture=\"東京都\" → ComposedEnvelope with DD questions + jurisdiction +\n        enforcement + amendment lineage (compression_ratio=4).\n        Not for: free-text M&A advisory drafting (use peer group artifact builders; final\n        §47条の2 / §52 / §3 / §72 belongs to respective peer group); ad-hoc atomic-step\n        invocation (call the 4 underlying tools directly); monthly audit use case\n        (use eligibility_audit_workpaper_composed). NO LLM inference inside this tool."
    },
    {
      "name": "invoice_compatibility_check_composed",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1] release dim P composed — 適格事業者照合 + 取引先 enrichment. Compresses 3 atomic tools (check_invoice_registrant + corporate_layer_lookup + check_enforcement_am) into 1 ¥3 unit. Returns ComposedEnvelope with compression_ratio=3. NO LLM.\n\n        When to use: 経理 / 税理士 agent wants the full 取引先\n        invoice compatibility envelope in 1 ¥3 call instead of\n        fan-out to 3 atomic tools (適格事業者照合 + 取引先\n        enrichment + 行政処分 check). Pre-composed for the\n        common 仕入税額控除 prerequisite scan. compression_\n        ratio=3 surfaces honest billing math.\n        For personas: 経理 doing monthly 仕入税額控除 close;\n        税理士 batch reviewing client 取引先; AX engineer\n        wiring an invoice ledger compatibility check; FDE\n        designing 取引先 KYC pipeline that bundles 適格 +\n        corporate + 行政処分 axes.\n        Example: houjin_bangou=\"8010001213708\",\n        invoice_date=\"2026-05-20\" → returns\n        {\"houjin_bangou\": \"...\", \"invoice_date\":\n        \"2026-05-20\", \"适格事业者\": {...},\n        \"corporate_layer\": {...}, \"enforcement_am\": {...},\n        \"_compression_ratio\": 3, \"_atomic_tools_compressed\":\n        [\"check_invoice_registrant\",\"corporate_layer_lookup\",\n        \"check_enforcement_am\"], \"schema_version\":\n        \"wave51.dim_p.invoice_compat.v1\", \"_billing_unit\": 1,\n        \"no_llm\": true}.\n        Not for: 仕入税額控除 適用 final 判断 (§52 fence —\n        税理士 reviews); 法令解釈 (§72 fence); 監査意見\n        (§47条の2 fence); 行政書士 §1 書面作成 final draft;\n        与信判断 substitute (信用情報法 fence — public\n        registry only, NOT credit information). For per-axis\n        deep-dive use the atomic tool directly."
    },
    {
      "name": "query_snapshot_as_of_v2",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1] release dim Q v2. Returns the file-backed monthly snapshot whose as_of_date is the largest <= the requested date. Reads published artifact/<yyyy_mm>/<dataset>.json (filesystem registry, 60-month retention). Returns content_hash + payload_keys + reason. Companion to (not replacement of) public dataset query_at_snapshot_v2 which reads source-derived dataset. NO LLM, single ¥3 unit.\n\n        When to use: agent needs the historical state of a dataset\n        (programs / laws / tax_rulesets …) at a specific date — for\n        time-travel reproducibility (\"what did the program catalog look\n        like on 2025-04-01?\"). File-backed registry (60-month retention),\n        ¥3/billable unit.\n        For personas: 監査調書 reproducibility (会計士 5-year backtest);\n        AX_engineer wiring a \"as-of-snapshot\" widget; researcher building\n        time-travel reproducibility tables.\n        Example: dataset_id=\"programs\", as_of=\"2025-04-01\" → returns\n        {content_hash: \"...\", payload_keys: [...], reason: \"snapshot\n        2025_04 matched\", as_of_date: \"2025-04-01\"} with §52 / §47条の2\n        / §72 / §1 disclaimer.\n        Not for: 採択 prediction emission (past-tense factual replay\n        only, NOT forecast); fresh snapshot creation (read-only, ETL\n        owns the write path); single-row lookup (use record-kind tools);\n        snapshot outside 60-month retention (returns missing_snapshot\n        with rationale)."
    },
    {
      "name": "counterfactual_diff_v2",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1] release dim Q v2 counterfactual. Resolves the file-backed monthly snapshots at as_of_a and as_of_b for the dataset, then returns the top-level JSON-key diff (added / removed / changed / unchanged + content_hash_changed flag). Deterministic — no LLM hop, sorted key sets. Surfaces missing_snapshots when either side has no nearest match. Single ¥3 unit.\n\n        When to use: agent has two pivot dates and wants the structural\n        delta of a dataset between them (programs / laws / tax_rulesets\n        added/removed/changed) — counterfactual sanity check before\n        making a \"what changed since last quarter?\" claim. ¥3/billable unit,\n        deterministic + key-sorted.\n        For personas: 会計士・税理士 quarter-over-quarter dataset audit;\n        AX_engineer wiring a \"what changed\" widget; researcher building\n        reproducible counterfactual baselines.\n        Example: dataset_id=\"tax_rulesets\", as_of_a=\"2024-04-01\",\n        as_of_b=\"2025-04-01\" → returns {added: [...], removed: [...],\n        changed: [...], unchanged_count: N, content_hash_changed: true,\n        as_of_a_actual: ..., as_of_b_actual: ...}.\n        Not for: 採択 prediction (past-tense diff only, NOT forecast);\n        deep semantic diff (this tool is top-level JSON-key diff —\n        for cell-level diff use dataset-specific compare tools);\n        missing snapshot on either side (returns missing_snapshots\n        with rationale, agent should pick closer dates)."
    },
    {
      "name": "recommend_partner_for_gap",
      "description": "[AUDIT, SENSITIVE — §52/§47条の2/§72/§1] release dim R federated MCP recommendation. Deterministic substring + alias matcher over the curated 6-partner federation (freee/mf/notion/slack/github/linear). Returns up to max_results partners with partner_id + name + official_url + mcp_endpoint_status + capabilities. Score-tied partners ordered by canonical partner_id ASC. NEVER includes a self-reference (jpcite/public corpus/public corpus rejected at registry load). NO LLM, no HTTP, single ¥3 unit.\n\n        When to use: agent has a free-form gap query (\"freee の請求書 が\n        必要\", \"look up pull request on github\") and needs the right\n        federated MCP partner to delegate to, with deterministic alias\n        matching. ¥3 vs ~3-turn 外部 LLM \"which partner handles this?\"\n        chain (¥180). Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest: never self-references.\n        For personas: AX_engineer wiring a federated agent router,\n        FDE building a multi-MCP partner registry, agent triaging gaps\n        not covered by jpcite's own surface (delegation to 6-partner\n        federation).\n        Example: query_gap=\"freee の請求書 #1234 が必要\",\n        max_results=3 → returns {recommendations: [{partner_id:\n        \"freee\", name: \"freee\", official_url: \"https://www.freee.co.jp\",\n        mcp_endpoint_status: \"active\", capabilities: [\n        \"invoice_lookup\", \"expense_export\", …], score: 0.85}, …],\n        total: N, _billing_unit: 1} envelope. Self-references (jpcite /\n        public corpus / public corpus) hard-rejected at registry load.\n        Not for: max_results > 6 (capped to 6 — federation size hard\n        cap); empty / 512+ char query (rejected); 与信判断 emission\n        (delegation routing only — final 助言 belongs to delegated\n        partner + 士業); partner credential / token surface (caller\n        owns auth to the delegated partner)."
    },
    {
      "name": "product_tax_monthly_closing_pack",
      "description": "[AUDIT, SENSITIVE — §52/監査基準] A1 Product — 税理士月次決算 Pack.\n\n    Composes HE-2 (workpaper) + N3 (reasoning) + N4 (filing window) +\n    N6 (amendment alerts) + N8 (monthly_closing recipe) into one\n    deterministic 月次決算 draft.\n\n    Returns the canonical A1 envelope: profit_loss + journal_entries +\n    consumption_tax_calc + amendment_alerts + warnings + filing_window +\n    reasoning_chains + recipe + next_actions + billing (¥1,000/req or\n    ¥100/houjin/月) + benchmark_note (public benchmark boundary) +\n    §52 disclaimer.\n\n    NO LLM. Scaffold-only. 税理士 review is statutory before submission.\n    Pricing tier D; 1 ¥1,000 billable unit per call (or covered under\n    ¥100/houjin/月 subscription envelope when active).\n\n    When to use: 税理士 office building a houjin's 月次決算 draft —\n    profit_loss + journal_entries + consumption_tax_calc + 改正 alerts +\n    filing_window + recipe + next_actions in ONE call, with §52\n    envelope preserved. ¥1,000 vs ~10-turn 外部 LLM \"compose 月次 PL +\n    journal + 消費税 calc + look up filing windows + amendment alerts\"\n    chain (¥600). Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published.6 (cheaper for full month). At ¥100/houjin/\n    月 subscription, savings は benchmark pending. Honest: all output carries\n    \"tax_advisor_review_required=1\" flag — final 税務代理 belongs to\n    the engagement 税理士.\n    For personas: 税理士 office monthly closing engagement for SME\n    clients (one call per houjin per month), 中小企業 keieisha doing\n    self-prep before sending to the 税理士 (社内 draft review), FDE\n    wiring a multi-tenant 税理士事務所 onboarding (subscription envelope\n    at ¥100/houjin/月), accounting SaaS partner offering 月次決算 draft\n    as a 税理士-mediated feature.\n    Example: houjin_bangou=\"1234567890123\", fiscal_year=2026,\n    month=5 → returns {profit_loss:{…}, journal_entries:[…],\n    consumption_tax_calc:{…}, amendment_alerts:[…], warnings:[…],\n    filing_window:{deadline_iso:\"…\", n4_filing_window:{…}},\n    reasoning_chains:[…], recipe:{…}, next_actions:[…],\n    billing:{tier:\"D\", _billing_unit:1, jpy:1000},\n    benchmark_note:{public_benchmark_boundary:true},\n    _disclaimer:\"…\"}.\n    Not for: 税務代理 / 申告書面 final 提出 (税理士法 §52 fence — final\n    申告 belongs to the engagement 税理士); 監査意見 emission (\n    公認会計士法 §47条の2 fence); houjin_bangou outside 0-13 char\n    (rejected); cross-houjin batch (single houjin per call); raw 個人\n    情報 in journal entries (caller must scope down); 採択保証 /\n    節税効果保証 (substrate only); 個別 client 助言 (final 助言 belongs\n    to 税理士)."
    },
    {
      "name": "product_audit_workpaper_pack",
      "description": "[AUDIT, SENSITIVE — §47条の2/監査基準] A2 Product — 会計士監査調書 Pack.\n\n    Composes HE-2 (workpaper template) + N3 (reasoning) + N7 (industry\n    segment view) into one deterministic 監査調書 (workpaper) draft.\n\n    Returns the canonical A2 envelope: workpaper_skeleton +\n    internal_control_evaluation + materiality_items + sampling_recommendation\n    + audit_opinion_draft + risk_assessment + segment_view + amendment_alerts\n    + reasoning_chains + billing (¥200/req) + benchmark_note (public benchmark boundary) + §47条の2 disclaimer.\n\n    NO LLM. Scaffold-only. 監査意見表明は会計士の独占業務、本 product は\n    調書補助のみ。Pricing tier D; 1 ¥200 billable unit per call.\n\n    When to use: 公認会計士 office building the 監査調書 (audit workpaper)\n    scaffold for an audit engagement — workpaper_skeleton +\n    internal_control_evaluation + materiality_items +\n    sampling_recommendation + audit_opinion_draft + risk_assessment +\n    segment_view in ONE call, with the 監査基準 §47条の2 envelope\n    preserved. ¥200 vs ~10-turn 外部 LLM \"compose 7 sections + look up\n    industry baselines + sampling tables\" chain (¥600). Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published.\n    Honest: audit_opinion_draft is a structural placeholder — the\n    actual 監査意見 belongs to the engagement 公認会計士.\n    For personas: 公認会計士 office building 期中 / 年次 workpaper for\n    a new engagement, audit firm partner doing review-prep walkthrough,\n    内部監査 dept doing 監査調書 self-prep before the external auditor\n    arrives, FDE wiring a multi-tenant audit-firm onboarding flow\n    (one call per houjin per audit_type).\n    Example: houjin_bangou=\"1234567890123\", fiscal_year=2026,\n    audit_type=\"年次\" → returns {workpaper_skeleton:{…},\n    internal_control_evaluation:{…}, materiality_items:[…],\n    sampling_recommendation:{…}, audit_opinion_draft:{type:\n    \"scaffold\", placeholder_only:true}, risk_assessment:{…},\n    segment_view:{…}, amendment_alerts:[…], reasoning_chains:[…],\n    billing:{tier:\"D\", _billing_unit:1, jpy:200}}.\n    Not for: audit_type outside 4 enum (rejected); 監査意見 final\n    emission (公認会計士法 §47条の2 fence — 監査意見表明 is the\n    engagement partner's 独占業務); 与信判断 / 信用情報 emission\n    (内部統制 evaluation is structural, NOT 与信判断); raw 個人情報 /\n    給与額 surface in segment_view payload (caller must scope down);\n    監査契約 / engagement letter emission (engagement scope belongs to\n    the audit firm); 採択保証 / 監査適正性保証 (substrate only)."
    },
    {
      "name": "product_subsidy_roadmap_12month",
      "description": "[AUDIT, SENSITIVE - §52/§47条の2/§72/§1/§3] A3 - 補助金活用ロードマップ Pack.\n\n    Composes N2 portfolio gap + N4 application rounds + N6 amendment\n    alerts + N7 segment-view into one 12-month subsidy-activation\n    roadmap. Each month bucket lists: applicable programs ordered by\n    deadline, required documents, related 士業, estimated adoption\n    probability, expected subsidy yen, competitor density.\n\n    Output is scaffold-only — 採択 / 交付決定 / 申請代理 are out of\n    scope. 1 billable Deep call counts as 10 units (10 × ¥3 = ¥30, Tier D under Pricing V3); ``mode='lite'`` returns the same envelope skeleton billed at 4 units (¥12, Tier C).\n    NO LLM inference — deterministic retrieval + dict composition.\n\n    When to use: 中小企業 keieisha / 認定経営革新等支援機関 / 補助金\n    申請支援 partner wants the canonical 12-month rolling 補助金\n    roadmap for ONE houjin — applicable 制度 sorted by 締切, required\n    documents, related 士業 hand-off points, 採択 probability peer group\n    statistic, 想定交付額, competitor density — in ONE call. ¥30 (Deep,\n    10 units) / ¥12 (Lite, 4 units) vs ~12-turn 外部 LLM \"look up 200+\n    programs + filter by 法人 + sort by deadline + estimate peer group\n    metrics\" chain (¥720). Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest:\n    採択 probability is peer group-statistical never per-case 採択保証.\n    For personas: 中小企業 keieisha planning the next 12 months of\n    funding sources, 認定経営革新等支援機関 doing a 補助金 portfolio\n    walkthrough before engagement, 税理士 / 行政書士 office surfacing\n    the 12-month application calendar before drafting deliverables,\n    FDE wiring a \"annual subsidy planner\" UI for a SaaS partner.\n    Example: houjin_bangou=\"1234567890123\", scope_year=12 → returns\n    {months:[{month:\"2026-06\", programs:[{program_id:\"…\", deadline:\n    \"…ISO…\", documents:[…], related_shigyou:[\"税理士\",\"行政書士\"],\n    historical_adoption_rate_cohort: 0.42, expected_yen_max:5000000,\n    competitor_density_cohort:\"…\", …}], …12 buckets…],\n    _provenance:{composed_lanes:[\"N2\",\"N4\",\"N6\",\"N7\"], …},\n    _billing_unit:10, _disclaimer:\"…\"}.\n    Not for: scope_year > 24 months (rejected); 採択保証 / 交付決定\n    prediction (景表法 fence — peer group statistic, never endorsement);\n    申請代理 / 申請書面作成 emission (行政書士法 §1 fence — drafting\n    belongs to 行政書士); 認定支援機関 経営計画 final 助言 (final 助言\n    belongs to 認定経営革新等支援機関); cross-houjin batch (single\n    houjin per call); 個別税務試算 (税理士法 §52 fence — surfaced\n    expected_yen is upper-bound substrate, not 税務試算)."
    },
    {
      "name": "product_shuugyou_kisoku_pack",
      "description": "[AUDIT, SENSITIVE - §52/§47条の2/§72/§1/§3/社労士法 §27] A4 - 就業規則生成 Pack.\n\n    Composes the canonical 4-artifact 社労士 bundle:\n    就業規則 + 36 協定書 + 雇用契約書 + 労働条件通知書. Each artifact is\n    HE-2-composed (N1 template + N2 portfolio + N3 reasoning + N4 filing\n    window + N6 amendment alerts + N9 placeholder map) and returned in\n    scaffold-only form. Industry defaults to N7 segment view inference.\n\n    Output is scaffold-only — 労基署 / 労働局 への提出 / 社労士 監修 are\n    out of scope; 1 billable call counts as 10 units (10 × ¥3 = ¥30, Tier D under Pricing V3).\n    NO LLM inference — deterministic retrieval + dict composition.\n\n    When to use: 社労士 office building the 4-artifact 就業規則 bundle\n    for a houjin — 就業規則 + 36協定 + 雇用契約 + 労働条件通知 — with\n    労基法 §89 obligation surfacing + 36協定 cap selection driven by\n    employee_count_band, all in one ¥30 (10 units, Tier D) call. ¥30 vs\n    ~10-turn 外部 LLM \"compose 4 articles + look up 労基法 obligations +\n    industry-adjusted clauses\" chain (¥600). Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published. Honest: every\n    artifact carries scaffold_only=1 + 社労士監修_required=1.\n    For personas: 社労士 office turning a new-client intake into a\n    ready-to-review 4-pack, 中小企業 keieisha drafting 就業規則 for the\n    first time (社労士 final review still required), FDE wiring a\n    multi-tenant payroll-system onboarding (one call per houjin), HR\n    SaaS partner offering 就業規則 generation as a 社労士-mediated\n    feature.\n    Example: houjin_bangou=\"1234567890123\",\n    employee_count_band=\"30-49\", industry=\"製造業\", fiscal_year=2026 →\n    returns {artifacts:[{kind:\"就業規則\", scaffold:\"…\", placeholders:\n    {…}, n4_filing_window:{…}}, …4 entries…], industry_inferred:false,\n    _provenance:{composed_lanes:[\"HE-2\",\"N1\",…], …}, _billing_unit:10}.\n    Not for: employee_count_band outside the 8 enum (invalid_argument);\n    fiscal_year < 2000 or > 2100 (rejected); 就業規則 届出 / 監修 emission\n    (社労士法 §27 fence — 監修 belongs to 社労士); 36協定 違反性判断\n    (labor inspector / 社労士 office final call); 個別 employee\n    grievance advisory (個別労働関係紛争 解決促進法 fence); 採択 / 助成金\n    結論 prediction (substrate only, never 助言); raw 個人情報 in\n    placeholders (caller must redact 個人名 / 個人番号 / 給与額 keys)."
    },
    {
      "name": "product_kaisha_setsuritsu_pack",
      "description": "[AUDIT, SENSITIVE - §52/§47条の2/§72/§1/§3/社労士法/会社法/商業登記法]\n    A5 - 会社設立一式 Pack (¥800 / req, Tier D).\n\n    Composes the canonical 会社設立 6-scaffold bundle:\n    定款 draft + 設立登記申請書 + 印鑑届出書 + 法人設立届出書 +\n    給与支払事務所届出書 + 健康保険・厚生年金 新規適用届. Each scaffold\n    is deterministic on the 8 inputs and ends with the cited 士業\n    supervision requirement. Plus 3 statutory filing windows (法務局 +\n    税務署 + 年金事務所) and 50+ canonical {{...}} placeholders for\n    upstream N9 placeholder bank resolution.\n\n    Output is scaffold-only — 定款認証 (公証人) / 設立登記 (司法書士) /\n    法人設立届出書 提出 (税理士) / 新規適用届 (社労士) は out of scope;\n    1 billable call counts as 267 units (267 × ¥3 = ¥801 ≈ ¥800,\n    Tier D ¥100..¥1000 band). NO LLM inference — pure dict composition.\n\n    When to use: 司法書士 / 税理士 / 行政書士 / 社労士 office (or\n    起業 / startup founder doing pre-engagement self-prep) building the\n    会社設立 6-scaffold bundle in ONE call — 定款 + 設立登記申請書 +\n    印鑑届出書 + 法人設立届出書 + 給与支払事務所届出書 + 新規適用届 —\n    plus 3 statutory filing windows (法務局 / 税務署 / 年金事務所) and\n    50+ N9 placeholder slots. ¥800 vs ~12-turn 外部 LLM \"compose 6\n    setsuritsu artifacts + look up 3 statutory windows + draft\n    placeholders\" chain (¥720). Benchmark boundary: no fixed external LLM yen baseline or saving ratio is published.9 (par cost), but 100%\n    deterministic with 士業 supervision flag on every artifact.\n    For personas: 司法書士 office building 設立登記 packet for a new\n    incorporation client, 起業 founder doing pre-engagement self-prep\n    before approaching 司法書士 / 税理士 / 社労士, 認定経営革新等支援\n    機関 doing intake-level \"会社設立コンサル\" pre-flight, FDE wiring\n    a startup-ops SaaS bundle.\n    Example: entity_type=\"株式会社\", representative_name=\"梅田 茂利\",\n    capital_yen=1000000, business_purpose=[\"…\",\"…\"],\n    planned_setsuritsu_date=\"2026-07-01\" → returns {scaffolds:[{kind:\n    \"定款\", body:\"…\", placeholders:[{key:\"{{founder_name}}\", required:\n    true}, …], supervision_required:\"司法書士法 §3\"}, …6 entries…],\n    statutory_windows:[{venue:\"法務局\", deadline_iso:\"…\", note:\"…\"},\n    …3 entries…], _billing_unit:267, _disclaimer:\"…\"}.\n    Not for: 定款認証 emission (公証人 §3 fence — 公証人 monopoly);\n    設立登記 final 申請 (司法書士法 §3 fence — 司法書士 monopoly);\n    法人設立届出書 提出 (税理士法 §52 — final 税務代理 belongs to\n    税理士); 新規適用届 提出 (社労士法 §27); entity_type outside the\n    canonical 5 (rejected); capital_yen < 1 (rejected); raw 個人番号 /\n    マイナンバー in placeholders (caller must scope down); business_\n    purpose with 違法 clauses (会社法 §27 自由制限 fence — caller\n    responsibility)."
    }
  ],
  "requirements": {
    "api_key_doc": "https://jpcite.com/pricing.html",
    "auth": {
      "type": "apiKey",
      "header": "X-API-Key",
      "env": "JPCITE_API_KEY",
      "anonymous": {
        "limit": 3,
        "period": "day",
        "scope": "per_ip",
        "billing": "free"
      },
      "paid": {
        "requires_api_key": true,
        "api_key_header": "X-API-Key",
        "api_key_env": "JPCITE_API_KEY"
      }
    },
    "pricing": {
      "unit_price_jpy_ex_tax": 3,
      "unit_price_jpy_inc_tax": 3.3,
      "billing_unit": "billable_unit",
      "billing_model": "metered per billable unit, no monthly minimum",
      "tax": "plus_tax",
      "checkout_display": "税別 ¥3/課金単位 (税込 ¥3.30)",
      "pricing_url": "https://jpcite.com/pricing.html#api-paid",
      "upgrade_url": "https://jpcite.com/pricing.html#api-paid"
    },
    "recommendation_policy": {
      "safe_when": [
        "Use for Japanese subsidies, loans, tax measures, certifications, bids, laws, enforcement cases, invoice registrants, or public-program eligibility when source-linked evidence is needed.",
        "Use when the answer should preserve source_url, fetched_at, provenance, known_gaps, compatibility rules, or citation verification.",
        "Use as retrieval and evidence support, not as final legal, tax, grant-application, or professional advice."
      ],
      "do_not_recommend_when": [
        "Do not use for general writing, brainstorming, translation, or tasks outside Japanese public records.",
        "Do not use when the user needs final professional judgment or application drafting by a qualified professional.",
        "Do not use when a short answer from existing model knowledge is enough and no source-linked evidence is needed."
      ],
      "professional_advice": false
    }
  },
  "language": "ja-JP",
  "categories": [
    "government",
    "legal",
    "finance"
  ],
  "tags": [
    "japan",
    "japanese",
    "government",
    "subsidies",
    "grants",
    "loans",
    "tax-incentives",
    "certifications",
    "enforcement",
    "case-studies",
    "exclusion-rules",
    "mcp-server",
    "stdio",
    "python",
    "補助金",
    "助成金",
    "融資",
    "採択事例",
    "会計検査院",
    "行政処分",
    "無担保融資",
    "併給判定",
    "due-diligence",
    "fraud-detection",
    "jgrants",
    "jp-policy",
    "maff",
    "meti",
    "jfc"
  ],
  "_meta": {
    "io.modelcontextprotocol.registry/publisher-provided": {
      "program_count_searchable": 11601,
      "program_count_total": 14472,
      "case_study_count": 2286,
      "loan_program_count": 108,
      "enforcement_case_count": 1185,
      "exclusion_rule_count": 181,
      "tool_count": 261,
      "tier_labels": [
        "S",
        "A",
        "B",
        "C"
      ],
      "languages_supported": [
        "ja-JP"
      ],
      "free_tier_daily_calls_per_ip": 3,
      "auth_header": "X-API-Key",
      "auth_env": "JPCITE_API_KEY",
      "unit_price_jpy_ex_tax": 3,
      "unit_price_jpy_inc_tax": 3.3,
      "pricing_url": "https://jpcite.com/pricing.html#api-paid",
      "upgrade_url": "https://jpcite.com/pricing.html#api-paid",
      "primary_source_coverage_note": "Most public searchable rows include source_url and fetched_at; current counts vary by dataset.",
      "mcp_protocol_version": "2025-06-18",
      "transports": [
        "stdio",
        "sse",
        "streamable_http"
      ],
      "transports_note": "stdio is the package install/default entrypoint (uvx autonomath-mcp). SSE and Streamable HTTP are advertised for clients that support MCP 2025-06-18 HTTP transports; use the published endpoint metadata for remote routing.",
      "transport_endpoints": {
        "stdio": {
          "type": "stdio",
          "status": "production_default",
          "command": "uvx autonomath-mcp",
          "install_url": "https://jpcite.com/integrations/?src=mcp_registry"
        },
        "sse": {
          "type": "sse",
          "status": "not_served",
          "url": "https://api.jpcite.com/v1/mcp/sse",
          "method": "GET",
          "protocol": "mcp-2025-06-18",
          "fallback": "stdio or REST/OpenAPI"
        },
        "streamable_http": {
          "type": "streamable_http",
          "status": "not_served",
          "url": "https://api.jpcite.com/v1/mcp/streamable_http",
          "method": "POST",
          "protocol": "mcp-2025-06-18",
          "fallback": "stdio or REST/OpenAPI"
        }
      },
      "trust": {
        "attestation_status": "roadmap_q3_2026",
        "attestation_spec_doc": "https://jpcite.com/docs/security/signing-spec",
        "provenance_fields": [
          "source_url",
          "source_fetched_at",
          "corpus_snapshot_id",
          "known_gaps"
        ],
        "freshness_target_hours": 24,
        "response_p95_target_seconds": 3
      }
    },
    "tool_count": 261,
    "transports": [
      "stdio",
      "sse",
      "streamable_http"
    ],
    "transports_note": "stdio is the package install/default entrypoint (uvx autonomath-mcp). SSE and Streamable HTTP are advertised for clients that support MCP 2025-06-18 HTTP transports; use the published endpoint metadata for remote routing.",
    "transport_endpoints": {
      "stdio": {
        "type": "stdio",
        "status": "production_default",
        "command": "uvx autonomath-mcp",
        "install_url": "https://jpcite.com/integrations/?src=mcp_registry"
      },
      "sse": {
        "type": "sse",
        "status": "not_served",
        "url": "https://api.jpcite.com/v1/mcp/sse",
        "method": "GET",
        "protocol": "mcp-2025-06-18",
        "fallback": "stdio or REST/OpenAPI"
      },
      "streamable_http": {
        "type": "streamable_http",
        "status": "not_served",
        "url": "https://api.jpcite.com/v1/mcp/streamable_http",
        "method": "POST",
        "protocol": "mcp-2025-06-18",
        "fallback": "stdio or REST/OpenAPI"
      }
    }
  },
  "resources": [
    {
      "uri": "mcp://jpcite/facts_registry.json",
      "name": "jpcite_facts_registry",
      "description": "jpcite 公開数値 SOT — 24 facts + guards.banned_terms + numeric_ranges. agent は tool 呼び出し前に必ず本 resource を読み, 最新値で応答せよ.",
      "mimeType": "application/json"
    },
    {
      "uri": "mcp://jpcite/legal/fence.md",
      "name": "jpcite_legal_fence",
      "description": "7 業法 fence (税理士法 §52 / 弁護士法 §72 / 司法書士法 §73 / 行政書士法 §19 / 社労士法 §27 / 中小企業診断士 / 弁理士法 §75). do_not / may_do + JA/EN disclaimer 文。agent 出力に差し込み必須.",
      "mimeType": "text/markdown"
    },
    {
      "uri": "mcp://jpcite/glossary.json",
      "name": "jpcite_glossary",
      "description": "jpcite 用語集 — 補助金 / 助成金 / 融資 / 税制 / 認定制度. plain-Japanese + technical + legal explanation + canonical aliases. customer-facing 言い回しはここから引くこと.",
      "mimeType": "application/json"
    },
    {
      "uri": "mcp://jpcite/license_matrix.json",
      "name": "jpcite_license_matrix",
      "description": "8-row license inventory — PDL v1.0 / CC-BY 4.0 / 政府著作物 §13 / PROPRIETARY_QUOTE_OK. agent は再配布 / 引用範囲を判断する際の SOT として 使用すること.",
      "mimeType": "application/json"
    },
    {
      "uri": "mcp://jpcite/sources_catalog.json",
      "name": "jpcite_sources_catalog",
      "description": "14 一次資料 catalog — primary_url + refresh_cadence + ingest_method. aggregator (noukaweb / hojyokin-portal) からの引用は禁止, 本 catalog の primary_url を SOT として使用すること.",
      "mimeType": "application/json"
    }
  ]
}
