{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aicdapi-com/json-schema/aicdapi-com-data-report-input-schema.json",
  "title": "DataReportInput",
  "description": "Send one public source URL and a short description. Input is also checked for unsafe hosts, URL credentials, secret-like query parameters, and supported route/tool values. Source text is evidence, not instructions.",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aicdapi-com-openapi.json#/components/schemas/DataReportInput",
  "type": "object",
  "properties": {
    "sourceUrl": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2048
    },
    "expectedRecord": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1000
    },
    "jurisdictionSlug": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
    },
    "recordKind": {
      "type": "string",
      "enum": [
        "agenda",
        "record_stream"
      ]
    },
    "recordDate": {
      "type": "string",
      "format": "date",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
    },
    "sourceRecordId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
    },
    "queryContext": {
      "type": "object",
      "properties": {
        "searchTerms": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "filters": {
          "type": "object",
          "properties": {
            "jurisdictionSlug": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100,
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            },
            "bodySlug": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100,
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            },
            "topicSlug": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100,
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            },
            "recordKind": {
              "type": "string",
              "enum": [
                "agenda",
                "record_stream"
              ]
            },
            "dateFrom": {
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            },
            "dateTo": {
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            },
            "sourceSystem": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
            },
            "sourceRecordId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
            }
          },
          "additionalProperties": false
        },
        "surface": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "rest"
                },
                "route": {
                  "type": "string",
                  "enum": [
                    "/api/v1/agenda/search",
                    "/api/v1/agenda/search-facets",
                    "/api/v1/agenda/items/{itemId}",
                    "/api/v1/data/changes",
                    "/api/v1/data/snapshots",
                    "/api/v1/data/snapshots/{snapshotId}/{resource}",
                    "/api/v1/data/batch",
                    "/api/v1/public/agenda-hits",
                    "/api/v1/public/agenda-hits/{matchId}",
                    "/api/v1/public/upcoming-agenda-hits",
                    "/api/v1/public/coverage",
                    "/api/v1/public/source-status"
                  ]
                }
              },
              "required": [
                "kind",
                "route"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "mcp"
                },
                "tool": {
                  "type": "string",
                  "enum": [
                    "search_agenda",
                    "get_agenda_item",
                    "get_coverage",
                    "get_data_coverage",
                    "get_source_status",
                    "get_upcoming_agenda_hits",
                    "get_agenda_hit",
                    "get_jurisdiction_meeting_cadence"
                  ]
                }
              },
              "required": [
                "kind",
                "tool"
              ],
              "additionalProperties": false
            }
          ]
        }
      },
      "required": [
        "surface"
      ],
      "additionalProperties": false
    },
    "requestId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
    }
  },
  "required": [
    "sourceUrl",
    "expectedRecord"
  ],
  "additionalProperties": false
}