Skip to main content
An AI agent can use Court Rules in two ways. The OpenAPI spec describes every endpoint, so an LLM can read it and call the API, and the MCP server offers court rules and enforcement data as agent tools.

MCP vs REST API

If your AI tool supports the Model Context Protocol (MCP), you can connect directly to the hosted MCP server instead of using the REST API. MCP provides the same data through a standardized tool-calling interface that works natively with Claude Desktop, Cursor, and other MCP-enabled clients. See the MCP: Court Rules and MCP: enforcement data guides for setup instructions. The REST API approach below works with any HTTP client or agent framework.

Quick start: copy a prompt from the console

The console dashboard has ready-to-paste prompts for v0, Bolt, Replit, Lovable, Claude Code, Cursor, and Windsurf. Select your tool, copy the prompt, and paste it. The prompt includes the API endpoint, example request bodies, and instructions for building a compliance checker UI. For local tools (Claude Code, Cursor, Windsurf), your API key is included automatically.

Step 1: Download the OpenAPI spec

The spec is available as a public endpoint (no authentication required):
The response is the OpenAPI 3.1 specification, with every endpoint, its request and response schemas, and examples. The API generates the spec from its route definitions, so it matches the running API.

Step 2: Feed the spec to your agent

Give the OpenAPI spec to your LLM as context. Most AI agent frameworks support this natively:
  • Claude: Attach the JSON file as context or paste it into the system prompt
  • ChatGPT: Upload the file or use the Actions/Functions feature
  • LangChain / LlamaIndex: Use their OpenAPI tool loader
  • Custom agents: Parse the spec and register each endpoint as a tool

Step 3: Example agent prompt

Here’s a system prompt that turns an LLM into a court rules compliance assistant:

Agent workflow

Enforcement data in agent workflows

AI agents can monitor enforcement actions, answer regulatory questions, and trigger compliance reviews using the enforcement tools available through MCP.

Example: regulatory monitoring agent

Example agent conversation

For the full list of enforcement tools and their parameters, see the MCP: enforcement data guide.

Tips for agent builders

Use /rules for context

Before running a compliance check, call /rules to give your agent and the user the rules that apply, so the agent’s explanations can cite them:

Use /check for validation

The /check endpoint is deterministic, so the same input always gives the same result and your agent can call it again each time the user changes the document. Each call counts against your rate limits:

Use /classify for PDF analysis

If the user uploads a PDF, use /classify to extract metadata and classify it before checking:
The response includes a check_request field with extracted document metadata. Before sending to /check, merge in the filing context fields that only the filer knows: is_pro_se, pmc_completed, opposing_party_pro_se, and filing_role.

Use /courts for discovery

Let the agent browse available courts and judges:

Example conversation flow

Framework-specific examples

Claude tool use

OpenAI function calling

Further reading