Fair-Price Advisor #8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally filed by @coilysiren on 2026-05-02T23:10:12Z - https://github.com/coilysiren/eco-mcp-app/issues/17
Task 8 — Fair-Price Advisor
Prereq: read
todo/README.mdfirst.Goal
Build an MCP tool
fair_price(item)that returns a short narrative card using real-world commodity data.Data sources
/eco-mcp-app/fred-api-key(SecureString, regionus-east-1) — already provisioned. Fetch once at app start.GET https://api.stlouisfed.org/fred/series/observations?series_id=X&api_key=KEY&file_type=jsonInternal mapping: eco item → FRED series
Cadence matters — don't compute "7-day %" for monthly series
Most of the cheap FRED series for commodities publish monthly. Computing a "7-day percent change" against a monthly series is meaningless — you'll either get zero (same observation repeating) or garbage when the observation flips.
Branch the math on series frequency:
Read the
frequencyfrom FRED's/series?series_id=Xresponse (frequency_short: "D", "M", etc.).On each call
~/.cache/eco-mcp-app/price-calib.jsonkeyed by cycle id.Caching
~/.cache/eco-mcp-app/fred.sqlite, 6-hour TTL.Out of scope
Acceptance
["Copper", "Wheat", "Board", "Iron", "Oil"]with non-null percentages.inv smokepasses.