Skip to main content
Glama

Search court decisions

search_cases
Read-onlyIdempotent

Full-text search for German court cases via Elasticsearch.

    Returns matching cases (with ``file_number``) and 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, as in the ``slug`` of get_law_section (e.g. "823" for
            § 823 BGB, "art-14" for Art. 14 GG). 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?

The annotations already establish that this is a safe, read-only, idempotent operation, and the description adds substantial behavioral context beyond that. It discloses return limitations, error behavior for invalid sort values, limit clamping with echoed flags, sort echo behavior, match_quality availability, and the presence of citing_cases_count.

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?

The description is long but well structured, with the core purpose and return limitations front-loaded before alternatives and parameter details. The Args section is necessary given the zero schema description coverage, though some phrasing and repeated examples could be trimmed slightly.

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?

Given 10 parameters, no output schema, and 0% schema description coverage, the description is complete enough for correct invocation. It covers return shape, filtering semantics, special conflicts, error cases, and sibling-tool alternatives.

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 so for all 10 parameters. It documents query syntax, date format, court and decision type examples, law-book and section slug requirements, the cited_case_id conflict, sort enum meaning, and limit defaults and clamping behavior.

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 description states a specific verb and resource: full-text search for German court cases via Elasticsearch. It immediately clarifies what is returned (matching cases with file_number and highlighted snippets) and explicitly distinguishes itself from get_case for full text.

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?

It names alternatives and the exact conditions for choosing them: get_case for full content, and get_cases_for_law/get_citing_cases for all citing cases without keyword refinement. It also explains filter composition with a concrete example and states the precedence when cited_case_id and law citation filters conflict.

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.