{
  "$schema": "https://thepocketprotector.com/.well-known/agent-schema.json",
  "name": "The Pocket Protector",
  "description": "Medicare plan comparison API. AI agents welcome. Compare MA, MAPD, PDP, Medigap, and ACA plans across 50 states using real CMS data, carrier FHIR directories, and an AI recommendation engine.",
  "url": "https://thepocketprotector.com",
  "version": "1.0.0",
  "provider": {
    "organization": "The Pocket Protector, LLC",
    "url": "https://thepocketprotector.com"
  },
  "capabilities": [
    {
      "name": "compare_medicare_plans",
      "description": "Compare Medicare Advantage, MAPD, PDP, Medigap, and ACA plans by ZIP code, age, medications, providers, and budget preferences.",
      "input_schema": {
        "type": "object",
        "required": ["zip", "age"],
        "properties": {
          "zip": { "type": "string", "pattern": "^\\d{5}$", "description": "5-digit US ZIP code" },
          "age": { "type": "integer", "minimum": 0, "maximum": 120 },
          "plan_type": { "type": "string", "enum": ["MA", "MAPD", "PDP", "MEDIGAP", "ACA"] },
          "drugs": { "type": "array", "items": { "type": "string" }, "description": "Medication names" },
          "providers": { "type": "array", "items": { "type": "string" }, "description": "Doctor names or NPI numbers" },
          "max_premium": { "type": "number", "description": "Maximum monthly premium budget" }
        }
      }
    },
    {
      "name": "lookup_drug_coverage",
      "description": "Check whether a specific drug is covered by a specific Medicare plan, including tier, copay, prior authorization, and quantity limits.",
      "input_schema": {
        "type": "object",
        "required": ["drug_name"],
        "properties": {
          "drug_name": { "type": "string" },
          "plan_id": { "type": "string" },
          "zip": { "type": "string" }
        }
      }
    },
    {
      "name": "search_providers",
      "description": "Search for doctors, hospitals, and nursing homes. Check network status against specific Medicare plans.",
      "input_schema": {
        "type": "object",
        "properties": {
          "name": { "type": "string" },
          "npi": { "type": "string" },
          "specialty": { "type": "string" },
          "zip": { "type": "string" },
          "radius_miles": { "type": "integer", "default": 25 },
          "plan_id": { "type": "string" }
        }
      }
    },
    {
      "name": "get_plan_recommendation",
      "description": "Get AI-powered PlanMatch recommendation for the best Medicare plans based on a beneficiary's complete profile.",
      "input_schema": {
        "type": "object",
        "required": ["zip", "age"],
        "properties": {
          "zip": { "type": "string" },
          "age": { "type": "integer" },
          "drugs": { "type": "array", "items": { "type": "string" } },
          "providers": { "type": "array", "items": { "type": "string" } },
          "priorities": {
            "type": "array",
            "items": { "type": "string", "enum": ["low_premium", "low_copay", "broad_network", "drug_coverage", "dental_vision", "fitness_benefits"] }
          }
        }
      }
    },
    {
      "name": "request_enrollment_assistance",
      "description": "Route a beneficiary to a licensed insurance agent for enrollment. Requires explicit TCPA consent from the beneficiary. Not available for CA, NY, MA, OR, or PR residents.",
      "input_schema": {
        "type": "object",
        "required": ["zip", "age", "contact", "tcpa_consent"],
        "properties": {
          "zip": { "type": "string" },
          "age": { "type": "integer" },
          "plan_id": { "type": "string" },
          "contact": {
            "type": "object",
            "required": ["name", "phone"],
            "properties": {
              "name": { "type": "string" },
              "phone": { "type": "string" },
              "email": { "type": "string" }
            }
          },
          "tcpa_consent": { "type": "boolean", "const": true, "description": "Must be true. Beneficiary must have explicitly consented to receive calls/texts." }
        }
      }
    }
  ],
  "authentication": {
    "schemes": [
      {
        "type": "none",
        "description": "No authentication required for beneficiary-serving queries (1,000 req/hr)"
      },
      {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Optional API key for partnerships or higher limits (1,000 req/hr). Request one at partnerships@thepocketprotector.com"
      }
    ]
  },
  "policies": {
    "terms": "https://thepocketprotector.com/terms",
    "privacy": "https://thepocketprotector.com/privacy",
    "ai_agent_policy": "OPEN — AI agents serving individual beneficiaries are explicitly welcome without commercial agreement",
    "geographic_restrictions": ["CA", "NY", "MA", "OR", "PR"],
    "scraping_prohibited": true,
    "data_training_requires_authorization": true
  }
}
