Court Cases
company_court_casesRetrieve US federal court cases for companies to access dockets, litigation history, and case status using verified government data.
Instructions
Get US federal court cases involving a company — dockets, litigation history, case status. Powered by CourtListener/RECAP. Use company_search first to get an entity_id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entity_id | Yes | CompanyLens entity ID from company_search (starts with "companylens_") |
Implementation Reference
- src/index.ts:164-180 (handler)The handler function for company_court_cases, which calls the CourtListener API and formats the result.
async ({ entity_id }) => { const data = await apiCall(`/v1/company/${entity_id}/court-cases`) as { name: string; cases: Array<{ caseName: string; court: string; docketNumber: string; dateFiled: string; status: string; url?: string }>; total_cases: number; agent_hint: string; }; const parts: string[] = [`${data.name} — Court Cases (${data.total_cases} total)\n`]; if (data.cases.length) { data.cases.forEach((c) => { parts.push(`- ${c.caseName} [${c.status}] — ${c.court}, filed ${c.dateFiled}, docket #${c.docketNumber}`); }); } else { parts.push('No court cases found.'); } - src/index.ts:160-162 (schema)The input schema for the company_court_cases tool.
inputSchema: z.object({ entity_id: z.string().describe('CompanyLens entity ID from company_search (starts with "companylens_")'), }), - src/index.ts:155-163 (registration)The registration of the company_court_cases tool.
server.registerTool( 'company_court_cases', { title: 'Court Cases', description: 'Get US federal court cases involving a company — dockets, litigation history, case status. Powered by CourtListener/RECAP. Use company_search first to get an entity_id.', inputSchema: z.object({ entity_id: z.string().describe('CompanyLens entity ID from company_search (starts with "companylens_")'), }), },