Get the AI case context

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://docs.usehearsay.com/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "integrations MCP server": {
    "url": "https://docs.usehearsay.com/mcp"
  }
}

Close
GET /ai/cases/{caseId}/context

Returns the case context the AI uses as background: case type, jurisdiction, theory of the case, legal claims and their elements, what to prove, key parties and dates, with where each field came from. A case with no context yet gets an empty one. Requires commenter access or above to the case and an active plan (403 otherwise); not available to opposing counsel.

Path parameters

  • caseId string Required

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • data object Required

      The AI case context profile.

      Hide data attributes Show data attributes object
      • _id string
      • case string
      • organization string
      • caseType string | null
      • jurisdiction string | null
      • theoryOfCase string | null
      • legalClaims array[object]
        Hide legalClaims attributes Show legalClaims attributes object
        • id string
        • claim string
        • statuteCitation string | null
        • elements array[object]
          Hide elements attributes Show elements attributes object
          • id string
          • description string
        • source string

          Values are complaint, attorney_stated, or amended_filing.

      • whatToProve array[string]
      • keyParties array[object]
        Hide keyParties attributes Show keyParties attributes object
        • name string
        • aliases array[string]
        • role string

          Values are petitioner, respondent, plaintiff, defendant, child, witness, third_party, or other.

        • handles array[string]
        • significance string | null
      • keyDates array[object]
        Hide keyDates attributes Show keyDates attributes object
        • date string(date-time)
        • event string
        • significance string | null
      • relevantDateRange object | null
        Hide relevantDateRange attributes Show relevantDateRange attributes object | null
        • start string(date-time)
        • end string(date-time)
      • sourceDocuments array[string]
      • authoredBy string
      • confirmedByAttorney boolean
      • fieldProvenance object

        Per field: attorney_stated, ai_extracted or ai_extracted_confirmed.

        Hide fieldProvenance attribute Show fieldProvenance attribute object
        • * string Additional properties
      • extractionModelVersion string | null
      • version number
      • createdAt string(date-time) | null
      • updatedAt string(date-time) | null
    • statusCode number Required
    • timestamp string(date-time) Required
GET /ai/cases/{caseId}/context
curl \
 --request GET 'http://api.example.com/ai/cases/{caseId}/context' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "data": {
    "_id": "65a1b2c3d4e5f6a7b8c9d0e1",
    "case": "65a1b2c3d4e5f6a7b8c9d0e2",
    "organization": "65a1b2c3d4e5f6a7b8c9d0e3",
    "caseType": "custody",
    "jurisdiction": "California",
    "theoryOfCase": "string",
    "legalClaims": [
      {
        "id": "string",
        "claim": "string",
        "statuteCitation": "string",
        "elements": [
          {
            "id": "string",
            "description": "string"
          }
        ],
        "source": "complaint"
      }
    ],
    "whatToProve": [
      "string"
    ],
    "keyParties": [
      {
        "name": "string",
        "aliases": [
          "string"
        ],
        "role": "petitioner",
        "handles": [
          "string"
        ],
        "significance": "string"
      }
    ],
    "keyDates": [
      {
        "date": "2026-05-04T09:42:00Z",
        "event": "string",
        "significance": "string"
      }
    ],
    "relevantDateRange": {
      "start": "2026-05-04T09:42:00Z",
      "end": "2026-05-04T09:42:00Z"
    },
    "sourceDocuments": [
      "string"
    ],
    "authoredBy": "65a1b2c3d4e5f6a7b8c9d0e4",
    "confirmedByAttorney": false,
    "fieldProvenance": {
      "theoryOfCase": "attorney_stated"
    },
    "extractionModelVersion": "string",
    "version": 2,
    "createdAt": "2026-01-15T10:15:00.000Z",
    "updatedAt": "2026-01-15T10:15:00.000Z"
  },
  "statusCode": 200,
  "timestamp": "2026-01-15T10:15:00.000Z"
}