Skip to main content
Glama

Replace Price Book Breaks

replace_price_book_breaks
Destructive

REPLACE a price book's entire quantity-break grid (full-replace semantics: the supplied list becomes the whole grid; prior breaks are removed). Price changes automatically flag affected live quotes Stale and alert the operator. Empty lists are refused — clearing a grid is an operator action. A client-pinned token can only modify its own client's books, never the shared house books. Max 500 breaks per call. Set dryRun=true to VALIDATE the new grid and preview the diff (wouldRemove = current breaks, wouldAdd = new breaks) without removing, inserting, or flagging any quote Stale — the book is left unchanged. Alternatively set preview=true for the governed two-step protocol (a validated diff plus a single-use previewReceipt); repeat with that receipt and a fresh idempotencyKey to commit.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "bookId": "<bookId>",
      "breaks": "<breaks>"
    },
    "name": "replace_price_book_breaks"
  }
}

Input Schema

NameRequiredDescriptionDefault
bookIdYesThe price book id (GUID).
breaksYesThe complete new grid: specKey (cost-driver attribute values, e.g. {"trim": "6x9"}), minimumQuantity, unitCost, setupCost, isActive.
dryRunNoPreview only (legacy dry-run): validate the new grid and report the diff (wouldRemove/wouldAdd) without changing the book. The response has DryRun=true and ReplacedCount=0. Short-circuits the governed protocol below.
previewNoStep 1 of the required two-step write: set true to validate and receive a structured old→new grid diff plus a single-use previewReceipt. Nothing is changed until the commit call.
idempotencyKeyNoCaller-generated idempotency key; required with previewReceipt to commit.
previewReceiptNoStep 2 of the required two-step write: the receipt returned by the preview call. Supply together with a fresh idempotencyKey to commit; calls without it are refused.

Output Schema

NameRequiredDescriptionDefault
okNo
breaksNo
dryRunNo
previewNo
wouldAddNo
expiresAtNo
wouldRemoveNo
actionItemIdNo
confirmationNo
correlationIdNo
replacedCountNo
approvalResultNo
idempotencyKeyNo
previewReceiptNo
idempotentReplayNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare destructiveHint=true and readOnlyHint=false, and the description goes well beyond them: prior breaks are destroyed, affected live quotes are flagged Stale with operator alerts, dryRun leaves the book unchanged and flags nothing, there is a 500-break cap, and token scoping limits writes to the caller's own client.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the verb and full-replace consequence, then prerequisites, then the two preview modes. It is slightly repetitive where dryRun/preview behavior appears both in the prose and again in the schema descriptions, but no sentence is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive, multi-mode write tool with six parameters, the description covers destruction scope, validation modes, required commit inputs, quota limits, and auth scoping. An output schema exists, so return values need not be explained, and nothing an agent needs to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description earns above that by clarifying that the receipt is single-use, that commit requires both previewReceipt and a fresh idempotencyKey, and that preview short-circuits the governed protocol. It largely restates the dryRun/preview distinctions already present in the schema descriptions, so it is not a full 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (REPLACE) and resource (a price book's entire quantity-break grid), and immediately disambiguates the semantics: 'the supplied list becomes the whole grid; prior breaks are removed.' That phrasing cleanly separates it from an append-style sibling without the agent needing to open either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit when/when-not guidance: use dryRun to validate-and-preview, use preview for the governed two-step commit, empty lists are refused because clearing is an operator action, and a client-pinned token cannot touch shared house books. It also supplies the alternative path (dryRun vs preview) and the follow-up condition (repeat with receipt plus a fresh idempotencyKey).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources