Skip to main content
Glama
diplv

companylens-mcp

Court Cases

company_court_cases

Retrieve 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

TableJSON Schema
NameRequiredDescriptionDefault
entity_idYesCompanyLens entity ID from company_search (starts with "companylens_")

Implementation Reference

  • 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.');
      }
  • 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_")'),
        }),
      },
Behavior3/5

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

Since no annotations are provided, the description carries the full burden. It successfully discloses the data source ('Powered by CourtListener/RECAP') and hints at return content ('dockets, litigation history, case status'). However, it omits operational details like read-only safety, pagination behavior, or rate limits that annotations would typically cover.

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 sentences total, both information-dense. Front-loaded with purpose and scope, followed by prerequisite instruction. No redundant words or filler content. Every phrase earns its place in guiding the LLM.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter lookup tool without output schema, the description adequately covers purpose, data provenance, return categories, and prerequisites. Minor gap: could explicitly state this retrieves historical litigation data to set expectations for the response structure.

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 100% schema description coverage, the baseline is 3. The description adds valuable workflow context by stating the entity_id comes from company_search, helping the agent understand how to obtain valid parameter values. This meaningfully supplements the schema's technical description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the tool retrieves 'US federal court cases involving a company' with specific outputs (dockets, litigation history, case status). The verb 'Get' is clear, and the scope (US federal) is specific. However, it does not explicitly differentiate from siblings like company_contracts or company_sanctions_check within the description text itself.

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?

Provides explicit prerequisite guidance: 'Use company_search first to get an entity_id,' establishing the required workflow sequence. This is strong context for when to invoke the tool. Lacks explicit 'when not to use' guidance or alternative tool suggestions for non-federal cases.

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/diplv/companylens-mcp'

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