Skip to main content
Glama

Search Legal Documents Tool

search_legal_documents
Read-onlyIdempotent

Searches German and EU legislation, plus case law from German and EU courts, the European Court of Human Rights (Council of Europe), the International Court of Justice (UN), and the Permanent Court of Arbitration (international).

Two searches run for you at once: a full-text search over titles, official identifiers, case numbers and curated short names, and — where the deployment enables it — a vector search over validated AI analyses. The response field search_modes reports which of the two actually ran.

language is mandatory and has no default: the index is monolingual, so without it a single CJEU judgment would come back up to 24 times.

This ranks whole documents. To find out what a named act says about a topic, use search_provisions instead — it works section by section. And when a question touches both statute and case law, make two calls, one per document_type: a mixed call is dominated by decisions, and the statute drops off the list.

Every result carries an id. Pass it to get_document to read the document. For decisions, results also carry a short ai_summary when a validated one exists — those exist in German or English only, and ai_summary.language says which you got. The full summary, with facts, legal issues and their source paragraphs, comes from get_document.

Every result also carries a lawdb.eu url, and where passages matched, matched_passages[].anchor_url addresses each one. Cite those links verbatim rather than building one.

A legislative act carries at most three matched provisions here, however many it really has: this list ranks whole documents. To get every matching provision of one act — page by page — call search_provisions with that act.

With historical versions included, identical displayed passages of the same act share one result. matched_versions links each matching version; identical_passages: true applies only to those passages, not to the whole act. Other provisions may differ between those versions.

A repealed act stays in the holdings and stays findable; its results carry act_status: "repealed" and rank below the act that replaced it. Say so when you cite one.

A CJEU case produces several documents — judgment, Opinion of the Advocate General, order for reference — and the Opinion often ranks above the judgment. Pass document_category: "judgment" to get the judgments themselves instead of retrieving each document to find its ECLI.

Valid jurisdiction codes and court slugs come from list_jurisdictions. An invented court slug matches nothing.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>",
      "language": "<language>"
    },
    "name": "search_legal_documents"
  }
}

Input Schema

NameRequiredDescriptionDefault
courtNoCourt slug from `list_jurisdictions`, e.g. "bgh", "eugh", "ecthr", "icj", or "pca". Case law only.
limitNoMaximum number of results.
queryYesSearch terms, a case number ("C-526/24", "1 BvR 16/13"), a short name ("DSGVO") or an official identifier.
languageYesLanguage of the results. Mandatory — decide before searching.
decided_toNoLatest date (YYYY-MM-DD).
decided_fromNoEarliest date (YYYY-MM-DD). Decision date for case law, version date for legislation.
jurisdictionNoRestrict to one jurisdiction: `de` (Germany), `eu` (European Union), `coe` (Council of Europe / ECtHR), `un` (United Nations / ICJ), or `int` (international / PCA). Use `list_jurisdictions` for the authoritative current list. Omit for all.
document_typeNoRestrict to legislative acts or to court decisions. Omit for both.
document_categoryNoRestrict to one kind of court document: "judgment", "opinion" (Advocate General), "order", "preliminary_reference" or "advisory_opinion". A CJEU case has several; without this the Opinion often ranks above the judgment.
include_historicalNoInclude superseded versions of legislative acts.
include_external_sourcesNoAlso query the supported official sources live (currently NeuRIS, EUR-Lex and InfoCuria) when the local index does not answer. Slower, but finds documents not yet imported. ICJ and PCA decisions remain searchable in LawDB's local index.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and idempotentHint; the description adds substantial behavior beyond them — dual full-text/vector search reported via `search_modes`, monolingual indexing, historical-version collapsing via `matched_versions` and the narrow meaning of `identical_passages`, repealed-act status and its ranking penalty, and that CJEU Opinions often outrank judgments.

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?

Front-loaded purpose followed by tightly themed paragraphs that each carry distinct guidance. It is long for a description and repeats the `search_provisions` and CJEU-Opinion-vs-judgment points twice, which costs some economy but not comprehension.

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?

For an 11-parameter tool with no output schema, the description compensates by naming the returned fields an agent must act on: `id`, `ai_summary` and its language, `url`, `matched_passages[].anchor_url` with a citation instruction, `search_modes`, `matched_versions` and `act_status`. Nothing essential for correct invocation or follow-up appears 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?

Schema description coverage is 100%, so the baseline is 3; the description nonetheless adds real meaning — why `language` is mandatory (a CJEU judgment would return up to 24 times), why `document_type` should be split across calls, and how `document_category` avoids retrieving documents just to find an ECLI. `limit`, `decided_from`/`decided_to` and `include_external_sources` are left to the schema.

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?

The opening sentence gives a specific verb and precisely scoped resource set: German and EU legislation plus case law from German/EU courts, ECtHR, ICJ and PCA. It immediately distinguishes itself from the sibling `search_provisions` by stating that this tool ranks whole documents rather than sections.

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

Usage Guidelines5/5

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

Explicit routing guidance: use `search_provisions` when you need what a named act says about a topic, and make two calls split by `document_type` when a question spans statute and case law, with the reason given (mixed calls are dominated by decisions). It also names `list_jurisdictions` as the prerequisite for valid jurisdiction/court values and warns that invented slugs match nothing.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources