Skip to main content
Glama

Open Legal Data (Germany)

Search court decisions

search_cases
Read-onlyIdempotent

Full-text search for German court cases via Elasticsearch.

    Returns matching cases with highlighted snippets. Does NOT return
    full case text - use get_case to retrieve complete content.

    The citation filters compose with ``query`` so you can answer
    "cases citing § 823 BGB that mention 'Mietrecht'" in one call —
    pass ``query="Mietrecht"`` together with ``cited_law_book="bgb"``
    and ``cited_law_section="823"``. For "give me ALL citing cases"
    without keyword refinement, prefer the dedicated
    ``get_cases_for_law`` / ``get_citing_cases`` tools.
    ``cited_case_id`` is mutually exclusive with the law citation
    filter — if both are supplied, the law filter wins.

    Args:
        query: Search query text (supports Lucene syntax).
        court_code: Filter by court code (e.g. "BGH", "BVerfG").
        start_date: Filter cases from this date (YYYY-MM-DD).
        end_date: Filter cases up to this date (YYYY-MM-DD).
        decision_type: Filter by decision type (e.g. "Urteil", "Beschluss").
        cited_law_book: Restrict to cases citing a law from this
            book slug (e.g. "bgb"). Requires ``cited_law_section``.
        cited_law_section: Restrict to cases citing this law section
            slug (e.g. "823"). Requires ``cited_law_book``.
        cited_case_id: Restrict to cases citing the case with this id.
        sort: Result order — "relevance" (default), "date" (newest
            first), or "most_cited" (most-cited first, for finding
            landmark precedent). The response echoes the applied
            ``sort``; any other value returns an error. Each result
            carries ``citing_cases_count`` so you can see how often it
            is cited. With relevance sort each result also carries
            ``match_quality`` ("high"/"medium"/"low" relative to the
            top hit) so you can tell where relevance drops off; it is
            left out for "date" and "most_cited", where the score is
            not the ranking signal.
        limit: Maximum results (default 10, max 50). Values above 50 are
            clamped; the response then includes ``limit_clamped: true``
            and the original ``requested_limit``.
    

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>"
    },
    "name": "search_cases"
  }
}

Input Schema

NameRequiredDescriptionDefault
sortNorelevance
limitNo
queryYes
end_dateNo
court_codeNo
start_dateNo
cited_case_idNo
decision_typeNo
cited_law_bookNo
cited_law_sectionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, but the description adds behavior they cannot express: results carry highlighted snippets only, sort echoes back and invalid values error, limit above 50 is clamped with limit_clamped/requested_limit in the response, and match_quality is omitted for non-relevance sorts. It also documents a per-result field (citing_cases_count) that affects how results should be read.

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 with purpose and scope before the detail, and every section adds information an agent needs. The Args block is long and necessarily repeats parameter names already in the schema, which costs some tightness, but there is no filler or marketing language.

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 a 10-parameter search tool with no output schema and zero schema coverage, the definition covers invocation (all params), return shape (snippets, citing_cases_count, match_quality, limit_clamped), and failure behavior (invalid sort errors). Nothing material is left for the agent to infer.

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

Parameters5/5

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

Schema description coverage is 0%, so the description carries the full burden and does: every one of the 10 parameters gets meaning, examples ("BGH", "Urteil", "bgb"/"823"), date format (YYYY-MM-DD), defaults, max/limit clamping, the paired requirement between cited_law_book and cited_law_section, and the mutual exclusivity with cited_case_id. This is meaning well beyond the bare type/default 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?

Opens with a specific verb and resource ("Full-text search for German court cases") and immediately bounds the scope by stating it does NOT return full case text, naming get_case as the alternative. An agent can distinguish it from get_cases_for_law, get_citing_cases, and get_case without opening any schema.

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?

Gives explicit routing rules: use get_case for full text, prefer get_cases_for_law/get_citing_cases for "ALL citing cases" without keyword refinement, and combine query with citation filters when both apply. It also states a precedence rule (cited_case_id vs. law filter, law filter wins), which removes a real ambiguity rather than leaving the agent to guess.

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.