Skip to main content
Glama
Federal Courts Analyst

Federal Courts Analyst

Compare courts

compare_courts
Read-onlyIdempotent

Compare or rank federal district courts by a chosen workload measure and fiscal year, returning ranked results from one official edition.

Instructions

Use this when the user wants courts compared or ranked on one published measure in one fiscal year: "the five districts with the highest weighted filings per judgeship in FY2024", "compare S.D.N.Y., E.D.N.Y. and D.N.J.", "which Fifth Circuit districts are busiest".

Not for a single court's figure (use get_official_figure) or for why a court's number changed (use explain_change). Weighted filings come only from the official tables here.

Returns ranked rows (rank, court, value), all from one edition and table, plus the national figure from the same edition and, when a later edition revised the national figure, that one too with a warning. Omit courts to rank all districts; a circuit code ranks its districts. order='asc' for lowest first (for example fastest median times).

Example: measure='weighted_total_filings_per_judgeship', fiscal_year=2024, top_n=5 → N.D. Fla. 4,357, E.D.N.C. 834, E.D. Cal. 790, … (JB-2024 X-1A).

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": {
      "measure": "<measure>",
      "fiscal_year": "<fiscal_year>"
    },
    "name": "compare_courts"
  }
}

Input Schema

NameRequiredDescriptionDefault
orderNodesc
top_nNo
courtsNoCourts to compare; omit for every district. A circuit code means its districts.
editionNoWhich edition's figure to return: 'latest' (default: the current official figure), 'first_published', or a specific edition such as JB-2020 or JFF-2023.latest
measureYesA published statistic. If the user didn't say whether they mean weighted or unweighted filings, pass 'filings_per_judgeship' (or 'civil_filings') and the server will ask them.
fiscal_yearYes

Output Schema

NameRequiredDescriptionDefault
dataNo
statusNook
declinedNo
warningsNo
provenanceNo
clarificationNo
suggested_nextNoHints for a follow-up call.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive, closed-world), and the description adds genuinely new behavioral facts: results are ranked rows from a single edition and table, a national figure from the same edition is appended, and a later-edition revision of that national figure is surfaced with a warning. It also discloses ranking semantics (omit courts = all districts; a circuit code expands to its districts) and notes the weighting provenance ('weighted filings come only from the official tables here').

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?

Front-loaded with the trigger case, then exclusions, then return behavior, then a worked example – a logical order an agent can scan top-down. Each sentence adds operational information; even the example row clarifies output shape and cites the source table.

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?

For a 6-parameter comparison tool with rich annotations and an output schema, the description covers everything needed to invoke it correctly: trigger conditions, exclusions, scope/expansion rules, sort direction, edition consistency, and the revision-warning edge case. Return value formatting is correctly deferred to the output schema.

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

Parameters4/5

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

With only 50% schema description coverage, the description carries extra weight and does add meaning: it explains what omitting 'courts' does, that a circuit code expands to its districts, that order='asc' yields lowest-first (with the median-time use case), and that all returned values come from one edition and table. It does not explain fiscal_year beyond 'one fiscal year', and measure guidance lives in the schema rather than the description, so it stops short of full compensation.

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 ('courts compared or ranked on one published measure in one fiscal year') and anchors it with three concrete user phrasings, which lets an agent recognize the request shape immediately. It also explicitly contrasts itself with get_official_figure and explain_change, so it is distinguishable from the closest siblings without reading 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?

Gives an explicit when-to-use trigger, an explicit not-for clause naming two alternatives and their conditions ('single court's figure' → get_official_figure; 'why a number changed' → explain_change). Nothing about routing is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.