PACER Dataset Statistics
pacer_statsGet PACER court records statistics: total cases, courts covered, date range, and last updated timestamp.
Instructions
Get statistics about the PACER court records dataset: total cases indexed, courts covered, date range, and last updated timestamp. Free endpoint.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/pacer.ts:178-209 (handler)The handler function for the pacer_stats tool. Calls the API endpoint /api/v1/pacer/stats, handles 404 (dataset not available) and other errors, and returns the stats JSON on success.
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) }, ], }; }, ); - src/tools/pacer.ts:22-27 (schema)The PacerStatsResponse interface defining the shape of the API response (dataset, source, update_frequency, stats).
interface PacerStatsResponse { dataset: string; source: string; update_frequency: string; stats: Record<string, unknown>; } - src/tools/pacer.ts:171-177 (schema)The input schema for pacer_stats — an empty object (no parameters required). Also includes title and description metadata.
{ 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: {}, }, - src/tools/pacer.ts:169-209 (registration)The server.registerTool('pacer_stats', ...) call that registers the tool with the MCP server, binding the schema and handler.
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) }, ], }; }, ); - src/index.ts:14-58 (registration)Import of registerPacerTools and its invocation (line 41) in the main server setup, which registers all PACER tools including pacer_stats.
import { registerPacerTools } from "./tools/pacer.js"; import { registerWeatherTools } from "./tools/weather.js"; import { registerOtcTools } from "./tools/otc.js"; import { registerTrademarkTools } from "./tools/trademarks.js"; import { registerPatentTools } from "./tools/patents.js"; import { registerCompanyTools } from "./tools/company.js"; import { registerCryptoTools } from "./tools/crypto.js"; import { registerSanctionsTools } from "./tools/sanctions.js"; import { registerWhaleTools } from "./tools/whales.js"; import { registerLabelTools } from "./tools/labels.js"; import { registerHolderTools } from "./tools/holders.js"; import { registerDexTools } from "./tools/dex.js"; import { registerContractTools } from "./tools/contracts.js"; import { registerPmTools } from "./tools/pm.js"; import { registerPmArbTools } from "./tools/pm_arb.js"; import { registerPmResolutionTools } from "./tools/pm_resolution.js"; import { registerEconTools } from "./tools/econ.js"; import { registerPmMicroTools } from "./tools/pm_micro.js"; function createMcpServer() { const server = new McpServer({ name: "verilex-data", version: "0.3.3", }); registerNpiTools(server); registerSecTools(server); registerPacerTools(server); registerWeatherTools(server); registerOtcTools(server); registerTrademarkTools(server); registerPatentTools(server); registerCompanyTools(server); registerCryptoTools(server); registerSanctionsTools(server); registerWhaleTools(server); registerLabelTools(server); registerHolderTools(server); registerDexTools(server); registerContractTools(server); registerPmTools(server); registerPmArbTools(server); registerPmResolutionTools(server); registerEconTools(server); registerPmMicroTools(server);