Part 2 of planning #90 — the advisor's surface for cost-per-nutrient. Pairs with ag-bids #5 (the /api/data/nutrient-cost endpoint).
What
New MCP tool nutrient_cost(geo) → agbids__nutrient_cost for the advisor. Wraps ag-monitor's /api/data/nutrient-cost and formats:
the cheapest source of each nutrient (N / P₂O₅ / K₂O), and
a ranked $/lb table (sorted by $/lb N) with grade, $/ton, and $/lb for each nutrient.
Tool docstring steers the model to use this (not input_cost_trend, which is $/ton only) when the grower asks "best buy / best nitrogen value". UAN shown as assumed 32-0-0 with a footnote.
Via the advisor or directly: nutrient_cost("Cornbelt") → anhydrous cheapest N, potash cheapest K₂O.
Part 2 of planning #90 — the advisor's surface for cost-per-nutrient. Pairs with ag-bids #5 (the `/api/data/nutrient-cost` endpoint).
## What
New MCP tool **`nutrient_cost(geo)`** → `agbids__nutrient_cost` for the advisor. Wraps ag-monitor's `/api/data/nutrient-cost` and formats:
- the **cheapest source of each nutrient** (N / P₂O₅ / K₂O), and
- a ranked `$/lb` table (sorted by $/lb N) with grade, $/ton, and $/lb for each nutrient.
Tool docstring steers the model to use this (not `input_cost_trend`, which is $/ton only) when the grower asks "best buy / best nitrogen value". UAN shown as assumed 32-0-0 with a footnote.
`client.nutrient_cost` + `fmt.fmt_nutrient_cost` (+ `_per_lb`). **42 tests pass.**
## Smoke (post-deploy)
Via the advisor or directly: `nutrient_cost("Cornbelt")` → anhydrous cheapest N, potash cheapest K₂O.
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) <[email protected]>
claude
merged commit bb4219da87 into main2026-06-04 15:58:59 -04:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Part 2 of planning #90 — the advisor's surface for cost-per-nutrient. Pairs with ag-bids #5 (the
/api/data/nutrient-costendpoint).What
New MCP tool
nutrient_cost(geo)→agbids__nutrient_costfor the advisor. Wraps ag-monitor's/api/data/nutrient-costand formats:$/lbtable (sorted by $/lb N) with grade, $/ton, and $/lb for each nutrient.Tool docstring steers the model to use this (not
input_cost_trend, which is $/ton only) when the grower asks "best buy / best nitrogen value". UAN shown as assumed 32-0-0 with a footnote.client.nutrient_cost+fmt.fmt_nutrient_cost(+_per_lb). 42 tests pass.Smoke (post-deploy)
Via the advisor or directly:
nutrient_cost("Cornbelt")→ anhydrous cheapest N, potash cheapest K₂O.