Skip to main content
Glama

Get PACER Case

get_pacer_case

Retrieve full metadata for a federal court case by providing its case ID. Access case title, parties, court, nature of suit, filing date, and assigned judge from PACER via CourtListener.

Instructions

Look up a single federal court case by its case ID. Returns full case metadata including title, parties, court, nature of suit, filing date, and assigned judge. Source: PACER via CourtListener, updated daily.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
case_idYesThe case ID to look up

Implementation Reference

  • src/index.ts:14-14 (registration)
    Import of registerPacerTools into the main server entry point.
    import { registerPacerTools } from "./tools/pacer.js";
  • src/index.ts:41-41 (registration)
    Registration call that wires PACER tools (including get_pacer_case) into the MCP server.
    registerPacerTools(server);
  • The full get_pacer_case tool registration: schema (case_id string), handler that calls GET /api/v1/pacer/cases/:caseId, and returns case metadata JSON.
    server.registerTool(
      "get_pacer_case",
      {
        title: "Get PACER Case",
        description:
          "Look up a single federal court case by its case ID. Returns full case metadata " +
          "including title, parties, court, nature of suit, filing date, and assigned judge. " +
          "Source: PACER via CourtListener, updated daily.",
        inputSchema: {
          case_id: z
            .string()
            .describe("The case ID to look up"),
        },
      },
      async ({ case_id }) => {
        const res = await apiGet<Record<string, unknown>>(
          `/api/v1/pacer/cases/${encodeURIComponent(case_id)}`,
        );
    
        if (!res.ok) {
          if (res.status === 404) {
            return {
              content: [
                {
                  type: "text" as const,
                  text: `Case ${case_id} not found in PACER dataset.`,
                },
              ],
            };
          }
          return {
            content: [
              {
                type: "text" as const,
                text: `API error (${res.status}): ${JSON.stringify(res.data)}`,
              },
            ],
            isError: true,
          };
        }
    
        return {
          content: [
            { type: "text" as const, text: JSON.stringify(res.data, null, 2) },
          ],
        };
      },
    );
  • The registerPacerTools function that registers all three PACER tools (search_pacer_cases, get_pacer_case, pacer_stats) on the MCP server.
    export function registerPacerTools(server: McpServer): void {
      // ── Search cases ─────────────────────────────────────────────────────────
    
      server.registerTool(
        "search_pacer_cases",
        {
          title: "Search PACER Cases",
          description:
            "Search federal court case records from PACER. Filter by party name, court code, " +
            "case type, and date range. Returns case metadata including title, parties, court, " +
            "and filing date. Source: PACER, updated daily. " +
            "Note: This dataset is coming soon and may not have data yet.",
          inputSchema: {
            party: z
              .string()
              .optional()
              .describe("Party name to search for (plaintiff or defendant)"),
            court: z
              .string()
              .optional()
              .describe(
                "Federal court code (e.g. cacd = Central District of California, " +
                "nysd = Southern District of New York, txed = Eastern District of Texas)",
              ),
            case_type: z
              .string()
              .optional()
              .describe("Case type (e.g. civil, criminal, bankruptcy)"),
            date_from: z
              .string()
              .optional()
              .describe("Start date for filing date range (YYYY-MM-DD)"),
            date_to: z
              .string()
              .optional()
              .describe("End date for filing date range (YYYY-MM-DD)"),
            limit: z
              .number()
              .int()
              .min(1)
              .max(100)
              .optional()
              .describe("Maximum number of results (default 25, max 100)"),
          },
        },
        async ({ party, court, case_type, date_from, date_to, limit }) => {
          const res = await apiGet<PacerCasesResponse>("/api/v1/pacer/cases", {
            party,
            court,
            case_type,
            date_from,
            date_to,
            limit: limit ?? 25,
          });
    
          if (!res.ok) {
            if (res.status === 404) {
              return {
                content: [
                  {
                    type: "text" as const,
                    text: "PACER dataset is not yet available. This data source is coming soon.",
                  },
                ],
              };
            }
            return {
              content: [
                {
                  type: "text" as const,
                  text: `API error (${res.status}): ${JSON.stringify(res.data)}`,
                },
              ],
              isError: true,
            };
          }
    
          const { count, data } = res.data;
          const summary = `Found ${count} PACER case(s).`;
          const json = JSON.stringify(data, null, 2);
    
          return {
            content: [{ type: "text" as const, text: `${summary}\n\n${json}` }],
          };
        },
      );
    
      // ── Single case lookup ───────────────────────────────────────────────────
    
      server.registerTool(
        "get_pacer_case",
        {
          title: "Get PACER Case",
          description:
            "Look up a single federal court case by its case ID. Returns full case metadata " +
            "including title, parties, court, nature of suit, filing date, and assigned judge. " +
            "Source: PACER via CourtListener, updated daily.",
          inputSchema: {
            case_id: z
              .string()
              .describe("The case ID to look up"),
          },
        },
        async ({ case_id }) => {
          const res = await apiGet<Record<string, unknown>>(
            `/api/v1/pacer/cases/${encodeURIComponent(case_id)}`,
          );
    
          if (!res.ok) {
            if (res.status === 404) {
              return {
                content: [
                  {
                    type: "text" as const,
                    text: `Case ${case_id} not found in PACER dataset.`,
                  },
                ],
              };
            }
            return {
              content: [
                {
                  type: "text" as const,
                  text: `API error (${res.status}): ${JSON.stringify(res.data)}`,
                },
              ],
              isError: true,
            };
          }
    
          return {
            content: [
              { type: "text" as const, text: JSON.stringify(res.data, null, 2) },
            ],
          };
        },
      );
    
      // ── Dataset stats ────────────────────────────────────────────────────────
    
      server.registerTool(
        "pacer_stats",
        {
          title: "PACER Dataset Statistics",
          description:
            "Get statistics about the PACER court records dataset: total cases indexed, " +
            "courts covered, date range, and last updated timestamp. Free endpoint.",
          inputSchema: {},
        },
        async () => {
          const res = await apiGet<PacerStatsResponse>("/api/v1/pacer/stats");
    
          if (!res.ok) {
            if (res.status === 404) {
              return {
                content: [
                  {
                    type: "text" as const,
                    text: "PACER dataset is not yet available. This data source is coming soon.",
                  },
                ],
              };
            }
            return {
              content: [
                {
                  type: "text" as const,
                  text: `API error (${res.status}): ${JSON.stringify(res.data)}`,
                },
              ],
              isError: true,
            };
          }
    
          return {
            content: [
              { type: "text" as const, text: JSON.stringify(res.data, null, 2) },
            ],
          };
        },
      );
    }
  • The apiGet helper used by the handler to make HTTP GET requests to the Verilex API.
    export async function apiGet<T = unknown>(
      path: string,
      params?: Record<string, string | number | undefined>,
    ): Promise<ApiResponse<T>> {
      const url = buildUrl(path, params);
    
      const headers: Record<string, string> = {
        Accept: "application/json",
        "User-Agent": "verilex-mcp-server/0.1.0",
      };
    
      // Forward x402 payment token if present in env (for paid endpoints)
      const paymentToken = process.env.VERILEX_PAYMENT_TOKEN;
      if (paymentToken) {
        headers["X-Payment-Token"] = paymentToken;
      }
    
      const res = await fetch(url, { headers });
      const data = (await res.json()) as T;
    
      const stale = res.headers.get("X-Data-Stale");
      const lastUpdated = res.headers.get("X-Data-Last-Updated");
      const ageSeconds = res.headers.get("X-Data-Age-Seconds");
    
      return {
        ok: res.ok,
        status: res.status,
        data,
        stale: stale === "true",
        lastUpdated: lastUpdated ?? undefined,
        ageSeconds: ageSeconds ? Number(ageSeconds) : undefined,
      };
    }
Behavior3/5

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

With no annotations, the description should disclose more behavioral traits (e.g., read-only nature). It includes source and update frequency but lacks explicit safety cues.

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?

Two efficient sentences: first states purpose and parameter, second lists return fields and source. No fluff.

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 the simple one-parameter tool and no output schema, the description adequately covers input, output, and data source.

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%; the description merely reinforces the parameter's purpose without adding new details beyond the 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 clearly states the tool looks up a single federal court case by case ID, lists the returned metadata fields, and differentiates from sibling tools like search_pacer_cases.

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?

The description implies use when a specific case ID is known and metadata is needed, but does not explicitly mention when not to use or suggest alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/carrierone/verilexdata-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server