Skip to main content
Glama

Case statistics

stats
Read-onlyIdempotent

Compute one metric over cases (or motion rulings), optionally broken down by up to two dimensions and narrowed by filters. describe_dataset lists every metric and dimension and which unit each applies to. Groups of three or fewer cases are suppressed. At most 100 groups, largest first.

Input Schema

NameRequiredDescriptionDefault
metricYesWhat to compute; see describe_dataset for each metric.
um_uimNoUM/UIM coverage is claimed.
purposeNoOne sentence on what you are trying to find out. Logged to improve the dataset; never returned.
districtNoJudicial district, e.g. HARTFORD JD.
filed_toNoFiled on or before this date (YYYY-MM-DD).
group_byNoUp to two dimensions to break the metric down by.
case_typeNoCase type code: V01, V04 or V09.
judge_keyNoJudge key from search_judges; matches the judge who decided the disposition.
mechanismNoHow the crash happened, e.g. rear_end.
road_typeNoKind of road, e.g. interstate.
filed_fromNoFiled on or after this date (YYYY-MM-DD).
trial_kindNojury, court or not_tried.
injury_kindNoAn alleged injury kind, e.g. fracture.
injury_regionNoAn injured body region, e.g. neck.
plaintiff_roleNodriver, passenger, pedestrian…
litigation_typeNothird_party, um_uim or subrogation.
amount_in_demandNoAmount-in-demand band, e.g. 15000_or_more.
claims_lost_wagesNoLost wages are claimed.
firm_juris_numberNoJuris number from search_firms; matches either side's lead firm.
commercial_vehicleNoA commercial vehicle was involved.
disposition_categoryNoHow the case ended, e.g. withdrawal or plaintiff_verdict; pending for open cases.

Output Schema

NameRequiredDescriptionDefault
unitYesWhat the metric counts: cases, or motion rulings for motion_grant_rate.
namesYesNames of the judges and firms in the groups.
groupsYesOne entry per group, largest n first.
metricYesThe metric computed.
groupByYesThe group_by dimensions, in order.
closedToYesFor metrics over closed cases, the last disposition date counted, inclusive: the as-of date. Null for metrics over every case.
truncatedYesTrue when more groups exist than were returned.
closedFromYesFor metrics over closed cases, the first disposition date counted, inclusive; the figures are not all-time. Null for metrics over every case.
totalGroupsYesGroups before the cap on how many are returned.
groupsSuppressedYesReturned groups that are suppressed.
multiValuedDimensionsYesDimensions where one case can sit in several groups, so group counts overlap.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, closed-world safety, but the description adds genuinely non-obvious behavior: small-group suppression (three or fewer cases), a 100-group cap, and largest-first ordering. These are exactly the traits an agent cannot infer from the schema, though it doesn't say what an invalid metric/unit combination returns.

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

Conciseness5/5

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

Four sentences, each earning its place: purpose first, then the discovery pointer, then the two limits. No filler and no repetition of schema content.

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 21 parameters, an output schema, and rich annotations, the description covers the things structured data can't: suppression, group cap, ordering, and where to learn valid metrics. Only a note on how filters interact with the case-vs-motion unit distinction is missing.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already carries parameter meaning and a 3 is the baseline. The description only restates that grouping takes up to two dimensions and that filters narrow results, adding nothing beyond maxItems and the per-field descriptions.

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 ("Compute one metric over cases (or motion rulings)") plus the two modifiers available (grouping dimensions and filters). This clearly separates it from retrieval siblings like search_cases and get_case, which return individual records rather than aggregates.

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

Usage Guidelines4/5

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

It routes the agent to describe_dataset for metric/dimension enumeration and states which unit each metric applies to, which is real usage guidance. However, it never states when to choose this over search_cases plus manual counting, nor any prerequisite conditions or exclusions.

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.

Resources