io.github.matematicsolutions/legalize-mcp
Legislation for 32 jurisdictions (21 EU) as law-as-git, keyless, with ELI-style citations.
Versions
0.1.1latestTools 6
legalize_list_countries List the jurisdictions available in the legalize-dev corpus. Args: eu_only: if true, restrict to EU member states. Returns: A list of ``CountryInfo`` (code, name, eu, repo).
legalize_search_laws Search a jurisdiction's laws by keyword (GitHub code search; requires a token). Args: country: ISO-3166 alpha-2 code (e.g. ``"ee"``, ``"es"``). query: keyword(s) to find inside the law texts. limit: max hits (1-100, default 10). Returns: A list of ``SearchHit`` (country, law_id, path, github_url, snippet).
legalize_get_law Fetch a law's metadata and full text by id (optionally at a historical commit). Args: country: ISO-3166 alpha-2 code (e.g. ``"es"``). law_id: the filename stem (e.g. ``"BOE-A-1978-31229"``). sha: optional commit SHA for a historical version (from ``legalize_list_reforms``). Returns: ``LawText`` with the citation contract, frontmatter metadata and the full Markdown body.
legalize_get_meta Fetch only a law's frontmatter metadata (no body) - cheap for citation checks. Args: country: ISO-3166 alpha-2 code. law_id: the filename stem. Returns: ``LawMeta`` with the citation contract and frontmatter fields.
legalize_coverage Declare what this connector covers, how it is sourced, and what it does NOT cover. Call this before telling a user that the law "does not contain" something, and whenever a search comes back empty: the absence may be a gap in this connector rather than in the law. Every gap carries a fallback saying where to look instead. Returns: ``Coverage`` with families, an as-of note, and a non-empty list of known gaps.
legalize_list_reforms List the reform history (commits) of a law - the legislative timeline. Args: country: ISO-3166 alpha-2 code. law_id: the filename stem. limit: max reforms, newest first (1-100, default 20). Returns: A list of ``Reform`` (sha, date, message, github_url). Pass a ``sha`` back to ``legalize_get_law`` to read the law as it stood at that reform.
Permissions 3
network medium filesystem low env_vars low