Skip to main content
Glama

Open Legal Data (Germany)

Get court decision statistics

get_case_statistics
Read-onlyIdempotent

Get aggregated case statistics.

    Returns case counts grouped by time period, optionally filtered
    by court, state, or jurisdiction.

    Args:
        court_id: Filter by court ID.
        state: Filter by state name or slug.
        jurisdiction: Filter by jurisdiction. Accepts the English
            shortcuts ("ordinary", "labor", …) or the stored German
            values ("Ordentliche Gerichtsbarkeit", …).
        date_after: Count cases from this date (YYYY-MM-DD, default: 1 year ago).
        date_before: Count cases up to this date (YYYY-MM-DD, default: today).
        group_by: Time grouping: "month" (default) or "year".

    Returns an ``{"error": ...}`` payload (instead of silently zero
    results) when an unknown court_id, state, jurisdiction, group_by,
    or malformed date is supplied — the previous behavior swallowed
    bad inputs as ``total: 0`` and was the dangerous failure mode
    called out in the MCP audit.
    

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": "get_case_statistics"
  }
}

Input Schema

NameRequiredDescriptionDefault
stateNo
court_idNo
group_byNomonth
date_afterNo
date_beforeNo
jurisdictionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/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, so the safety profile is covered. The description adds genuinely non-obvious behavior: default date window (one year ago to today) and, most importantly, that invalid court_id/state/jurisdiction/group_by or malformed dates return an {"error": ...} payload rather than a silent zero count - a failure mode an agent must anticipate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The front-loaded purpose and Args block are efficient, but the closing paragraph about 'the previous behavior swallowed bad inputs' and 'the dangerous failure mode called out in the MCP audit' is meta-commentary about tool history that adds length without helping the agent call it. The actionable content there - errors are returned, not zero counts - could be one short sentence.

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?

With no output schema and zero schema coverage, a 6-parameter tool would usually be under-documented, but the description covers every parameter, all defaults, and the error contract. The only gap is the precise structure of a successful response (what the period keys and count fields look like), which the agent must discover at call time.

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 six parameters: date formats (YYYY-MM-DD), defaults for both date bounds, the accepted values for group_by, and the dual-language jurisdiction shortcuts ('ordinary', 'labor', ...) versus stored German values. This is meaningfully more than the bare titles 'State', 'Court Id', 'Jurisdiction' in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first two lines state a specific verb and resource ('Get aggregated case statistics') and immediately describe the aggregation: case counts grouped by time period with optional court/state/jurisdiction filters. This clearly separates it from case-listing siblings like get_case or search_cases, though it never names an alternative explicitly.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: the agent can infer this tool is for aggregate counts rather than individual records, and the optional filters indicate it can be narrowed. There is no explicit 'use this instead of filter_cases when you need counts' guidance or stated preconditions.

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.