{
  "openapi": "3.1.0",
  "info": {
    "title": "Rotaract South Asia Analytics API",
    "version": "1.1.0",
    "description": "Public, high-performance REST API and Model Context Protocol (MCP) server providing open analytics data for Rotaract and Rotary across South Asia (Zones 4, 5, 6, and 7; Rotary districts; active Rotaract clubs). All endpoints are open, unauthenticated, and CORS-enabled.",
    "contact": {
      "name": "Rotaract South Asia Analytics Team",
      "url": "https://insights.rsamdio.org/contact",
      "email": "info@rsamdio.org"
    },
    "license": {
      "name": "ODbL-1.0",
      "identifier": "ODbL-1.0"
    },
    "termsOfService": "https://insights.rsamdio.org/terms"
  },
  "servers": [
    {
      "url": "https://insights.rsamdio.org",
      "description": "Production server (Primary - TLS enforced)"
    }
  ],
  "tags": [
    {
      "name": "Overview",
      "description": "High-level aggregate metrics and executive summaries"
    },
    {
      "name": "Leaderboards",
      "description": "Rankings for largest clubs, top TRF donors, highest arrears, and district standings"
    },
    {
      "name": "Zones",
      "description": "Zone-level summaries and district breakdowns"
    },
    {
      "name": "Districts",
      "description": "District performance indicators and leadership rosters"
    },
    {
      "name": "Clubs",
      "description": "Master club roster search, filtering, and universal club dossiers"
    },
    {
      "name": "Compliance",
      "description": "Financial arrears and missing officer compliance tracking"
    },
    {
      "name": "Opportunities",
      "description": "Rotary club sponsorship opportunities (Rotaract and Interact)"
    },
    {
      "name": "Foundation",
      "description": "The Rotary Foundation (TRF) contributions and giving statistics"
    },
    {
      "name": "Worldwide",
      "description": "Global Rotaract and Interact leaderboards and growth metrics"
    },
    {
      "name": "Tables",
      "description": "On-demand lightweight table datasets for client drilldowns"
    },
    {
      "name": "Model Context Protocol (MCP)",
      "description": "AI agent tools discovery and JSON-RPC 2.0 execution endpoint"
    }
  ],
  "paths": {
    "/api/v1/summary": {
      "get": {
        "tags": [
          "Overview"
        ],
        "summary": "Executive Summary Metrics",
        "description": "Returns high-level aggregate KPI metrics for South Asia or scoped to a specific zone.",
        "operationId": "getSummary",
        "parameters": [
          {
            "name": "zone",
            "in": "query",
            "required": false,
            "description": "Optional zone filter (e.g. 'Zone 5' or '5')",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Executive summary data successfully retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SummaryResponse"
                },
                "example": {
                  "dataAsOf": "30 Sep 2026",
                  "overall": {
                    "outstanding": 10768977,
                    "arrearsClubs": 1021,
                    "atRisk": 499,
                    "noOfficers": 1070,
                    "totalClubs": 2877,
                    "totalMembers": 61277,
                    "totalRotary": 5065,
                    "rotaryWithSponsor": 1636,
                    "rotaryWithoutSponsor": 3429,
                    "arrUniv": 637,
                    "arrComm": 384,
                    "noOffUniv": 676,
                    "noOffComm": 394,
                    "trfClubs": 38,
                    "trfContributionsUSD": 5211.12,
                    "trfAnnualUSD": 2458.56,
                    "trfPolioUSD": 564.3399999999999,
                    "trfOtherUSD": 2188.2200000000003,
                    "trfEndowmentUSD": 0,
                    "newTotalClubs": 126,
                    "newCommunityClubs": 71,
                    "newUniversityClubs": 55,
                    "totalUniv": 1533,
                    "totalComm": 1343,
                    "membersUniv": 37803,
                    "membersComm": 23458,
                    "totalInteractClubs": 8921,
                    "suspendedInteractClubs": 735,
                    "rotaractWithInteract": 137,
                    "rotaryWithInteract": 2101,
                    "rotaryWithoutInteract": 2964,
                    "rotaryWithSuspendedInteract": 375,
                    "prevInteractClubs": 8524,
                    "avgMembersPerClub": 21.3
                  },
                  "previousOverall": {
                    "outstanding": 13074953,
                    "arrearsClubs": 1188,
                    "atRisk": 634,
                    "noOfficers": 1241,
                    "totalClubs": 2755,
                    "totalMembers": 57972,
                    "totalRotary": 4968,
                    "rotaryWithSponsor": 0,
                    "rotaryWithoutSponsor": 0,
                    "arrUniv": 731,
                    "arrComm": 457,
                    "noOffUniv": 747,
                    "noOffComm": 494,
                    "trfClubs": 0,
                    "trfContributionsUSD": 0,
                    "trfAnnualUSD": 0,
                    "trfPolioUSD": 0,
                    "trfOtherUSD": 0,
                    "trfEndowmentUSD": 0,
                    "newTotalClubs": 0,
                    "newCommunityClubs": 0,
                    "newUniversityClubs": 0,
                    "totalUniv": 0,
                    "totalComm": 0,
                    "membersUniv": 0,
                    "membersComm": 0,
                    "totalInteractClubs": 8524,
                    "suspendedInteractClubs": 0,
                    "rotaractWithInteract": 0,
                    "rotaryWithInteract": 0,
                    "rotaryWithoutInteract": 0,
                    "rotaryWithSuspendedInteract": 0,
                    "prevInteractClubs": 0
                  },
                  "averages": {
                    "avgMembersPerClub": 21.3
                  },
                  "zonesSummary": [
                    {
                      "zone": "Zone 4",
                      "stats": {
                        "outstanding": 2330218,
                        "arrearsClubs": 242,
                        "atRisk": 123,
                        "noOfficers": 242,
                        "totalClubs": 664,
                        "totalMembers": 12168,
                        "totalRotary": 1430,
                        "rotaryWithSponsor": 402,
                        "rotaryWithoutSponsor": 1028,
                        "arrUniv": 113,
                        "arrComm": 129,
                        "noOffUniv": 121,
                        "noOffComm": 121,
                        "trfClubs": 8,
                        "trfContributionsUSD": 344.81999999999994,
                        "trfAnnualUSD": 334.82,
                        "trfPolioUSD": 10,
                        "trfOtherUSD": 0,
                        "trfEndowmentUSD": 0,
                        "newTotalClubs": 23,
                        "newCommunityClubs": 17,
                        "newUniversityClubs": 6,
                        "totalUniv": 279,
                        "totalComm": 385,
                        "membersUniv": 5765,
                        "membersComm": 6403,
                        "totalInteractClubs": 2125,
                        "suspendedInteractClubs": 252,
                        "rotaractWithInteract": 51,
                        "rotaryWithInteract": 563,
                        "rotaryWithoutInteract": 867,
                        "rotaryWithSuspendedInteract": 113,
                        "prevInteractClubs": 2060,
                        "avgMembersPerClub": 18.3
                      },
                      "districtCount": 12
                    },
                    {
                      "zone": "Zone 5",
                      "stats": {
                        "outstanding": 4592543,
                        "arrearsClubs": 346,
                        "atRisk": 158,
                        "noOfficers": 364,
                        "totalClubs": 918,
                        "totalMembers": 26629,
                        "totalRotary": 1517,
                        "rotaryWithSponsor": 488,
                        "rotaryWithoutSponsor": 1029,
                        "arrUniv": 280,
                        "arrComm": 66,
                        "noOffUniv": 296,
                        "noOffComm": 68,
                        "trfClubs": 8,
                        "trfContributionsUSD": 2142.2400000000002,
                        "trfAnnualUSD": 67.52,
                        "trfPolioUSD": 20.83,
                        "trfOtherUSD": 2053.8900000000003,
                        "trfEndowmentUSD": 0,
                        "newTotalClubs": 20,
                        "newCommunityClubs": 7,
                        "newUniversityClubs": 13,
                        "totalUniv": 660,
                        "totalComm": 258,
                        "membersUniv": 21540,
                        "membersComm": 5089,
                        "totalInteractClubs": 2159,
                        "suspendedInteractClubs": 149,
                        "rotaractWithInteract": 16,
                        "rotaryWithInteract": 572,
                        "rotaryWithoutInteract": 945,
                        "rotaryWithSuspendedInteract": 77,
                        "prevInteractClubs": 1995,
                        "avgMembersPerClub": 29
                      },
                      "districtCount": 13
                    },
                    {
                      "zone": "Zone 6",
                      "stats": {
                        "outstanding": 1808923,
                        "arrearsClubs": 181,
                        "atRisk": 98,
                        "noOfficers": 201,
                        "totalClubs": 596,
                        "totalMembers": 9846,
                        "totalRotary": 1095,
                        "rotaryWithSponsor": 357,
                        "rotaryWithoutSponsor": 738,
                        "arrUniv": 75,
                        "arrComm": 106,
                        "noOffUniv": 79,
                        "noOffComm": 122,
                        "trfClubs": 6,
                        "trfContributionsUSD": 1349.3,
                        "trfAnnualUSD": 1026.74,
                        "trfPolioUSD": 312.56,
                        "trfOtherUSD": 10,
                        "trfEndowmentUSD": 0,
                        "newTotalClubs": 39,
                        "newCommunityClubs": 30,
                        "newUniversityClubs": 9,
                        "totalUniv": 180,
                        "totalComm": 415,
                        "membersUniv": 2955,
                        "membersComm": 6875,
                        "totalInteractClubs": 2253,
                        "suspendedInteractClubs": 119,
                        "rotaractWithInteract": 41,
                        "rotaryWithInteract": 415,
                        "rotaryWithoutInteract": 680,
                        "rotaryWithSuspendedInteract": 74,
                        "prevInteractClubs": 2169,
                        "avgMembersPerClub": 16.5
                      },
                      "districtCount": 9
                    },
                    {
                      "zone": "Zone 7",
                      "stats": {
                        "outstanding": 2037293,
                        "arrearsClubs": 252,
                        "atRisk": 120,
                        "noOfficers": 263,
                        "totalClubs": 699,
                        "totalMembers": 12634,
                        "totalRotary": 1023,
                        "rotaryWithSponsor": 389,
                        "rotaryWithoutSponsor": 634,
                        "arrUniv": 169,
                        "arrComm": 83,
                        "noOffUniv": 180,
                        "noOffComm": 83,
                        "trfClubs": 16,
                        "trfContributionsUSD": 1374.76,
                        "trfAnnualUSD": 1029.48,
                        "trfPolioUSD": 220.95,
                        "trfOtherUSD": 124.33,
                        "trfEndowmentUSD": 0,
                        "newTotalClubs": 44,
                        "newCommunityClubs": 17,
                        "newUniversityClubs": 27,
                        "totalUniv": 414,
                        "totalComm": 285,
                        "membersUniv": 7543,
                        "membersComm": 5091,
                        "totalInteractClubs": 2384,
                        "suspendedInteractClubs": 215,
                        "rotaractWithInteract": 29,
                        "rotaryWithInteract": 551,
                        "rotaryWithoutInteract": 472,
                        "rotaryWithSuspendedInteract": 111,
                        "prevInteractClubs": 2300,
                        "avgMembersPerClub": 18.1
                      },
                      "districtCount": 10
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Zone not found"
          }
        },
        "x-openai-isConsequential": false,
        "x-ms-require-user-confirmation": false
      }
    },
    "/api/v1/leaderboards": {
      "get": {
        "tags": [
          "Leaderboards"
        ],
        "summary": "Ranked Leaderboards & Top Charts",
        "description": "Returns top rankings across South Asia for largest clubs (by membership), top TRF donors, highest arrears dues, and top districts. Supports optional filtering by district, zone, base, and category.",
        "operationId": "getLeaderboards",
        "parameters": [
          {
            "name": "category",
            "in": "query",
            "required": false,
            "description": "Leaderboard category ('all', 'largest_clubs', 'community_clubs', 'university_clubs', 'trf_giving', 'highest_arrears', 'districts_by_clubs', 'districts_by_members', 'districts_by_trf', 'districts_by_arrears', 'districts_by_no_officers', 'new_clubs')",
            "schema": {
              "type": "string",
              "default": "all"
            }
          },
          {
            "name": "district",
            "in": "query",
            "required": false,
            "description": "Scope rankings to a specific 4-digit district (e.g. '3000')",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "zone",
            "in": "query",
            "required": false,
            "description": "Scope rankings to a specific zone (e.g. 'Zone 5' or '5')",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "scope",
            "in": "query",
            "required": false,
            "description": "Geographic scope: 'south_asia' (default, Zones 4, 5, 6, 7) or 'worldwide' (for global rankings)",
            "schema": {
              "type": "string",
              "enum": [
                "south_asia",
                "worldwide"
              ],
              "default": "south_asia"
            }
          },
          {
            "name": "base",
            "in": "query",
            "required": false,
            "description": "Filter by base ('Community' or 'University')",
            "schema": {
              "type": "string",
              "enum": [
                "Community",
                "University"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Number of top records to return (1-100, default 10)",
            "schema": {
              "type": "integer",
              "default": 10
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Number of records to skip for pagination",
            "schema": {
              "type": "integer",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ranked leaderboards data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeaderboardsResponse"
                },
                "example": {
                  "category": "largest_clubs",
                  "count": 3,
                  "offset": 0,
                  "limit": 3,
                  "data": [
                    {
                      "rank": 1,
                      "id": "8825786",
                      "name": "MGR University",
                      "district": "3233",
                      "zone": "Zone 5",
                      "country": "India",
                      "base": "University",
                      "members": 2988,
                      "sponsorClubs": "Chennai Metropolis (Rotary)"
                    },
                    {
                      "rank": 2,
                      "id": "8828540",
                      "name": "Jayaraj Annapackiam College for Women (Autonomous)",
                      "district": "3000",
                      "zone": "Zone 5",
                      "country": "India",
                      "base": "University",
                      "members": 2119,
                      "sponsorClubs": "Theni United Inspirers (Rotary)"
                    },
                    {
                      "rank": 3,
                      "id": "8828452",
                      "name": "Trichy SRM Medical College Hospital and Research Centre",
                      "district": "3000",
                      "zone": "Zone 5",
                      "country": "India",
                      "base": "University",
                      "members": 1854,
                      "sponsorClubs": "Trichy One Health (Rotary)"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-openai-isConsequential": false,
        "x-ms-require-user-confirmation": false
      }
    },
    "/api/v1/zones": {
      "get": {
        "tags": [
          "Zones"
        ],
        "summary": "List All Zones",
        "description": "Returns all 4 South Asia zones with high-level statistics and district lists.",
        "operationId": "getZones",
        "responses": {
          "200": {
            "description": "List of zones",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer"
                    },
                    "zones": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ZoneOverview"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-openai-isConsequential": false,
        "x-ms-require-user-confirmation": false
      }
    },
    "/api/v1/zones/{zoneId}": {
      "get": {
        "tags": [
          "Zones"
        ],
        "summary": "Zone Deep Dive",
        "description": "Returns detailed metrics, district breakdowns, and district leadership for a specific zone.",
        "operationId": "getZoneDetails",
        "parameters": [
          {
            "name": "zoneId",
            "in": "path",
            "required": true,
            "description": "Zone identifier (e.g. '4', '5', '6', '7', or 'Zone 5')",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Zone detail payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ZoneDetail"
                }
              }
            }
          },
          "404": {
            "description": "Zone not found"
          }
        },
        "x-openai-isConsequential": false,
        "x-ms-require-user-confirmation": false
      }
    },
    "/api/v1/districts": {
      "get": {
        "tags": [
          "Districts"
        ],
        "summary": "List All Districts",
        "description": "Returns Rotary districts with key metrics and leadership contacts.",
        "operationId": "getDistricts",
        "parameters": [
          {
            "name": "zone",
            "in": "query",
            "required": false,
            "description": "Optional zone filter (e.g. 'Zone 4' or '4')",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "required": false,
            "description": "Sort field (totalClubs, members, arrearsClubs, outstanding, trf, newClubs, interactGrowth, district)",
            "schema": {
              "type": "string",
              "default": "district"
            }
          },
          {
            "name": "sortOrder",
            "in": "query",
            "required": false,
            "description": "Sort order (asc, desc)",
            "schema": {
              "type": "string",
              "default": "asc"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Optional country filter (e.g. \"India\", \"Nepal\", \"Sri Lanka\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of districts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer"
                    },
                    "total": {
                      "type": "integer"
                    },
                    "districts": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DistrictSummary"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-openai-isConsequential": false,
        "x-ms-require-user-confirmation": false
      }
    },
    "/api/v1/districts/{districtId}": {
      "get": {
        "tags": [
          "Districts"
        ],
        "summary": "District Deep Dive",
        "description": "Returns full performance profile, leadership, and issue counts for a specific district.",
        "operationId": "getDistrictDetails",
        "parameters": [
          {
            "name": "districtId",
            "in": "path",
            "required": true,
            "description": "Rotary district number (e.g. '3000', '3141')",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "District detail payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DistrictDetail"
                },
                "example": {
                  "district": "3141",
                  "zone": "Zone 4",
                  "stats": {
                    "outstanding": 436358,
                    "arrearsClubs": 36,
                    "atRisk": 17,
                    "noOfficers": 41,
                    "totalClubs": 128,
                    "totalMembers": 3153,
                    "totalRotary": 123,
                    "rotaryWithSponsor": 72,
                    "rotaryWithoutSponsor": 51,
                    "arrUniv": 30,
                    "arrComm": 6,
                    "noOffUniv": 31,
                    "noOffComm": 10,
                    "trfClubs": 0,
                    "trfContributionsUSD": 0,
                    "trfAnnualUSD": 0,
                    "trfPolioUSD": 0,
                    "trfOtherUSD": 0,
                    "trfEndowmentUSD": 0,
                    "newTotalClubs": 5,
                    "newCommunityClubs": 5,
                    "newUniversityClubs": 0,
                    "totalUniv": 70,
                    "totalComm": 58,
                    "membersUniv": 1871,
                    "membersComm": 1282,
                    "totalInteractClubs": 269,
                    "suspendedInteractClubs": 23,
                    "rotaractWithInteract": 12,
                    "rotaryWithInteract": 71,
                    "rotaryWithoutInteract": 52,
                    "rotaryWithSuspendedInteract": 14,
                    "prevInteractClubs": 246,
                    "membersGrowthAbs": 1277,
                    "membersGrowthPct": 68.07036247334754,
                    "clubsGrowthAbs": 4,
                    "clubsGrowthPct": 3.225806451612903,
                    "interactGrowthAbs": 23,
                    "interactGrowthPct": 9.34959349593496,
                    "avgMembersPerClub": 24.6
                  },
                  "averages": {
                    "avgMembersPerClub": 24.6,
                    "avgArrearsPerArrearsClub": 12121
                  },
                  "leadership": {
                    "dg": "Rajan Dua",
                    "drr": "Shreehari Rameshan Nair",
                    "drc": "Om Chawla"
                  },
                  "counts": {
                    "totalClubs": 128,
                    "arrearsClubs": 36,
                    "noOfficersClubs": 41,
                    "trfContributingClubs": 0,
                    "newClubs": 5
                  },
                  "topClubs": {
                    "largestClubs": [
                      {
                        "rank": 1,
                        "id": "7435",
                        "name": "Hassaram Rijhumal College of Commerce And Economic",
                        "base": "University",
                        "members": 208,
                        "sponsorClubs": "Bombay (Rotary)"
                      },
                      {
                        "rank": 2,
                        "id": "7373",
                        "name": "K.C. College",
                        "base": "University",
                        "members": 189,
                        "sponsorClubs": "Bombay Queen City (Rotary)"
                      },
                      {
                        "rank": 3,
                        "id": "214435",
                        "name": "Sophia College for Women",
                        "base": "University",
                        "members": 105,
                        "sponsorClubs": "Bombay Central (Rotary)"
                      },
                      {
                        "rank": 4,
                        "id": "218330",
                        "name": "Medicrew",
                        "base": "Community",
                        "members": 86,
                        "sponsorClubs": "Bombay Pier (Rotary)"
                      },
                      {
                        "rank": 5,
                        "id": "42889",
                        "name": "R.J. College",
                        "base": "University",
                        "members": 77,
                        "sponsorClubs": "Mumbai Ghatkopar (Rotary)"
                      }
                    ],
                    "topTRFClubs": [],
                    "highestArrearsClubs": [
                      {
                        "rank": 1,
                        "id": "7435",
                        "name": "Hassaram Rijhumal College of Commerce And Economic",
                        "base": "University",
                        "outstandingINR": 135334,
                        "outstandingUSD": 1409.73,
                        "isAtRisk": true
                      },
                      {
                        "rank": 2,
                        "id": "90444",
                        "name": "Maniben Nanavati Women's College",
                        "base": "University",
                        "outstandingINR": 44570,
                        "outstandingUSD": 464.27,
                        "isAtRisk": true
                      },
                      {
                        "rank": 3,
                        "id": "217638",
                        "name": "Universal College of Engineering, Vasai",
                        "base": "University",
                        "outstandingINR": 27315,
                        "outstandingUSD": 284.53,
                        "isAtRisk": true
                      },
                      {
                        "rank": 4,
                        "id": "8823586",
                        "name": "ISME",
                        "base": "University",
                        "outstandingINR": 18054,
                        "outstandingUSD": 188.06,
                        "isAtRisk": true
                      },
                      {
                        "rank": 5,
                        "id": "8827159",
                        "name": "Mumbai JVPD",
                        "base": "Community",
                        "outstandingINR": 16992,
                        "outstandingUSD": 177,
                        "isAtRisk": true
                      }
                    ],
                    "newClubs": [
                      {
                        "rank": 1,
                        "id": "8828554",
                        "name": "Mumbai Malabar Hill Coast",
                        "base": "Community",
                        "charterDate": "20-Jul-2026",
                        "members": 19,
                        "sponsorClubs": "Mumbai Malabar Hill (Rotary)"
                      },
                      {
                        "rank": 2,
                        "id": "8828562",
                        "name": "Mumbai Bhandup",
                        "base": "Community",
                        "charterDate": "20-Jul-2026",
                        "members": 22,
                        "sponsorClubs": "Mumbai-Bhandup (Rotary)"
                      },
                      {
                        "rank": 3,
                        "id": "8828586",
                        "name": "Mumbai Spark",
                        "base": "Community",
                        "charterDate": "27-Jul-2026",
                        "members": 13,
                        "sponsorClubs": "Addiction Prevention 3141 (Rotary); Mumbai Mulund East (Rotary)"
                      },
                      {
                        "rank": 4,
                        "id": "8828592",
                        "name": "Mumbai JVLR Connect",
                        "base": "Community",
                        "charterDate": "23-Jul-2026",
                        "members": 16,
                        "sponsorClubs": "Mumbai Sher-E-Punjab (Rotary)"
                      },
                      {
                        "rank": 5,
                        "id": "8828708",
                        "name": "Bombay Peninsula Shalini",
                        "base": "Community",
                        "charterDate": "26-Aug-2026",
                        "members": 17,
                        "sponsorClubs": "Bombay Peninsula (Rotary)"
                      }
                    ]
                  }
                }
              }
            }
          },
          "404": {
            "description": "District not found"
          }
        },
        "x-openai-isConsequential": false,
        "x-ms-require-user-confirmation": false
      }
    },
    "/api/v1/clubs": {
      "get": {
        "tags": [
          "Clubs"
        ],
        "summary": "Search & Filter Clubs",
        "description": "Full-text search and multi-facet filtering across all Rotaract clubs in South Asia.",
        "operationId": "searchClubs",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Search keyword matching club name, club ID, sponsor club, or country",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "district",
            "in": "query",
            "required": false,
            "description": "Filter by district number (e.g. '3000')",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "zone",
            "in": "query",
            "required": false,
            "description": "Filter by RI zone (e.g. 'Zone 5')",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "base",
            "in": "query",
            "required": false,
            "description": "Filter by base type ('Community' or 'University')",
            "schema": {
              "type": "string",
              "enum": [
                "Community",
                "University"
              ]
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by club status ('Active' or 'Terminated')",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "isArrears",
            "in": "query",
            "required": false,
            "description": "Filter by financial arrears status",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "isAtRisk",
            "in": "query",
            "required": false,
            "description": "Filter by high termination risk status (>= $75 USD outstanding)",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "isNoOfficers",
            "in": "query",
            "required": false,
            "description": "Filter by missing reported club officers status",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "isNewClub",
            "in": "query",
            "required": false,
            "description": "Filter newly chartered clubs",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "required": false,
            "description": "Sort field ('members', 'outstanding', 'name', 'id', 'charterDate', 'district')",
            "schema": {
              "type": "string",
              "enum": [
                "members",
                "outstanding",
                "name",
                "id",
                "charterDate",
                "district"
              ]
            }
          },
          {
            "name": "sortOrder",
            "in": "query",
            "required": false,
            "description": "Sort order ('desc' for largest/highest first, 'asc' for lowest/alphabetical)",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          },
          {
            "name": "minMembers",
            "in": "query",
            "required": false,
            "description": "Filter clubs with at least this many members",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "maxMembers",
            "in": "query",
            "required": false,
            "description": "Filter clubs with at most this many members",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "minOutstanding",
            "in": "query",
            "required": false,
            "description": "Filter clubs with outstanding dues in INR at least this amount",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Number of records to return (1-100, default 25)",
            "schema": {
              "type": "integer",
              "default": 25
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Record offset for pagination (default 0)",
            "schema": {
              "type": "integer",
              "default": 0
            }
          },
          {
            "name": "maxOutstanding",
            "in": "query",
            "required": false,
            "description": "Maximum outstanding dues in INR",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of clubs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClubListResponse"
                }
              }
            }
          }
        },
        "x-openai-isConsequential": false,
        "x-ms-require-user-confirmation": false
      }
    },
    "/api/v1/clubs/new": {
      "get": {
        "tags": [
          "Clubs"
        ],
        "summary": "Newly Chartered Clubs",
        "description": "Returns newly chartered Rotaract clubs in South Asia (126 clubs chartered in the current 2026 period) with charter dates, initial members, and sponsor Rotary clubs.",
        "operationId": "getNewClubs",
        "parameters": [
          {
            "name": "district",
            "in": "query",
            "required": false,
            "description": "Filter by district number (e.g. '3000')",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "zone",
            "in": "query",
            "required": false,
            "description": "Filter by RI zone (e.g. 'Zone 5')",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "base",
            "in": "query",
            "required": false,
            "description": "Filter by base type ('Community' or 'University')",
            "schema": {
              "type": "string",
              "enum": [
                "Community",
                "University"
              ]
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "required": false,
            "description": "Sort field ('charterDate', 'members', 'name')",
            "schema": {
              "type": "string",
              "default": "charterDate"
            }
          },
          {
            "name": "sortOrder",
            "in": "query",
            "required": false,
            "description": "Sort direction ('desc' or 'asc')",
            "schema": {
              "type": "string",
              "default": "desc"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Number of records to return (1-100, default 25)",
            "schema": {
              "type": "integer",
              "default": 25
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Record offset for pagination (default 0)",
            "schema": {
              "type": "integer",
              "default": 0
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Optional country filter (e.g. \"India\", \"Nepal\", \"Sri Lanka\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of newly chartered clubs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NewClubsResponse"
                }
              }
            }
          }
        },
        "x-openai-isConsequential": false,
        "x-ms-require-user-confirmation": false
      }
    },
    "/api/v1/clubs/{clubId}": {
      "get": {
        "tags": [
          "Clubs"
        ],
        "summary": "Universal Club Dossier",
        "description": "Retrieves the complete profile, compliance standing, TRF contributions, and sponsored Interact clubs for a single Rotaract club.",
        "operationId": "getClubProfile",
        "parameters": [
          {
            "name": "clubId",
            "in": "path",
            "required": true,
            "description": "Unique Rotary Club ID (e.g. '8824847')",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Universal club dossier",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClubProfile"
                },
                "example": {
                  "id": "8824847",
                  "name": "Aarupadai Veedu Medical College & Hospital",
                  "district": "2981",
                  "zone": "Zone 5",
                  "base": "University",
                  "status": "Active",
                  "country": "India",
                  "sponsorClubs": "Pondicherry Beach Town (Rotary)",
                  "termReported": "2022 - 2023",
                  "members": 1,
                  "isArrears": true,
                  "outstanding": 2018,
                  "isAtRisk": false,
                  "isNoOfficers": true,
                  "officerRole": "Rotaract President",
                  "officerLastReported": "2022 - 2023",
                  "myRotaryAccount": "N",
                  "trfTotal": 0,
                  "trfAnnual": 0,
                  "trfPolio": 0,
                  "trfOther": 0,
                  "trfEndowment": 0,
                  "afPerCapita": 0,
                  "isNewClub": false,
                  "charterDate": null,
                  "charterMembers": 0,
                  "sponsoredInteractClubs": [],
                  "sponsoredInteractCount": 0
                }
              }
            }
          },
          "404": {
            "description": "Club not found"
          }
        },
        "x-openai-isConsequential": false,
        "x-ms-require-user-confirmation": false
      }
    },
    "/api/v1/compliance/arrears": {
      "get": {
        "tags": [
          "Compliance"
        ],
        "summary": "Clubs in Arrears",
        "description": "Retrieves Rotaract clubs with outstanding Rotary International dues and termination risk assessments.",
        "operationId": "getArrearsList",
        "parameters": [
          {
            "name": "district",
            "in": "query",
            "required": false,
            "description": "Filter by district number",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "zone",
            "in": "query",
            "required": false,
            "description": "Filter by zone",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "atRiskOnly",
            "in": "query",
            "required": false,
            "description": "Filter only clubs at immediate risk of termination (>= $75 USD)",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "base",
            "in": "query",
            "required": false,
            "description": "Filter by base ('Community' or 'University')",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 25
            },
            "description": "Maximum number of records to return (1-100, default 25)"
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0
            },
            "description": "Number of records to skip for pagination (default 0)"
          },
          {
            "name": "maxOutstanding",
            "in": "query",
            "required": false,
            "description": "Maximum outstanding dues in INR",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of clubs in arrears",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArrearsListResponse"
                }
              }
            }
          }
        },
        "x-openai-isConsequential": false,
        "x-ms-require-user-confirmation": false
      }
    },
    "/api/v1/compliance/officers": {
      "get": {
        "tags": [
          "Compliance"
        ],
        "summary": "Clubs Missing Officers",
        "description": "Retrieves Rotaract clubs that have not reported active club officers on MyRotary.",
        "operationId": "getMissingOfficersList",
        "parameters": [
          {
            "name": "district",
            "in": "query",
            "required": false,
            "description": "Filter by district number",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "zone",
            "in": "query",
            "required": false,
            "description": "Filter by zone",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "base",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter by club institution base ('Community' or 'University')"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 25
            },
            "description": "Maximum number of records to return (1-100, default 25)"
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0
            },
            "description": "Number of records to skip for pagination (default 0)"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of clubs missing reported officers",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MissingOfficersListResponse"
                }
              }
            }
          }
        },
        "x-openai-isConsequential": false,
        "x-ms-require-user-confirmation": false
      }
    },
    "/api/v1/opportunities/rotary": {
      "get": {
        "tags": [
          "Opportunities"
        ],
        "summary": "Rotary Sponsorship Opportunities",
        "description": "Identifies Rotary clubs without sponsored Rotaract clubs or without Interact clubs.",
        "operationId": "getRotaryOpportunities",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "Type of opportunity: 'no_rotaract' (default) or 'no_interact'",
            "schema": {
              "type": "string",
              "enum": [
                "no_rotaract",
                "no_interact"
              ],
              "default": "no_rotaract"
            }
          },
          {
            "name": "district",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter opportunities by 4-digit Rotary district number (e.g. '3000')"
          },
          {
            "name": "zone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter opportunities by Rotary zone (e.g. 'Zone 5' or '5')"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 25
            },
            "description": "Maximum number of records to return (1-100, default 25)"
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0
            },
            "description": "Number of records to skip for pagination (default 0)"
          },
          {
            "name": "sortBy",
            "in": "query",
            "required": false,
            "description": "Sort field (\"district\", \"name\", \"zone\", \"members\")",
            "schema": {
              "type": "string",
              "enum": [
                "district",
                "name",
                "zone",
                "members"
              ],
              "default": "district"
            }
          },
          {
            "name": "sortOrder",
            "in": "query",
            "required": false,
            "description": "Sort order (\"asc\" or \"desc\")",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "default": "asc"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of Rotary opportunity clubs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RotaryOpportunityResponse"
                }
              }
            }
          }
        },
        "x-openai-isConsequential": false,
        "x-ms-require-user-confirmation": false
      }
    },
    "/api/v1/trf": {
      "get": {
        "tags": [
          "Foundation"
        ],
        "summary": "The Rotary Foundation (TRF) Contributions",
        "description": "Retrieves giving statistics, Annual Fund contributions, and PolioPlus donations per club.",
        "operationId": "getTRFContributions",
        "parameters": [
          {
            "name": "district",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter TRF giving records by 4-digit district number (e.g. '3000')"
          },
          {
            "name": "zone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter TRF giving records by Rotary zone (e.g. 'Zone 5' or '5')"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 25
            },
            "description": "Maximum records to return (1-100, default 25)"
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0
            },
            "description": "Number of records to skip for pagination (default 0)"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Optional country filter (e.g. \"India\", \"Nepal\", \"Sri Lanka\")",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "base",
            "in": "query",
            "required": false,
            "description": "Optional club base filter (\"Community\" or \"University\")",
            "schema": {
              "type": "string",
              "enum": [
                "Community",
                "University"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of TRF contributions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TRFListResponse"
                }
              }
            }
          }
        },
        "x-openai-isConsequential": false,
        "x-ms-require-user-confirmation": false
      }
    },
    "/api/v1/worldwide": {
      "get": {
        "tags": [
          "Worldwide"
        ],
        "summary": "Worldwide Rotaract & Interact Statistics",
        "description": "Global totals, country growth leaderboards, district rankings, and new club charter statistics. Supports sorting and filtering to find top-performing districts globally.",
        "operationId": "getWorldwideStats",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "Focus dataset: 'clubs', 'summary', 'country', 'district', 'interact', 'new_clubs', or 'all'",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "summary",
                "country",
                "district",
                "interact",
                "new_clubs",
                "clubs"
              ],
              "default": "all"
            }
          },
          {
            "name": "base",
            "in": "query",
            "required": false,
            "description": "Filter worldwide clubs by base: 'all' (default), 'community', or 'university'",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "community",
                "university"
              ],
              "default": "all"
            }
          },
          {
            "name": "district",
            "in": "query",
            "required": false,
            "description": "Filter worldwide clubs or districts by district number",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Filter by country name",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "zone",
            "in": "query",
            "required": false,
            "description": "Filter by Rotary Zone (e.g. '6', 'Zone 6', '4,5,6,7', or 'South Asia')",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "region",
            "in": "query",
            "required": false,
            "description": "Filter by geographic region ('south_asia', 'southeast_asia', 'pacific', 'europe', 'north_america', 'latin_america', or 'worldwide')",
            "schema": {
              "type": "string",
              "enum": [
                "south_asia",
                "southeast_asia",
                "pacific",
                "europe",
                "north_america",
                "latin_america",
                "worldwide"
              ],
              "default": "worldwide"
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "required": false,
            "description": "Sort metric: 'member_growth_pct', 'member_growth_abs', 'members', 'clubs', 'club_growth_pct', or 'district'",
            "schema": {
              "type": "string",
              "enum": [
                "member_growth_pct",
                "member_growth_abs",
                "members",
                "clubs",
                "club_growth_pct",
                "club_growth_abs",
                "district",
                "name"
              ]
            }
          },
          {
            "name": "sortOrder",
            "in": "query",
            "required": false,
            "description": "Sort order: 'desc' or 'asc'",
            "schema": {
              "type": "string",
              "enum": [
                "desc",
                "asc"
              ],
              "default": "desc"
            }
          },
          {
            "name": "minMembers",
            "in": "query",
            "required": false,
            "description": "Minimum reported members filter",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Limit number of records returned",
            "schema": {
              "type": "integer",
              "default": 10
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Number of records to skip for pagination",
            "schema": {
              "type": "integer",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Worldwide statistics payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldwideStats"
                },
                "example": {
                  "total": 599,
                  "returned": 5,
                  "count": 5,
                  "offset": 0,
                  "limit": 5,
                  "scope": {
                    "region": "Worldwide",
                    "country": "All Countries",
                    "zone": "All Zones"
                  },
                  "sortBy": "member_growth_pct",
                  "sortOrder": "desc",
                  "districts": [
                    {
                      "rank": 1,
                      "worldwideRank": 1,
                      "southAsiaRank": 1,
                      "district": "3261",
                      "zone": 6,
                      "region": "South Asia",
                      "isSouthAsia": true,
                      "country": "India",
                      "activeClubs": 24,
                      "suspendedClubs": 0,
                      "totalMembers": 217,
                      "clubsGrowthAbs": 7,
                      "membersGrowthAbs": 119,
                      "clubsGrowthPct": 41.17647058823529,
                      "membersGrowthPct": 121.42857142857142
                    },
                    {
                      "rank": 2,
                      "worldwideRank": 2,
                      "southAsiaRank": null,
                      "district": "1030",
                      "zone": 19,
                      "region": "Europe, Middle East & Africa",
                      "isSouthAsia": false,
                      "activeClubs": 3,
                      "suspendedClubs": 0,
                      "totalMembers": 44,
                      "clubsGrowthAbs": 1,
                      "membersGrowthAbs": 18,
                      "clubsGrowthPct": 50,
                      "membersGrowthPct": 69.23076923076923
                    },
                    {
                      "rank": 3,
                      "worldwideRank": 3,
                      "southAsiaRank": 2,
                      "district": "3141",
                      "zone": 4,
                      "region": "South Asia",
                      "isSouthAsia": true,
                      "country": "India",
                      "activeClubs": 128,
                      "suspendedClubs": 0,
                      "totalMembers": 3153,
                      "clubsGrowthAbs": 4,
                      "membersGrowthAbs": 1277,
                      "clubsGrowthPct": 3.225806451612903,
                      "membersGrowthPct": 68.07036247334754
                    },
                    {
                      "rank": 4,
                      "worldwideRank": 4,
                      "southAsiaRank": null,
                      "district": "1320",
                      "zone": 19,
                      "region": "Europe, Middle East & Africa",
                      "isSouthAsia": false,
                      "activeClubs": 1,
                      "suspendedClubs": 0,
                      "totalMembers": 21,
                      "clubsGrowthAbs": 0,
                      "membersGrowthAbs": 8,
                      "clubsGrowthPct": 0,
                      "membersGrowthPct": 61.53846153846154
                    },
                    {
                      "rank": 5,
                      "worldwideRank": 5,
                      "southAsiaRank": null,
                      "district": "9705",
                      "zone": 8,
                      "region": "Australia / New Zealand / Pacific",
                      "isSouthAsia": false,
                      "activeClubs": 2,
                      "suspendedClubs": 0,
                      "totalMembers": 34,
                      "clubsGrowthAbs": 0,
                      "membersGrowthAbs": 12,
                      "clubsGrowthPct": 0,
                      "membersGrowthPct": 54.54545454545454
                    }
                  ]
                }
              }
            }
          }
        },
        "x-openai-isConsequential": false,
        "x-ms-require-user-confirmation": false
      }
    },
    "/api/mcp": {
      "get": {
        "tags": [
          "Model Context Protocol (MCP)"
        ],
        "summary": "MCP Server Manifest & Tools Discovery",
        "description": "Returns the Model Context Protocol (MCP) server metadata, protocol version, capabilities, and the full schema definitions for all 14 available AI tools.",
        "operationId": "getMcpManifest",
        "responses": {
          "200": {
            "description": "MCP server manifest and tool definitions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "server": {
                      "type": "string",
                      "example": "rotaract-south-asia-analytics"
                    },
                    "version": {
                      "type": "string",
                      "example": "1.0.0"
                    },
                    "protocolVersion": {
                      "type": "string",
                      "example": "2024-11-05"
                    },
                    "capabilities": {
                      "type": "object"
                    },
                    "tools": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-openai-isConsequential": false,
        "x-ms-require-user-confirmation": false
      },
      "post": {
        "tags": [
          "Model Context Protocol (MCP)"
        ],
        "summary": "Execute MCP Tool via JSON-RPC 2.0",
        "description": "Executes an AI tool via Model Context Protocol JSON-RPC 2.0 protocol (or lightweight payload: {\"tool\": \"search_clubs\", \"args\": {...}}). Supported methods: initialize, tools/list, and tools/call.",
        "operationId": "executeMcpTool",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "jsonrpc": {
                    "type": "string",
                    "example": "2.0"
                  },
                  "id": {
                    "type": "integer",
                    "example": 1
                  },
                  "method": {
                    "type": "string",
                    "example": "tools/call"
                  },
                  "params": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "example": "search_clubs"
                      },
                      "arguments": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tool execution result wrapped in JSON-RPC 2.0",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "jsonrpc": {
                      "type": "string",
                      "example": "2.0"
                    },
                    "id": {
                      "type": "integer",
                      "example": 1
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/compliance/dual-risk": {
      "get": {
        "tags": [
          "Compliance"
        ],
        "summary": "Dual Risk Clubs (Arrears + Missing Officers)",
        "description": "Returns clubs that simultaneously have both outstanding financial arrears AND missing officer reports (highest aggregate compliance risk, 761 clubs).",
        "operationId": "getDualRiskList",
        "parameters": [
          {
            "name": "district",
            "in": "query",
            "required": false,
            "description": "Optional district number filter (e.g. 3000)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "zone",
            "in": "query",
            "required": false,
            "description": "Optional zone filter (e.g. Zone 5)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Filter by country",
            "schema": {
              "type": "string",
              "enum": [
                "India",
                "Nepal",
                "Sri Lanka"
              ]
            }
          },
          {
            "name": "base",
            "in": "query",
            "required": false,
            "description": "Club base filter",
            "schema": {
              "type": "string",
              "enum": [
                "Community",
                "University"
              ]
            }
          },
          {
            "name": "minOutstanding",
            "in": "query",
            "required": false,
            "description": "Minimum outstanding balance in INR",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "required": false,
            "description": "Sort field",
            "schema": {
              "type": "string",
              "enum": [
                "outstanding",
                "name",
                "district"
              ],
              "default": "outstanding"
            }
          },
          {
            "name": "sortOrder",
            "in": "query",
            "required": false,
            "description": "Sort direction",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "default": "desc"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size limit",
            "schema": {
              "type": "integer",
              "default": 25
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Page offset",
            "schema": {
              "type": "integer",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Dual risk compliance list retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DualRiskResponse"
                },
                "example": {
                  "data": [
                    {
                      "id": "8825990",
                      "name": "Gorakhpur Galaxy",
                      "district": "3120",
                      "zone": "Zone 6",
                      "base": "Community",
                      "sponsorClubs": "",
                      "outstandingINR": 88569,
                      "outstandingUSD": 922.59,
                      "isAtRisk": true,
                      "isArrears": true,
                      "isNoOfficers": true
                    },
                    {
                      "id": "8827508",
                      "name": "Lucknow Phoenix",
                      "district": "3120",
                      "zone": "Zone 6",
                      "base": "Community",
                      "sponsorClubs": "Lucknow Trans Gomti (Rotary)",
                      "outstandingINR": 84166,
                      "outstandingUSD": 876.73,
                      "isAtRisk": true,
                      "isArrears": true,
                      "isNoOfficers": true
                    },
                    {
                      "id": "8826367",
                      "name": "Datta Meghe Medical College, Nagpur",
                      "district": "3030",
                      "zone": "Zone 6",
                      "base": "University",
                      "sponsorClubs": "Nagpur Down Town (Rotary)",
                      "outstandingINR": 64636,
                      "outstandingUSD": 673.29,
                      "isAtRisk": true,
                      "isArrears": true,
                      "isNoOfficers": true
                    }
                  ],
                  "clubs": [
                    {
                      "id": "8825990",
                      "name": "Gorakhpur Galaxy",
                      "district": "3120",
                      "zone": "Zone 6",
                      "base": "Community",
                      "sponsorClubs": "",
                      "outstandingINR": 88569,
                      "outstandingUSD": 922.59,
                      "isAtRisk": true,
                      "isArrears": true,
                      "isNoOfficers": true
                    },
                    {
                      "id": "8827508",
                      "name": "Lucknow Phoenix",
                      "district": "3120",
                      "zone": "Zone 6",
                      "base": "Community",
                      "sponsorClubs": "Lucknow Trans Gomti (Rotary)",
                      "outstandingINR": 84166,
                      "outstandingUSD": 876.73,
                      "isAtRisk": true,
                      "isArrears": true,
                      "isNoOfficers": true
                    },
                    {
                      "id": "8826367",
                      "name": "Datta Meghe Medical College, Nagpur",
                      "district": "3030",
                      "zone": "Zone 6",
                      "base": "University",
                      "sponsorClubs": "Nagpur Down Town (Rotary)",
                      "outstandingINR": 64636,
                      "outstandingUSD": 673.29,
                      "isAtRisk": true,
                      "isArrears": true,
                      "isNoOfficers": true
                    }
                  ],
                  "riskType": "dual_risk",
                  "description": "Clubs with both outstanding financial arrears AND missing officer reports",
                  "pagination": {
                    "total": 761,
                    "limit": 3,
                    "offset": 0,
                    "hasMore": true
                  },
                  "total": 761,
                  "limit": 3,
                  "offset": 0
                }
              }
            }
          }
        },
        "x-openai-isConsequential": false,
        "x-ms-require-user-confirmation": false
      }
    },
    "/api/v1/interact": {
      "get": {
        "tags": [
          "Overview"
        ],
        "summary": "Interact Analytics & Rotaract Sponsorships",
        "description": "Returns comprehensive Interact club analytics across South Asia: 8,921 total clubs, 735 suspended, 137 clubs sponsored by 65 Rotaract clubs, plus district/zone growth trends.",
        "operationId": "getInteractAnalytics",
        "parameters": [
          {
            "name": "district",
            "in": "query",
            "required": false,
            "description": "Optional district filter (e.g. 3000)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "zone",
            "in": "query",
            "required": false,
            "description": "Optional zone filter (e.g. Zone 5)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Optional country filter (e.g. \"India\", \"Nepal\", \"Sri Lanka\")",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "base",
            "in": "query",
            "required": false,
            "description": "Optional sponsoring Rotaract club base filter (\"Community\" or \"University\")",
            "schema": {
              "type": "string",
              "enum": [
                "Community",
                "University"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Interact analytics successfully retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InteractAnalyticsResponse"
                }
              }
            }
          }
        },
        "x-openai-isConsequential": false,
        "x-ms-require-user-confirmation": false
      }
    },
    "/api/v1/districts/{districtId}/clubs": {
      "get": {
        "tags": [
          "Districts"
        ],
        "summary": "District Clubs Roster",
        "description": "Lists all Rotaract clubs belonging to a specific district with filtering, sorting, and pagination.",
        "operationId": "getDistrictClubs",
        "parameters": [
          {
            "name": "districtId",
            "in": "path",
            "required": true,
            "description": "4-digit Rotary district number (e.g. 3000)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Search term",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "base",
            "in": "query",
            "required": false,
            "description": "Club base",
            "schema": {
              "type": "string",
              "enum": [
                "Community",
                "University"
              ]
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Club status",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Country filter",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "required": false,
            "description": "Sort field",
            "schema": {
              "type": "string",
              "enum": [
                "members",
                "outstanding",
                "name",
                "charterDate"
              ]
            }
          },
          {
            "name": "sortOrder",
            "in": "query",
            "required": false,
            "description": "Sort direction",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size",
            "schema": {
              "type": "integer",
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Page offset",
            "schema": {
              "type": "integer",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "District clubs retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClubListResponse"
                }
              }
            }
          }
        },
        "x-openai-isConsequential": false,
        "x-ms-require-user-confirmation": false
      }
    },
    "/api/v1/clubs/{clubId}/interact": {
      "get": {
        "tags": [
          "Clubs"
        ],
        "summary": "Club Sponsored Interact Clubs",
        "description": "Returns the list of Interact clubs directly sponsored by this Rotaract club.",
        "operationId": "getClubInteractSponsorships",
        "parameters": [
          {
            "name": "clubId",
            "in": "path",
            "required": true,
            "description": "Rotary Club ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sponsored Interact clubs retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClubInteractResponse"
                }
              }
            }
          }
        },
        "x-openai-isConsequential": false,
        "x-ms-require-user-confirmation": false
      }
    },
    "/api/v1/compliance/unified": {
      "get": {
        "tags": [
          "Compliance"
        ],
        "summary": "Unified Compliance Issues Roster",
        "description": "Unified compliance endpoint querying clubs across all issue categories: financial arrears, missing officer reports, at-risk termination status, and dual-risk non-compliance.",
        "operationId": "getUnifiedComplianceIssues",
        "x-openai-isConsequential": false,
        "x-ms-require-user-confirmation": false,
        "parameters": [
          {
            "name": "issueType",
            "in": "query",
            "required": false,
            "description": "Filter by issue category: \"all\" (default), \"arrears\", \"missing_officers\", \"at_risk\", or \"dual_risk\"",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "arrears",
                "missing_officers",
                "at_risk",
                "dual_risk"
              ],
              "default": "all"
            }
          },
          {
            "name": "district",
            "in": "query",
            "required": false,
            "description": "Optional district number filter (e.g. \"3000\")",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "zone",
            "in": "query",
            "required": false,
            "description": "Optional zone filter (e.g. \"5\" or \"Zone 5\")",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Optional country filter (e.g. \"India\", \"Nepal\", \"Sri Lanka\")",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "base",
            "in": "query",
            "required": false,
            "description": "Optional club base filter (\"Community\" or \"University\")",
            "schema": {
              "type": "string",
              "enum": [
                "Community",
                "University"
              ]
            }
          },
          {
            "name": "minOutstanding",
            "in": "query",
            "required": false,
            "description": "Minimum outstanding dues in INR",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "maxOutstanding",
            "in": "query",
            "required": false,
            "description": "Maximum outstanding dues in INR",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "required": false,
            "description": "Sort field (\"outstanding\", \"name\", \"district\")",
            "schema": {
              "type": "string",
              "enum": [
                "outstanding",
                "name",
                "district"
              ],
              "default": "outstanding"
            }
          },
          {
            "name": "sortOrder",
            "in": "query",
            "required": false,
            "description": "Sort order (\"asc\" or \"desc\")",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "default": "desc"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Number of results to return (1-100, default 25)",
            "schema": {
              "type": "integer",
              "default": 25
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Number of results to skip (default 0)",
            "schema": {
              "type": "integer",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Unified compliance issues retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnifiedComplianceResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/table-data/{tab}": {
      "get": {
        "tags": [
          "Tables"
        ],
        "summary": "On-demand Table Data",
        "description": "Returns lightweight, trimmed table records for on-demand lazy loading in dashboard data tables.",
        "operationId": "getTableData",
        "parameters": [
          {
            "name": "tab",
            "in": "path",
            "required": true,
            "description": "Identifier of the table dataset to retrieve",
            "schema": {
              "type": "string",
              "enum": [
                "arrears",
                "officers",
                "rotary",
                "rotary_no_interact",
                "new_clubs",
                "trf",
                "all_clubs"
              ]
            }
          },
          {
            "name": "zone",
            "in": "query",
            "required": false,
            "description": "Optional Rotary zone filter (e.g. 'Zone 5' or '5')",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "district",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated Rotary district filter (e.g. '3000' or '3000,3011')",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Table records retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unknown table tab"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "PaginationMeta": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "description": "Total matching records"
          },
          "limit": {
            "type": "integer",
            "description": "Records per page limit"
          },
          "offset": {
            "type": "integer",
            "description": "Record offset index"
          },
          "hasMore": {
            "type": "boolean",
            "description": "True if more records exist"
          }
        },
        "required": [
          "total",
          "limit",
          "offset",
          "hasMore"
        ]
      },
      "SummaryResponse": {
        "type": "object",
        "properties": {
          "dataAsOf": {
            "type": "string"
          },
          "overall": {
            "type": "object"
          },
          "previousOverall": {
            "type": "object",
            "nullable": true
          },
          "zonesSummary": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "ZoneOverview": {
        "type": "object",
        "properties": {
          "zone": {
            "type": "string",
            "example": "Zone 5"
          },
          "zoneNumber": {
            "type": "integer",
            "example": 5
          },
          "stats": {
            "type": "object"
          },
          "districts": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ZoneDetail": {
        "type": "object",
        "properties": {
          "zone": {
            "type": "string"
          },
          "zoneNumber": {
            "type": "integer"
          },
          "stats": {
            "type": "object"
          },
          "districts": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "DistrictSummary": {
        "type": "object",
        "properties": {
          "district": {
            "type": "string",
            "example": "3000"
          },
          "zone": {
            "type": "string",
            "example": "Zone 5"
          },
          "stats": {
            "type": "object"
          },
          "leadership": {
            "type": "object",
            "nullable": true,
            "properties": {
              "dg": {
                "type": "string"
              },
              "drr": {
                "type": "string"
              },
              "drc": {
                "type": "string"
              }
            }
          }
        }
      },
      "DistrictDetail": {
        "type": "object",
        "properties": {
          "district": {
            "type": "string"
          },
          "zone": {
            "type": "string"
          },
          "stats": {
            "type": "object"
          },
          "leadership": {
            "type": "object",
            "nullable": true
          },
          "counts": {
            "type": "object",
            "properties": {
              "totalClubs": {
                "type": "integer"
              },
              "arrearsClubs": {
                "type": "integer"
              },
              "noOfficersClubs": {
                "type": "integer"
              },
              "trfContributingClubs": {
                "type": "integer"
              }
            }
          }
        }
      },
      "ClubSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "8824847"
          },
          "name": {
            "type": "string",
            "example": "Aarupadai Veedu Medical College & Hospital"
          },
          "district": {
            "type": "string",
            "example": "2981"
          },
          "zone": {
            "type": "string",
            "example": "Zone 5"
          },
          "base": {
            "type": "string",
            "example": "University"
          },
          "status": {
            "type": "string",
            "example": "Active"
          },
          "country": {
            "type": "string",
            "example": "India"
          },
          "sponsorClubs": {
            "type": "string",
            "example": "Pondicherry Beach Town (Rotary)"
          },
          "members": {
            "type": "integer",
            "example": 1
          },
          "isArrears": {
            "type": "boolean",
            "example": true
          },
          "outstandingINR": {
            "type": "number",
            "example": 2018
          },
          "outstandingUSD": {
            "type": "number",
            "example": 21.02
          },
          "isAtRisk": {
            "type": "boolean",
            "example": false
          },
          "isNoOfficers": {
            "type": "boolean",
            "example": true
          }
        }
      },
      "ClubListResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClubSummary"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          },
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "offset": {
            "type": "integer"
          }
        }
      },
      "ClubProfile": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "district": {
            "type": "string"
          },
          "zone": {
            "type": "string"
          },
          "base": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "sponsorClubs": {
            "type": "string"
          },
          "termReported": {
            "type": "string"
          },
          "members": {
            "type": "integer"
          },
          "isArrears": {
            "type": "boolean"
          },
          "outstanding": {
            "type": "number"
          },
          "isAtRisk": {
            "type": "boolean"
          },
          "isNoOfficers": {
            "type": "boolean"
          },
          "officerRole": {
            "type": "string"
          },
          "officerLastReported": {
            "type": "string"
          },
          "myRotaryAccount": {
            "type": "string"
          },
          "trfTotal": {
            "type": "number"
          },
          "trfAnnual": {
            "type": "number"
          },
          "trfPolio": {
            "type": "number"
          },
          "isNewClub": {
            "type": "boolean"
          },
          "sponsoredInteractClubs": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "ArrearsClubItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "8824847"
          },
          "name": {
            "type": "string",
            "example": "Aarupadai Veedu Medical College & Hospital"
          },
          "district": {
            "type": "string",
            "example": "2981"
          },
          "zone": {
            "type": "string",
            "example": "Zone 5"
          },
          "base": {
            "type": "string",
            "example": "University"
          },
          "sponsorClubs": {
            "type": "string",
            "example": "Pondicherry Beach Town (Rotary)"
          },
          "billableMembers": {
            "type": "integer",
            "example": 1
          },
          "outstandingINR": {
            "type": "number",
            "example": 2018
          },
          "outstandingUSD": {
            "type": "number",
            "example": 21.02
          },
          "isAtRisk": {
            "type": "boolean",
            "example": false
          }
        }
      },
      "ArrearsListResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ArrearsClubItem"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          },
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "offset": {
            "type": "integer"
          }
        }
      },
      "MissingOfficerClubItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "8824847"
          },
          "name": {
            "type": "string",
            "example": "Aarupadai Veedu Medical College & Hospital"
          },
          "district": {
            "type": "string",
            "example": "2981"
          },
          "zone": {
            "type": "string",
            "example": "Zone 5"
          },
          "base": {
            "type": "string",
            "example": "University"
          },
          "sponsorClubs": {
            "type": "string",
            "example": "Pondicherry Beach Town (Rotary)"
          },
          "status": {
            "type": "string",
            "example": "Active"
          }
        }
      },
      "MissingOfficersListResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingOfficerClubItem"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          },
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "offset": {
            "type": "integer"
          }
        }
      },
      "RotaryOpportunityClubItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "22000"
          },
          "name": {
            "type": "string",
            "example": "Rotary Club of Madurai West"
          },
          "district": {
            "type": "string",
            "example": "3000"
          },
          "zone": {
            "type": "string",
            "example": "Zone 5"
          },
          "members": {
            "type": "integer",
            "example": 45
          },
          "status": {
            "type": "string",
            "example": "Active"
          },
          "totalRotaractSponsored": {
            "type": "integer",
            "example": 0
          },
          "totalInteractSponsored": {
            "type": "integer",
            "example": 1
          }
        }
      },
      "RotaryOpportunityResponse": {
        "type": "object",
        "properties": {
          "opportunityType": {
            "type": "string",
            "example": "no_rotaract"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RotaryOpportunityClubItem"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          },
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "offset": {
            "type": "integer"
          }
        }
      },
      "TRFContributionItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "91234"
          },
          "name": {
            "type": "string",
            "example": "Rotaract Club of Coimbatore Central"
          },
          "district": {
            "type": "string",
            "example": "3201"
          },
          "zone": {
            "type": "string",
            "example": "Zone 5"
          },
          "sponsorClubs": {
            "type": "string",
            "example": "Rotary Club of Coimbatore"
          },
          "annualFundUSD": {
            "type": "number",
            "example": 100
          },
          "polioPlusUSD": {
            "type": "number",
            "example": 50
          },
          "otherFundsUSD": {
            "type": "number",
            "example": 0
          },
          "totalContributionsUSD": {
            "type": "number",
            "example": 150
          }
        }
      },
      "TRFListResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TRFContributionItem"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          },
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "offset": {
            "type": "integer"
          }
        }
      },
      "WorldwideStats": {
        "type": "object",
        "properties": {
          "totalClubs": {
            "type": "integer",
            "example": 11453
          },
          "totalMembers": {
            "type": "integer",
            "example": 165430
          },
          "totalInteractClubs": {
            "type": "integer",
            "example": 14920
          },
          "countryData": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "districtData": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "zoneData": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "clubs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "rank": { "type": "integer" },
                "worldwideRank": { "type": "integer" },
                "baseRank": { "type": "integer" },
                "clubId": { "type": "string" },
                "clubName": { "type": "string" },
                "district": { "type": "string" },
                "country": { "type": "string" },
                "base": { "type": "string" },
                "status": { "type": "string" },
                "members": { "type": "integer" },
                "reportedTerm": { "type": "string" },
                "sponsorClubs": { "type": "string" }
              }
            }
          },
          "topClubsWorldwide": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "topCommunityClubsWorldwide": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "topUniversityClubsWorldwide": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "LeaderboardsResponse": {
        "type": "object",
        "properties": {
          "category": {
            "type": "string",
            "example": "largest_clubs"
          },
          "count": {
            "type": "integer",
            "example": 10
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "largestClubs": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "topTRFClubs": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "highestArrearsClubs": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "topDistrictsByClubs": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "topDistrictsByMembers": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "newClubs": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "NewClubItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "8828727"
          },
          "name": {
            "type": "string",
            "example": "Chinnamanur Kurinji Stars"
          },
          "district": {
            "type": "string",
            "example": "3000"
          },
          "zone": {
            "type": "string",
            "example": "Zone 5"
          },
          "base": {
            "type": "string",
            "example": "Community"
          },
          "charterDate": {
            "type": "string",
            "example": "07-Sep-2026"
          },
          "members": {
            "type": "integer",
            "example": 18
          },
          "sponsorClubs": {
            "type": "string",
            "example": "Chinnamanur (Rotary)"
          }
        }
      },
      "NewClubsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NewClubItem"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          },
          "total": {
            "type": "integer",
            "example": 126
          },
          "limit": {
            "type": "integer",
            "example": 25
          },
          "offset": {
            "type": "integer",
            "example": 0
          }
        }
      },
      "MCPManifest": {
        "type": "object",
        "properties": {
          "server": {
            "type": "string",
            "example": "rotaract-south-asia-analytics"
          },
          "version": {
            "type": "string",
            "example": "1.0.0"
          },
          "protocolVersion": {
            "type": "string",
            "example": "2024-11-05"
          },
          "capabilities": {
            "type": "object",
            "properties": {
              "tools": {
                "type": "object"
              },
              "resources": {
                "type": "object"
              },
              "prompts": {
                "type": "object"
              }
            }
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "resources": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "prompts": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "DualRiskResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClubSummary"
            }
          },
          "riskType": {
            "type": "string",
            "example": "dual_risk"
          },
          "description": {
            "type": "string"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        }
      },
      "InteractAnalyticsResponse": {
        "type": "object",
        "properties": {
          "scope": {
            "type": "object"
          },
          "overview": {
            "type": "object",
            "properties": {
              "totalInteractClubs": {
                "type": "integer",
                "example": 8921
              },
              "suspendedInteractClubs": {
                "type": "integer",
                "example": 735
              },
              "activeInteractClubs": {
                "type": "integer",
                "example": 8186
              },
              "rotaractClubsSponsoringInteractCount": {
                "type": "integer",
                "example": 65
              },
              "totalInteractClubsSponsoredByRotaract": {
                "type": "integer",
                "example": 137
              }
            }
          },
          "rotaractSponsors": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "districts": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "ClubInteractResponse": {
        "type": "object",
        "properties": {
          "clubId": {
            "type": "string",
            "example": "8824847"
          },
          "clubName": {
            "type": "string"
          },
          "district": {
            "type": "string",
            "example": "3000"
          },
          "zone": {
            "type": "string",
            "example": "Zone 5"
          },
          "sponsoredInteractCount": {
            "type": "integer",
            "example": 2
          },
          "sponsoredInteractClubs": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "UnifiedComplianceResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Optional API Key for elevated rate limits. All standard endpoints are public and accessible without authentication."
      }
    }
  },
  "security": [
    {},
    {
      "ApiKeyAuth": []
    }
  ]
}
