{"at":"2026-11-23T00:40:39.920Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T00:40:41.300Z","dir":"received","era":"server_discover","message":{"error":{"code":-32602,"data":"","message":"Invalid request parameters"},"id":1,"jsonrpc":"2.0"}}
{"at":"2026-11-23T00:40:41.501Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-23T00:40:42.852Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"experimental":{},"extensions":{"io.modelcontextprotocol/ui":{}},"logging":{},"prompts":{"listChanged":false},"resources":{"listChanged":false,"subscribe":false},"tools":{"listChanged":true}},"instructions":"This MCP server exposes the official Dutch consolidated legislation BWB (Basiswettenbestand) through the KOOP SRU API (zoekservice.overheid.nl, keyless). It serves consolidated national acts as XML. Every response carries a stable `eli_uri`, a `human_readable_citation` and a `source_url` (the citation contract).\n\n## Versions and \"in force on a date\"\n\nEach BWB act (e.g. `BWBR0005537`) has many time-stamped versions (toestanden). The tools default to the version **in force today**; pass `on_date` (YYYY-MM-DD) to pin a historical or future version. An act with no version valid on that date returns `not_found` - retry with another `on_date`.\n\nThis server also exposes Dutch **case law** via Rechtspraak Open Data (data.rechtspraak.nl), keyed by native ECLI - a separate source from BWB legislation.\n\n## Call order\n\n1. `nl_search` - find acts by words in the title that are in force on `on_date`. Returns distinct acts, each with `bwb_id`, `eli_uri`, `human_readable_citation`, `source_url`.\n2. `nl_get_act` - metadata for one act by `bwb_id`: `eli_uri`, title, authority, version_date.\n3. `nl_get_text` - the full consolidated XML of one act by `bwb_id`.\n4. `nl_case_search` - list court decisions (Rechtspraak) by `date_from` / `date_to` (and optional `creator` / `subject` URIs). The open-data search has NO free-text query. Each hit carries a native `ecli`.\n5. `nl_get_decision` - a decision by its `ecli` (e.g. `ECLI:NL:HR:2020:1`): court, dates, zaaknummer and the full text.\n\n## Hard constraints\n\n- **Do not answer past the edge of this corpus** - when a search comes back empty, or the question touches material this connector does not carry, call `nl_coverage` and relay what it says is missing. Absence here is not absence in the law.\n- **eli_uri is the citability key, but the Netherlands does NOT publish native ELI (/eli/) URIs on consolidated BWB.** `eli_uri` therefore carries the official persistent identifier - the `wetten.overheid.nl/id` toestand URI (e.g. `http://wetten.overheid.nl/id/BWBR0005537/2026-06-04/0`). Never fabricate a `/eli/` URI.\n- **Case law carries a native `ecli`, not an ELI** - cite it verbatim; never invent one.\n- **Legislation search is title-based; case-law search is metadata-based (no free text)** - `nl_search` matches words in the act title; `nl_case_search` filters by date / court / subject.\n- **Every response has `human_readable_citation` + `source_url`** - cite both to the user.\n- **No modification of official text** - returned verbatim from KOOP / Rechtspraak.\n- **Audit log JSONL** - every tool call appends to `~/.matematic/audit/nl-eli-mcp.jsonl`.\n\n## Error iteration\n\nTools return a structured error with a `[code]` prefix:\n- `invalid_arg` - a parameter is missing or malformed (e.g. a bad `bwb_id`, `ecli` or `on_date`).\n- `not_found` - no act / no version in force on `on_date`, or no decision for that `ecli`.\n- `upstream_error` - a KOOP / Rechtspraak API error (HTTP, timeout, malformed XML). Retry once before surfacing.\n\n## Response style\n\n- Cite acts as `human_readable_citation` with the identifier: \"Algemene wet bestuursrecht, http://wetten.overheid.nl/id/BWBR0005537/2026-06-04/0\".\n- Cite decisions with their `ecli` and `source_url`.\n- NEVER invent a `bwb_id`, an `ecli`, a title or an identifier - take each from the tool output.\n","protocolVersion":"2025-11-25","serverInfo":{"name":"nl-eli-mcp","version":"3.4.11"}}}}
{"at":"2026-11-23T00:40:42.852Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T00:40:42.852Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T00:40:42.863Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"_meta":{"fastmcp":{"tags":[]}},"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":true},"description":"Search Dutch consolidated acts by words in the title, in force on a date.","inputSchema":{"additionalProperties":false,"properties":{"on_date":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"optional ``YYYY-MM-DD``; defaults to today (acts in force today)."},"query":{"description":"words to match in the act title, e.g. ``\"bestuursrecht\"``.","type":"string"}},"required":["query"],"type":"object"},"name":"nl_search","outputSchema":{"additionalProperties":true,"description":"Result of ``nl_search`` - distinct acts in force, one entry per BWB id.","properties":{"dataset_note":{"default":"BWB (Basiswettenbestand) is the official consolidated body of Dutch national legislation, served by KOOP over SRU. Each act is identified by a BWB id (e.g. BWBR0005537) and has many time-stamped versions (toestanden); tools default to the version in force on a given date (today unless on_date is set). The Netherlands does NOT publish native ELI (/eli/) URIs on consolidated BWB - eli_uri carries the official persistent identifier (the wetten.overheid.nl/id toestand URI). This MVP covers consolidated legislation; case law is exposed separately via the Rechtspraak tools.","type":"string"},"items":{"items":{"additionalProperties":true,"description":"A Dutch consolidated act (one toestand / version), parsed from a KOOP SRU gzd record.","properties":{"act_type":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"authority":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"bwb_id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"date_modified":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"eli_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"human_readable_citation":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"legal_areas":{"items":{"type":"string"},"type":"array"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"text_url":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"version_date":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null}},"type":"object"},"type":"array"},"on_date":{"type":"string"},"query":{"type":"string"},"returned":{"type":"integer"},"total_matched":{"type":"integer"}},"required":["query","on_date","total_matched","returned"],"type":"object"}},{"_meta":{"fastmcp":{"tags":[]}},"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":true},"description":"Fetch metadata for the version of a Dutch act in force on a date.","inputSchema":{"additionalProperties":false,"properties":{"bwb_id":{"description":"e.g. ``\"BWBR0005537\"``.","type":"string"},"on_date":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"optional ``YYYY-MM-DD``; defaults to today."}},"required":["bwb_id"],"type":"object"},"name":"nl_get_act","outputSchema":{"additionalProperties":true,"description":"A Dutch consolidated act (one toestand / version), parsed from a KOOP SRU gzd record.","properties":{"act_type":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"authority":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"bwb_id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"date_modified":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"eli_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"human_readable_citation":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"legal_areas":{"items":{"type":"string"},"type":"array"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"text_url":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"version_date":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null}},"type":"object"}},{"_meta":{"fastmcp":{"tags":[]}},"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":true},"description":"Fetch the full consolidated XML of a Dutch act in force on a date.","inputSchema":{"additionalProperties":false,"properties":{"bwb_id":{"description":"e.g. ``\"BWBR0005537\"``.","type":"string"},"on_date":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"optional ``YYYY-MM-DD``; defaults to today."}},"required":["bwb_id"],"type":"object"},"name":"nl_get_text","outputSchema":{"additionalProperties":true,"description":"Result of ``nl_get_text`` (full consolidated XML of one version).","properties":{"bwb_id":{"type":"string"},"byte_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"dataset_note":{"default":"BWB (Basiswettenbestand) is the official consolidated body of Dutch national legislation, served by KOOP over SRU. Each act is identified by a BWB id (e.g. BWBR0005537) and has many time-stamped versions (toestanden); tools default to the version in force on a given date (today unless on_date is set). The Netherlands does NOT publish native ELI (/eli/) URIs on consolidated BWB - eli_uri carries the official persistent identifier (the wetten.overheid.nl/id toestand URI). This MVP covers consolidated legislation; case law is exposed separately via the Rechtspraak tools.","type":"string"},"eli_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"format":{"default":"bwb-toestand-xml","type":"string"},"human_readable_citation":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"on_date":{"type":"string"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"text_url":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"version_date":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null}},"required":["bwb_id","on_date"],"type":"object"}},{"_meta":{"fastmcp":{"tags":[]}},"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":true},"description":"List Dutch court decisions (Rechtspraak Open Data) by metadata filters.\n\nThe open-data search has NO free-text query. Filter by a date range and, optionally, a\ncourt (`creator`) or legal-area (`subject`) authority URI, then fetch a decision with\n``nl_get_decision``.","inputSchema":{"additionalProperties":false,"properties":{"creator":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"optional court authority URI (Instantie), passed through verbatim."},"date_from":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"earliest decision date (YYYY-MM-DD)."},"date_to":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"latest decision date (YYYY-MM-DD)."},"max_results":{"default":10,"description":"1..50.","type":"integer"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"optional legal-area authority URI (Rechtsgebied), passed through verbatim."}},"type":"object"},"name":"nl_case_search","outputSchema":{"additionalProperties":true,"description":"Result of ``nl_case_search`` - decisions matching the metadata filters.","properties":{"dataset_note":{"default":"Dutch case law via Rechtspraak Open Data (data.rechtspraak.nl), keyed by native ECLI. The open-data search has NO free-text query - discover decisions by date range (and optional court/subject), then fetch a decision by its ECLI. Decisions carry an 'ecli' (not an ELI).","type":"string"},"items":{"items":{"additionalProperties":true,"description":"One Rechtspraak search hit (an ECLI).","properties":{"ecli":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"human_readable_citation":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null}},"type":"object"},"type":"array"},"returned":{"type":"integer"},"total":{"type":"integer"}},"required":["total","returned"],"type":"object"}},{"_meta":{"fastmcp":{"tags":[]}},"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":true},"description":"Declare what this connector covers, how it is sourced, and what it does NOT cover.\n\nCall this before telling a user that the law \"does not contain\" something, and whenever\na search comes back empty: the absence may be a gap in this connector rather than in the\nlaw. Every gap carries a fallback saying where to look instead.\n\nReturns:\n    ``Coverage`` with families, an as-of note, and a non-empty list of known gaps.","inputSchema":{"additionalProperties":false,"properties":{},"type":"object"},"name":"nl_coverage","outputSchema":{"additionalProperties":true,"description":"What this connector covers, how it is sourced, and what it does not cover.","properties":{"as_of_note":{"description":"States what the dates mean, and what they do not promise.","type":"string"},"families":{"items":{"additionalProperties":true,"description":"One data family this connector exposes.","properties":{"captured_at":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Date this family was last captured (ISO). None when queried live."},"live":{"default":true,"description":"True when queried live instead of from a snapshot.","type":"boolean"},"name":{"description":"Data family, e.g. 'Federal legislation'.","type":"string"},"source":{"description":"Official source the data comes from.","type":"string"},"tool":{"description":"Tool or tools that reach this family.","type":"string"}},"required":["name","tool","source"],"type":"object"},"type":"array"},"known_gaps":{"description":"Never empty. An empty list would mean 'not checked', not 'no gaps'.","items":{"additionalProperties":true,"description":"A known, named hole in this connector's coverage - plus the way around it.","properties":{"fallback":{"description":"Where to go instead.","type":"string"},"family":{"description":"Which family the gap belongs to.","type":"string"},"id":{"description":"Stable gap identifier.","type":"string"},"missing":{"description":"What is NOT available through this connector.","type":"string"}},"required":["id","family","missing","fallback"],"type":"object"},"type":"array"},"status":{"default":"ok","enum":["ok","degraded","failed"],"type":"string"}},"required":["as_of_note"],"type":"object"}},{"_meta":{"fastmcp":{"tags":[]}},"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":true},"description":"Fetch a Dutch court decision by its ECLI (Rechtspraak Open Data).","inputSchema":{"additionalProperties":false,"properties":{"ecli":{"description":"e.g. ``ECLI:NL:HR:2020:1``.","type":"string"}},"required":["ecli"],"type":"object"},"name":"nl_get_decision","outputSchema":{"additionalProperties":true,"description":"Result of ``nl_get_decision`` - a Dutch court decision with native ECLI.","properties":{"byte_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null},"court":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"dataset_note":{"default":"Dutch case law via Rechtspraak Open Data (data.rechtspraak.nl), keyed by native ECLI. The open-data search has NO free-text query - discover decisions by date range (and optional court/subject), then fetch a decision by its ECLI. Decisions carry an 'ecli' (not an ELI).","type":"string"},"date":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"ecli":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"human_readable_citation":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"issued":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"zaaknummer":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null}},"type":"object"}}]}}}
