Skip to main content
Glama

Open Legal Data (Germany)

Filter court decisions

filter_cases
Read-onlyIdempotent

Structured filtering of court cases using the database.

    Unlike search_cases (which uses full-text search), this tool filters
    cases using exact database fields. Returns case metadata without
    full content.

    Args:
        court_id: Filter by court database ID.
        court_slug: Filter by court slug (e.g. "bgh").
        date_after: Cases from this date onward (YYYY-MM-DD).
        date_before: Cases up to this date (YYYY-MM-DD).
        file_number: Exact file number (Aktenzeichen).
        ecli: Exact ECLI identifier.
        decision_type: Decision type (e.g. "Urteil", "Beschluss").
        limit: Maximum results (default 20, max 50). Values above 50
            are clamped; the response then includes
            ``limit_clamped: true`` and the original ``requested_limit``.
        offset: Skip first N results for pagination (default 0).
    

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "filter_cases"
  }
}

Input Schema

NameRequiredDescriptionDefault
ecliNo
limitNo
offsetNo
court_idNo
court_slugNo
date_afterNo
date_beforeNo
file_numberNo
decision_typeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world behavior, so the bar is lower. The description still adds real value by disclosing the limit-clamping rule and the resulting ``limit_clamped``/``requested_limit`` response fields — behavior an agent could not infer from structured data. It stops short of covering default no-filter behavior or result ordering.

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 purpose and the sibling contrast are front-loaded in the first two sentences, then parameters follow in a scannable list. The docstring-style Args block is slightly verbose but every line carries information, so little is wasted.

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 nine-parameter read-only tool with no output schema, the definition covers field meanings, formats, pagination, and clamping, plus a summary of the return payload. The remaining gap is what happens when no filters are supplied and how results are ordered, which matters for a filter tool with all-optional parameters.

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 coverage is 0%, so the description carries the full burden, and it does: every one of the nine parameters is explained with formats (YYYY-MM-DD dates, court_slug example "bgh", decision_type examples "Urteil"/"Beschluss", ECLI and Aktenzeichen semantics). The limit entry even documents the default of 20, the max of 50, and the clamp behavior — meaning absent from the bare integer 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?

States a specific verb and resource ("Structured filtering of court cases") and immediately distinguishes itself from the sibling search_cases by contrasting exact-field filtering with full-text search. An agent can pick between the two without inspecting either 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?

Explicitly routes the agent: use this tool for exact database field matches, use search_cases for full-text queries. It also sets expectations that only case metadata is returned, so an agent knows not to call it expecting full decision text.

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.