feat: nutrient_cost tool — cheapest fertilizer per lb of N/P/K
CI / test (pull_request) Successful in 18s
CI / build-push (pull_request) Has been skipped

New agbids__nutrient_cost(geo) tool: wraps ag-monitor's /api/data/nutrient-cost
and formats a per-nutrient value comparison for the advisor — cheapest source of
N / P2O5 / K2O + a ranked $/lb table. This is what answers "which fertilizer is
the best nitrogen value per dollar?" (input_cost_trend is $/ton only). UAN grade
shown as assumed 32-0-0.

client.nutrient_cost + fmt.fmt_nutrient_cost (+ _per_lb). 42 tests pass.

For planning #90.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-04 15:52:33 -04:00
parent fb50c103d3
commit 65509a27d6
4 changed files with 123 additions and 0 deletions
+4
View File
@@ -97,6 +97,10 @@ def input_cost_geographies(item: str) -> dict:
return _get("/api/data/input-cost-geographies", item=item)
def nutrient_cost(geo: str | None = None) -> dict:
return _get("/api/data/nutrient-cost", geo=geo)
def futures(commodity: str, delivery: str | None = None) -> dict:
return _get("/api/data/futures", commodity=commodity, delivery=delivery)