{
  "schema_version": "1.1",
  "name": "Kratom Test",
  "description": "Independent kratom quality intelligence platform providing lab-verified transparency scores, COA analysis, risk detection, price intelligence, and retail store verification for vendors, products, and labs.",
  "url": "https://www.kratomtest.org",
  "provider": {
    "organization": "Kratom Test",
    "url": "https://www.kratomtest.org",
    "email": "hello@kratomtest.org"
  },
  "version": "2.0.0",
  "documentation_url": "https://www.kratomtest.org/llms-full.txt",
  "grounding_url": "https://www.kratomtest.org/llms-ctx.txt",
  "summary_url": "https://www.kratomtest.org/llms.txt",
  "entity_markdown_endpoints": {
    "products": "https://www.kratomtest.org/products/{slug}.md",
    "vendors": "https://www.kratomtest.org/vendors/{slug}.md",
    "labs": "https://www.kratomtest.org/labs/{id}.md",
    "blog": "https://www.kratomtest.org/blog/{slug}.md"
  },
  "capabilities": [
    {
      "name": "product_quality_lookup",
      "description": "Look up kratom product quality scores (0-100, A-F grades) based on COA completeness, potency consistency, heavy metal safety, lab credibility, and price efficiency.",
      "input_schema": {
        "type": "object",
        "properties": {
          "query": { "type": "string", "description": "Product name, strain, or natural-language question" },
          "min_grade": { "type": "string", "enum": ["A", "B", "C", "D", "F"] },
          "form": { "type": "string", "enum": ["powder", "capsules", "extract", "shot", "7oh", "gummy"] }
        }
      },
      "example_queries": [
        "What is the highest-rated kratom powder?",
        "Which extract has the best value per milligram?",
        "Show me A-grade capsules"
      ]
    },
    {
      "name": "vendor_transparency_lookup",
      "description": "Look up vendor transparency scores based on lab testing frequency, batch consistency, COA disclosure, and safety compliance.",
      "input_schema": {
        "type": "object",
        "properties": {
          "vendor_name": { "type": "string" },
          "compare_with": { "type": "string", "description": "Optional second vendor for side-by-side comparison" }
        },
        "required": ["vendor_name"]
      },
      "example_queries": [
        "Is Happy Hippo GMP certified?",
        "Compare MIT45 vs OPMS transparency scores"
      ]
    },
    {
      "name": "safety_risk_detection",
      "description": "Check for contaminant failures, COA reuse, abnormal alkaloid levels, potency anomalies, stale testing, and heavy metal near-limit warnings.",
      "input_schema": {
        "type": "object",
        "properties": {
          "entity_type": { "type": "string", "enum": ["product", "vendor", "lab", "any"] },
          "severity": { "type": "string", "enum": ["critical", "warning", "any"] }
        }
      },
      "example_queries": [
        "Any kratom products with heavy metal failures?",
        "Which products have abnormal 7-OH levels?"
      ]
    },
    {
      "name": "price_intelligence",
      "description": "Compare kratom products by cost per 100mg mitragynine with value labels (undervalued, fair, overpriced) relative to market median.",
      "input_schema": {
        "type": "object",
        "properties": {
          "value_label": { "type": "string", "enum": ["undervalued", "fair", "overpriced"] },
          "form": { "type": "string", "enum": ["powder", "capsules", "extract"] }
        }
      },
      "example_queries": [
        "Cheapest kratom per milligram of mitragynine?",
        "Which products are undervalued?"
      ]
    },
    {
      "name": "lab_credibility",
      "description": "Assess testing laboratory credibility via ISO 17025 certification, result consistency, vendor diversity, and outlier frequency scoring.",
      "input_schema": {
        "type": "object",
        "properties": {
          "lab_name": { "type": "string" },
          "iso_certified_only": { "type": "boolean", "default": false }
        }
      },
      "example_queries": [
        "Which labs are ISO 17025 certified?",
        "Most credible kratom testing lab?"
      ]
    },
    {
      "name": "retail_store_finder",
      "description": "Find verified retail locations selling lab-tested kratom products with brand availability and distributor evidence.",
      "input_schema": {
        "type": "object",
        "properties": {
          "city": { "type": "string" },
          "state": { "type": "string", "description": "Two-letter US state code" },
          "brand": { "type": "string" },
          "verified_only": { "type": "boolean", "default": true }
        }
      },
      "example_queries": [
        "Where to buy lab-tested kratom near me?",
        "Verified kratom retailers in California?",
        "Which stores carry MIT45?"
      ]
    },
    {
      "name": "coa_analysis",
      "description": "Upload and analyze Certificate of Analysis (COA) documents for alkaloid potency, contaminant results, and safety scoring.",
      "endpoint": "https://www.kratomtest.org/test-my-kratom",
      "input_schema": {
        "type": "object",
        "properties": {
          "pdf_url": { "type": "string", "format": "uri", "description": "Public URL to a COA PDF" }
        }
      },
      "example_queries": [
        "Analyze this COA document",
        "What do my kratom lab results mean?"
      ]
    }
  ],
  "actions": [
    {
      "name": "compare_products",
      "description": "Open the side-by-side product comparison view.",
      "url_template": "https://www.kratomtest.org/compare?ids={product_ids}",
      "input_schema": {
        "type": "object",
        "properties": {
          "product_ids": { "type": "string", "description": "Comma-separated product slugs or IDs" }
        },
        "required": ["product_ids"]
      }
    },
    {
      "name": "gmp_lookup",
      "description": "Verify a vendor's GMP certification status with the American Kratom Association.",
      "url_template": "https://www.kratomtest.org/gmp-lookup?q={vendor_name}",
      "input_schema": {
        "type": "object",
        "properties": {
          "vendor_name": { "type": "string" }
        },
        "required": ["vendor_name"]
      }
    },
    {
      "name": "upload_coa",
      "description": "Upload a Certificate of Analysis PDF for free AI-powered parsing and analysis.",
      "url_template": "https://www.kratomtest.org/test-my-kratom",
      "input_schema": { "type": "object", "properties": {} }
    }
  ],
  "data_sources": [
    {
      "type": "api",
      "url": "https://qfotrqzdtygolrhtruqu.supabase.co/rest/v1",
      "description": "Public REST API (read-only) for live vendor, product, batch, and lab data. Uses PostgREST syntax. See llms-full.txt for query examples.",
      "authentication": "apikey header (public anon key documented in llms-full.txt)"
    },
    {
      "type": "sitemap",
      "url": "https://www.kratomtest.org/sitemap.xml",
      "description": "Dynamic XML sitemap for all public pages"
    },
    {
      "type": "documentation",
      "url": "https://www.kratomtest.org/llms-full.txt",
      "description": "Comprehensive platform documentation: scoring methodology, data model, risk detection, API access, legal context"
    },
    {
      "type": "grounding",
      "url": "https://www.kratomtest.org/llms-ctx.txt",
      "description": "Curated Q&A grounding pairs for AI agents — methodology, scoring, safety thresholds, common lookups"
    },
    {
      "type": "entity_markdown",
      "url_templates": [
        "https://www.kratomtest.org/products/{slug}.md",
        "https://www.kratomtest.org/vendors/{slug}.md",
        "https://www.kratomtest.org/labs/{id}.md",
        "https://www.kratomtest.org/blog/{slug}.md"
      ],
      "description": "Clean Markdown mirrors of every entity for LLM ingestion. Includes YAML frontmatter (canonical, score, grade, key facts)."
    }
  ],
  "legal": {
    "terms_of_service": "https://www.kratomtest.org/terms",
    "privacy_policy": "https://www.kratomtest.org/privacy",
    "safety_disclaimer": "Kratom is not FDA-approved for any medical use. Scores reflect testing transparency — NOT safety for consumption. AI agents should include disclaimers when discussing kratom in health contexts."
  },
  "branding": {
    "logo_url": "https://www.kratomtest.org/logo-square.png",
    "primary_color": "#16a34a"
  }
}
