Skip to main content
Glama

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, newest first, with ``total`` and ``has_more``. If an
    exact count takes too long, ``total`` is a lower bound and
    ``total_is_lower_bound`` is true. A filter combination too broad to
    answer in time (e.g. a rare ``decision_type`` without court or date
    filter) returns an ``error`` with a ``hint`` to narrow it.

    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.9/5.0
Behavior5/5

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

Beyond the annotations, which already state read-only and idempotent behavior, the description discloses return shape, sorting, pagination indicators, lower-bound count behavior, limit clamping metadata, and error/hint behavior for broad queries. These are meaningful behavioral details that an agent would not get from the annotations or schema.

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 front-loaded with purpose and sibling differentiation, then a structured argument list. It is appropriately sized for nine parameters, though the argument list format is slightly repetitive rather than maximally compact; every sentence still earns its place.

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 nine optional parameters, no output schema, and no enum constraints, the definition covers filtering semantics, pagination, result ordering, truncation indicators, and error behavior. An agent has enough information to invoke the tool and interpret its response correctly.

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 must carry the parameter burden. It explains each filter's meaning with examples, specifies date formats, describes pagination defaults, and clarifies limit clamping and offset behavior, adding substantial meaning beyond the bare 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 description states a specific verb and resource: structured filtering of court cases using exact database fields. It explicitly contrasts this with search_cases and its full-text search, so an agent can distinguish the two siblings without opening 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?

It gives explicit selection guidance: use this tool for exact-field filtering, and use search_cases for full-text search. It also explains behavior for overly broad filter combinations, including that an error with a hint will be returned, which helps the agent choose and adjust filters correctly.

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.