{
  "service": "Magpie",
  "version": "1.0",
  "description": "USDA agricultural data API + MCP for AI agents",
  "base_url": "https://ag.morningbrief.link",
  "datasets": [
    {
      "slug": "fertilizer",
      "label": "Fertilizer",
      "type": "d1-backed",
      "row_count": 203,
      "last_updated": "2026-10-15T23:55:51.000Z",
      "last_fetch_status": "ok",
      "fetch_cadence": "1,15",
      "rest": [
        "GET /v1/fertilizer/prices",
        "GET /v1/fertilizer/products",
        "GET /v1/fertilizer/history"
      ],
      "mcp": [
        "get_fertilizer_price",
        "get_fertilizer_history",
        "list_fertilizer_products"
      ]
    },
    {
      "slug": "grain",
      "label": "Grain",
      "type": "d1-backed",
      "row_count": 475,
      "last_updated": "2026-10-19T06:00:23.000Z",
      "last_fetch_status": "ok",
      "fetch_cadence": "daily",
      "rest": [
        "GET /v1/grain/prices",
        "GET /v1/grain/products",
        "GET /v1/grain/history"
      ],
      "mcp": [
        "get_grain_price",
        "get_grain_history",
        "list_grain_products"
      ]
    },
    {
      "slug": "livestock",
      "label": "Livestock",
      "type": "d1-backed",
      "row_count": 295,
      "last_updated": "2026-10-19T06:01:02.000Z",
      "last_fetch_status": "ok",
      "fetch_cadence": "daily",
      "rest": [
        "GET /v1/livestock/prices",
        "GET /v1/livestock/products",
        "GET /v1/livestock/history"
      ],
      "mcp": [
        "get_livestock_price",
        "get_livestock_history",
        "list_livestock_products"
      ]
    },
    {
      "slug": "dairy",
      "label": "Dairy",
      "type": "d1-backed",
      "row_count": 78,
      "last_updated": "2026-10-19T06:01:40.000Z",
      "last_fetch_status": "ok",
      "fetch_cadence": "daily",
      "rest": [
        "GET /v1/dairy/prices",
        "GET /v1/dairy/products"
      ],
      "mcp": [
        "get_dairy_price",
        "list_dairy_products"
      ]
    },
    {
      "slug": "nass",
      "label": "Nass",
      "type": "d1-backed",
      "row_count": 6353,
      "last_updated": "2026-10-18T00:15:08.000Z",
      "last_fetch_status": "ok",
      "fetch_cadence": "monthly",
      "rest": [
        "GET /v1/nass/stats",
        "GET /v1/nass/commodities",
        "GET /v1/nass/condition",
        "GET /v1/nass/progress"
      ],
      "mcp": [
        "get_crop_stats",
        "get_crop_condition",
        "get_crop_progress"
      ]
    },
    {
      "slug": "weather",
      "label": "NOAA Weather (Live Proxy)",
      "type": "live-proxy",
      "description": "No D1 storage — proxies api.weather.gov",
      "rest": [
        "/v1/weather/forecast",
        "/v1/weather/current",
        "/v1/weather/locations"
      ],
      "mcp": [
        "get_weather",
        "get_forecast"
      ]
    },
    {
      "slug": "analytics",
      "label": "Cross-Domain Analytics",
      "type": "computed",
      "description": "Spreads and ratios calculated live from D1",
      "rest": [
        "/v1/analytics/spreads"
      ],
      "mcp": [
        "get_spreads"
      ]
    },
    {
      "slug": "wasde",
      "label": "Wasde",
      "type": "d1-backed",
      "row_count": 0,
      "last_updated": null,
      "last_fetch_status": "ok",
      "fetch_cadence": "daily",
      "rest": [
        "GET /v1/wasde/projections",
        "GET /v1/wasde/commodities",
        "GET /v1/wasde/history"
      ],
      "mcp": [
        "get_wasde_projection",
        "get_wasde_history",
        "list_wasde_commodities"
      ]
    },
    {
      "slug": "esr",
      "label": "Esr",
      "type": "d1-backed",
      "row_count": 0,
      "last_updated": null,
      "last_fetch_status": "ok",
      "fetch_cadence": "daily",
      "rest": [
        "GET /v1/esr/sales",
        "GET /v1/esr/history",
        "GET /v1/esr/commodities"
      ],
      "mcp": [
        "get_export_sales",
        "get_export_sales_history",
        "list_esr_commodities"
      ]
    },
    {
      "slug": "gats",
      "label": "Gats",
      "type": "d1-backed",
      "row_count": 0,
      "last_updated": null,
      "last_fetch_status": "ok",
      "fetch_cadence": "daily",
      "rest": [
        "GET /v1/gats/flows",
        "GET /v1/gats/compare",
        "GET /v1/gats/commodities"
      ],
      "mcp": [
        "get_trade_flows",
        "compare_contracts_vs_shipments",
        "list_gats_commodities"
      ]
    }
  ],
  "total_rest_routes": 28,
  "total_mcp_tools": 26
}