Search PACER Cases
search_pacer_casesSearch federal court case records by party, court, case type, and date range. Retrieve case metadata including title, parties, and filing date.
Instructions
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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| party | No | Party name to search for (plaintiff or defendant) | |
| court | No | Federal court code (e.g. cacd = Central District of California, nysd = Southern District of New York, txed = Eastern District of Texas) | |
| case_type | No | Case type (e.g. civil, criminal, bankruptcy) | |
| date_from | No | Start date for filing date range (YYYY-MM-DD) | |
| date_to | No | End date for filing date range (YYYY-MM-DD) | |
| limit | No | Maximum number of results (default 25, max 100) |
Implementation Reference
- src/tools/pacer.ts:29-114 (registration)The registerPacerTools function registers 'search_pacer_cases' (and two other tools) onto the MCP server. Called from src/index.ts line 41.
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}` }], }; }, ); - src/tools/pacer.ts:74-113 (handler)The async handler function for 'search_pacer_cases'. It calls apiGet to /api/v1/pacer/cases with query parameters (party, court, case_type, date_from, date_to, limit), handles 404 for unavailable dataset, and returns formatted results.
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}` }], }; }, - src/tools/pacer.ts:35-72 (schema)Zod-based input schema for 'search_pacer_cases': optional fields party, court, case_type, date_from, date_to, and limit (int, 1-100, default 25).
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)"), }, - src/client.ts:44-76 (helper)The apiGet helper function 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, }; } - src/index.ts:41-42 (registration)Registration call site - registerPacerTools(server) is invoked to register all PACER tools including search_pacer_cases.
registerPacerTools(server); registerWeatherTools(server);