Skip to content
1 minute readAPIAgent-ready

Agents can read and set price guardrails from MCP

Two new MCP tools, get_price_guardrails and set_price_guardrails, let an agent read and replace its workspace's price guardrails. The LangChain, AI SDK and Agents SDK tool packages offer them too.

API reference for the MCP endpoint, naming the two new price guardrails tools and the scopes they need

An agent no longer needs a separate HTTP call to set the limits every price in its workspace keeps. It can do it with the same tools it prices with.

  • get_price_guardrails returns what is saved (saved is false when nothing is) and the defaults a save fills in
  • set_price_guardrails takes band_lower_ratio, band_upper_ratio, max_change_pct, min_margin_pct and never_below_cost, with the same limits as PUT /api/price-guardrails
  • max_change_pct, min_margin_pct and never_below_cost hold every final price. The band is only the range the optimizer and elasticity functions search when a call sends no minimum or maximum
  • A save replaces the whole set, and an omitted rule takes its default, so read first and send every rule you want to keep
  • Both need a Last Price credential: routing read scope to read, routing write scope to save. Without one they refuse before making any call
  • The MCP server is now version 0.2.0