Skip to main content
Glama

Latvia Legal Research MCP Server (lv-legal-mcp)

Latviešu | English Documentation


Juridiskais MCP serveris Latvijai (lv-legal-mcp) — Latviešu

Par šo repozitoriju

Savieno jūsu AI lietotni (Claude, Cursor, Windsurf, VS Code, Antigravity) ar likumi.lv un Latvijas Tiesu portālu (eli.tiesas.lv — rajona tiesas, apgabaltiesas, Senāts un Satversmes tiesa).

Installation (AI Client Selection)

  1. Download: Click <> Code -> Download ZIP and extract the folder.

  2. Run Setup: Double-click Click_Here_To_Install_Windows.bat (Windows) or Click_Here_To_Install_Mac.command (macOS).

  3. Select AI Applications: Check the AI clients you use (Claude Desktop, Cursor, Windsurf, VS Code / Copilot, Cline, Antigravity), click Install, and restart your chosen AI application.

Read-Only Operation: This tool does not read or modify any personal files on your computer.

Judicial Hierarchy

Tier

Courts

Tier 1 (First Instance)

9 Rajona (pilsētas) tiesas (District/City Courts) & Administratīvā rajona tiesa

Tier 2 (Regional / Appellate)

5 Apgabaltiesas (Rīgas, Kurzemes, Latgales, Vidzemes, Zemgales Regional Courts) & Administratīvā apgabaltiesa

Tier 3 (Supreme / Constitutional)

Augstākā tiesa / Senāts (Supreme Court of Latvia) & Satversmes tiesa (Constitutional Court)

  • Službeni glasnik / Legislation: Likumi.lv Official Legislation Portal (Latvijas Vēstnesis) (https://likumi.lv)

  • Sudska praksa / Case Law Portal: Latvijas Tiesu Portāls (eli.tiesas.lv — Anonymized Judgments of District, Regional & Supreme Courts) (https://eli.tiesas.lv)


Related MCP server: cz-legal-mcp

English Documentation

Model Context Protocol (MCP) server providing direct, read-only access to Latvia (LV) legislation, multi-tier judicial decisions (First Instance, Regional/Cantonal/Appellate, and Supreme/Constitutional courts), and statutory citation verification across major AI clients (Claude Desktop, Cursor, Windsurf, VS Code / GitHub Copilot, Cline, Continue.dev, and Antigravity).


Interactive Desktop Setup (Select Your AI Assistant)

This package includes a graphical installer for legal practitioners and non-technical users that lets you select which AI application(s) you use:

  1. Download: Click <> Code at the top right of this repository, select Download ZIP, and extract the folder to your computer.

  2. Run the Setup Utility:

    • Windows: Double-click Click_Here_To_Install_Windows.bat

    • macOS: Double-click Click_Here_To_Install_Mac.command

  3. Select Your AI Client(s) & Connect: Check the box(es) for the AI assistant(s) installed on your computer (Claude Desktop, Cursor, Windsurf, VS Code / GitHub Copilot, Cline, Continue.dev, or Antigravity), click Install to Selected AI Clients, and restart your selected AI application.

System Integrity Note: The setup utility operates strictly in read-only mode with respect to your personal files and documents. It installs an isolated Python runtime inside the extracted folder and registers the server entry only in the AI client configuration files you select.


Multi-Tier Judicial Hierarchy & Official Sources

This server indexes and queries decisions across the full judicial hierarchy of Latvia, allowing practitioners to filter research by procedural stage:

Judicial Tier

Covered Courts & Tribunals

Tier 1 — First Instance

9 Rajona (pilsētas) tiesas (District/City Courts) & Administratīvā rajona tiesa

Tier 2 — Regional / Cantonal / Appellate

5 Apgabaltiesas (Rīgas, Kurzemes, Latgales, Vidzemes, Zemgales Regional Courts) & Administratīvā apgabaltiesa

Tier 3 — Supreme & Constitutional

Augstākā tiesa / Senāts (Supreme Court of Latvia) & Satversmes tiesa (Constitutional Court)

  • National Legislation Registry: Likumi.lv Official Legislation Portal (Latvijas Vēstnesis) (https://likumi.lv)

  • Multi-Tier Case Law Database: Latvijas Tiesu Portāls (eli.tiesas.lv — Anonymized Judgments of District, Regional & Supreme Courts) (https://eli.tiesas.lv)

  • Supported Citation Format Example: ECLI:LV:AT:2024:0101.SKC000124 or Likumi.lv

Indexed Court & Regional Sub-Portals

Sub-Portal Identifier (sub_court)

Official Endpoint / Registry

eli_tiesas_all_tiers

https://eli.tiesas.lv

augstaka_tiesa

https://www.at.gov.lv


Available MCP Tools

Tool

Description

search_legislation

Searches enacted statutes, codes, decrees, and official gazette publications in Latvia.

search_case_law

Searches national jurisprudence and European/ECLI-linked judgments for Latvia.

search_tiered_court_decisions

Filters case law specifically by judicial instance (first_instance, appellate_regional, supreme_constitutional) or regional/cantonal court key (sub_court).

list_court_hierarchy

Returns the complete 3-tier court structure and registered sub-portal endpoints for Latvia.

get_legal_document_markdown

Retrieves full statutory or judicial texts and converts them into clean Markdown.

verify_citation

Validates statutory and case law citations against official registries.


{
  "mcpServers": {
    "lv-legal-mcp": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/jurisatlas/lv-legal-mcp",
        "lv-legal-mcp"
      ]
    }
  }
}

Available Tools

6 tools
list_court_hierarchyList Court HierarchyA

Return the complete step-by-step multi-tier judicial hierarchy for Latvia (LV): Tier 1 (First Instance / Trial / Municipal / District Courts), Tier 2 (Regional / Cantonal / County / Appellate Courts), Tier 3 (Supreme / Cassation / Constitutional Courts), and all official court sub-portals.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full disclosure burden, and "Return" plus a pure content enumeration makes clear this is a side-effect-free read of a fixed reference structure. It does not say whether the hierarchy is static or changes over time, which is the only material behavioral gap for a zero-parameter lookup.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One front-loaded sentence with the country and return scope up front; the slash-separated synonyms (First Instance / Trial / Municipal / District) earn their place by helping an agent map local terminology. It is dense but not padded, though the trailing "and all official court sub-portals" is the vaguest element.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

A parameterless reference tool with an output schema needs only to say what the returned structure covers, and this description does exactly that down to the individual tiers. Return formatting is already handled by the output schema, so nothing an agent needs is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes zero parameters, so the baseline is 4 and there is nothing for the description to disambiguate. It correctly spends no words on inputs.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Return the complete step-by-step multi-tier judicial hierarchy for Latvia (LV)" names a specific verb and resource, then enumerates the exact tiers returned. Nothing about this overlaps with the search_* or verify_citation siblings, so an agent can place it immediately.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit statement of when to call this versus alternatives, no mention that it is a static reference lookup, and no hint that its tier vocabulary feeds search_tiered_court_decisions. Usage is only implied by the zero-parameter, enumeration-style description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_case_lawSearch Case LawB

Search Latvia (LV) court decisions and binding precedents via Latvijas Tiesu Portāls (eli.tiesas.lv / at.gov.lv) & Satversmes tiesa (Supported courts: Augstākā tiesa (Senāts), Satversmes tiesa (Constitutional Court), Apgabaltiesas).

NameRequiredDescriptionDefault
courtNoOptional court filter (Augstākā tiesa (Senāts), Satversmes tiesa (Constitutional Court), Apgabaltiesas).
limitNoMaximum number of judgments to return.
queryYesLegal issue, keywords, party name, or ECLI/case number.

Output Schema

NameRequiredDescription

No output parameters

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden; it does disclose provenance (official court portals) and the exact scope of courts searched, which is genuinely useful behavioral context. It omits any statement about permissions, rate limits, latency, or result ordering — and being a read-only search, the safety profile is at least implied but never confirmed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence that leads with the action and jurisdiction, which is efficient. It is slightly dense with parenthetical source and court lists that partly duplicate the schema's court enum, but nothing is wasteful enough to obscure the core purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be explained, and all parameters are schema-documented. The remaining gap is sibling disambiguation and operational context (result ordering, whether precedents are ranked) — adequate for a simple three-parameter search but not fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all three parameters (query, court, limit) are already documented in the schema, establishing the baseline of 3. The description adds no meaning beyond that — it does not explain acceptable query syntax such as ECLI formats or how the court filter interacts with the free-text query.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Search Latvia (LV) court decisions and binding precedents') and names the concrete sources (eli.tiesas.lv, at.gov.lv, Satversmes tiesa) plus the covered courts. It does not, however, distinguish itself from the sibling search_tiered_court_decisions or search_legislation, so an agent cannot tell from the text alone which search tool to pick.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the jurisdiction and source scoping — an agent can infer this is the tool for Latvian case law. But there is no explicit when-to-use, no exclusion conditions, and no routing to the closely related search_tiered_court_decisions or verify_citation siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_legislationSearch LegislationB

Search Latvia (LV) national legislation (statutes, acts, codes, regulations) via Likumi.lv Official Legislation Portal (Latvijas Vēstnesis) and European/International legal registries.

NameRequiredDescriptionDefault
yearNoOptional enactment year filter.
limitNoMaximum number of results to return.
queryYesKeywords or statute title/number to search in Latvia legislation.

Output Schema

NameRequiredDescription

No output parameters

TDQS

B3.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden; it does add useful provenance by naming the underlying portals, which tells the agent results are authoritative official sources. However, it does not state that the operation is read-only, whether there are rate limits, or how results are ranked, so behavioral coverage remains partial.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with the resource and scope stated first. The parenthetical '(Latvijas Vēstnesis)' and the dual portal list add length without much decision value, but nothing is wasted outright.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be explained, and the three parameters are simple. Still, the description leaves ambiguity about whether the tool covers only Latvian law or also EU/international instruments, and offers no guidance on how to phrase a query, which matters for a legal search tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so query, year, and limit are already documented in the schema; the description adds no extra meaning such as query syntax, wildcard behavior, or how the year filter interacts with statute numbers. Baseline 3 applies when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb (Search) and resource (Latvia national legislation: statutes, acts, codes, regulations), which clearly separates it from case-law siblings like search_case_law and search_tiered_court_decisions. It stops short of explicitly naming a sibling or stating a boundary, so it is clear but not fully differentiated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It says where the search runs (Likumi.lv, European/International registries) but gives no when-to-use guidance, no exclusions, and no pointer to alternatives such as search_case_law for court decisions or verify_citation for checking a reference. The agent must infer routing from the resource noun alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_tiered_court_decisionsSearch Tiered Court DecisionsA

Search court decisions in Latvia (LV) filtered by specific judicial tier or regional/cantonal/appellate court. Supports Tier 1 (first_instance), Tier 2 (appellate_regional — including Cantonal/Regional/County/Circuit courts), and Tier 3 (supreme_constitutional), or a specific sub-portal key from list_court_hierarchy.

NameRequiredDescriptionDefault
tierNoJudicial stage: 'first_instance', 'appellate_regional' (Cantonal/Regional/Circuit/Appellate), 'supreme_constitutional', or 'all'.appellate_regional
limitNoMaximum number of decisions to return.
queryYesLegal issue, statute article, case number, or keywords.
sub_courtNoOptional specific court/canton/region key (e.g. 'kanton_sarajevo', 'kanton_tuzla', 'kanton_mostar', 'okruzni_banja_luka', etc.).

Output Schema

NameRequiredDescription

No output parameters

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are supplied, so the description carries the full behavioral burden, and it covers what is searchable and that results are filtered by tier. It discloses nothing about result volume behavior, pagination, cost, or ordering beyond the schema's limit parameter, and read-only nature is only implied by "Search." Adequate for a query tool but thin given the total absence of annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the action and the resource, with no filler. The nested parentheticals around tier names are dense but each one disambiguates a value an agent must choose between, so the length is earned.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be described, and all four parameters are documented in-schema; the description supplies the tier taxonomy and the pointer to list_court_hierarchy that complete the picture. The one gap is the unresolved Latvia-versus-Balkan-court-key tension, which an agent would want resolved before choosing a sub_court value.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 100%, so the baseline is 3 — but the description earns above baseline by expanding the tier vocabulary into plain-language court types ("Tier 2 (appellate_regional — including Cantonal/Regional/County/Circuit courts)") and by directing sub_court lookups to list_court_hierarchy. That mapping is genuine meaning the schema alone does not convey.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb+resource ("Search court decisions") and scope (Latvia, LV), and the tier enumeration makes the retrieval target unambiguous against siblings like search_legislation and search_case_law. Minor deduction: the schema's own sub_court examples (kanton_sarajevo, okruzni_banja_luka) are Balkan, not Latvian, which conflicts with the stated country and could leave an agent unsure what jurisdiction it is actually querying.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly tells the agent the two retrieval modes — aggregate by tier (first_instance / appellate_regional / supreme_constitutional) or drill into one court — and points at list_court_hierarchy as the source of valid sub-portal keys, which is real routing guidance. It stops short of saying when NOT to use this tool (e.g. when search_case_law or search_legislation is the better call), so the sibling boundary is only implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

verify_citationVerify CitationA

No-Hallucination Citation Verifier for Latvia (LV). Validates format and live existence of legal citations (e.g., 'ECLI:LV:AT:2024:0101.SKC000124 or Likumi.lv') against official Latvia and ECLI/ELI registries to prevent AI-hallucinated citations.

NameRequiredDescriptionDefault
citationYesCase citation, ECLI, or statute reference to verify (e.g., 'ECLI:LV:AT:2024:0101.SKC000124 or Likumi.lv').

Output Schema

NameRequiredDescription

No output parameters

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden: it does disclose that the check is a live lookup against official Latvia and ECLI/ELI registries (i.e., network-dependent, non-deterministic availability) plus a format validation step. It does not say what happens on lookup failure, whether unverifiable registries produce a soft or hard result, or any auth/rate constraints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One sentence, front-loaded with the jurisdiction and purpose, with no filler. Minor deductions for duplicating the schema's example string and for a malformed quotation in that example, which slightly muddies readability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-parameter verification tool with an output schema, the description covers scope (Latvia only), the sources consulted, and the intent. It could say more about what 'live existence' means when a registry is unreachable, but nothing essential to invoking it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% for the single 'citation' parameter, so the schema already documents the type and gives the same example. The description repeats rather than extends that example and adds no format rules (e.g., accepted ECLI syntax variants). Baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('validates format and live existence') and a specific resource ('legal citations ... for Latvia') and scopes it to LV/ECLI/ELI registries. This clearly separates it from siblings like search_case_law and search_legislation, which retrieve documents rather than verify a supplied citation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The stated motivation ('to prevent AI-hallucinated citations') implies when to call it, but there is no explicit when/when-not guidance and no sibling is named as an alternative. An agent must infer that this is a post-generation check rather than a discovery tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 6 tool updatesv1.1.0
    • First observedget_legal_document_markdown
    • First observedlist_court_hierarchy
    • First observedsearch_case_law
    • First observedsearch_legislation
    • First observedsearch_tiered_court_decisions
    • First observedverify_citation

TDQS

A3.7/5.0

Scored across 6 tools

Disambiguation3/5

Most tools target clearly distinct operations (hierarchy listing, legislation search, document retrieval, citation verification). However, search_case_law and search_tiered_court_decisions both search Latvian court decisions, differing mainly by filtering, so an agent may struggle to choose between them. The descriptions help somewhat by explaining tier filters, but the boundary is still fuzzy.

Naming Consistency5/5

All six tools use a consistent snake_case verb_noun pattern: list_court_hierarchy, search_legislation, search_case_law, get_legal_document_markdown, search_tiered_court_decisions, verify_citation. The naming is predictable and readable throughout.

Tool Count5/5

Six tools is a well-scoped set for a focused Latvian legal research server, with each tool covering a distinct capability. There is no bloat and no obvious missing operational area requiring additional tools.

Completeness4/5

The surface covers the core read-only legal research lifecycle: court hierarchy discovery, legislation search, case-law search, full-text retrieval, and citation verification. Minor gaps exist, such as no explicit tool for browsing or listing legislation sources or metadata, but agents can work around these via search and retrieval.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables read-only search and retrieval of Czech legislation and multi-tier court decisions, filtering by judicial instance, and verification of statutory and case-law citations against official registries.
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables read-only access to Lithuanian legislation, multi-tier court decisions, and statutory/case-law citation verification through official legal portals, with tools to search, retrieve Markdown texts, list court hierarchy, and validate citations.
    MIT