Skip to main content
Glama

Activate Price Book

activate_price_book
DestructiveIdempotent

Publish a DRAFT price book so it can price quotes and runs. Validates first and REFUSES with the reasons if the book could not price correctly — an empty grid, breaks missing a cost-driver attribute (which could never resolve), duplicate or blank attribute keys, a numeric-band attribute with no bands, or an unconfirmed canonical field/option mapping. For a book that prices by item, it instead refuses while too few of the supplier's SKUs matched an item, and asks you to confirm before publishing with any that are left over. Rehashes the whole grid against the schema being activated, so a book whose attributes moved during the draft is left consistent. Blockers come back as data (activated=false) on any call; evaluate_price_book shows the same review in full. Two-step: preview=true shows what will be published and returns a single-use previewReceipt; repeat the identical call with that receipt and a fresh idempotencyKey to activate. Already-active books return unchanged. Requires an operator (unpinned) credential.

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>"
    },
    "name": "activate_price_book"
  }
}

Input Schema

NameRequiredDescriptionDefault
bookIdYesThe DRAFT price book id (GUID).
previewNoStep 1 of the required two-step write: set true to see what will be published and receive a single-use previewReceipt. Nothing is changed until the commit call.
idempotencyKeyNoCaller-generated idempotency key; required with previewReceipt to commit.
previewReceiptNoStep 2: the receipt returned by the preview call. Supply together with a fresh idempotencyKey to activate.
skipUnmatchedRowsNoItem-priced books only. Set true to confirm that rows which never matched an item should be published as skipped: they are switched off and price nothing, and can be resolved later. Does NOT waive the minimum match rate — a book where too few rows matched is refused whatever this says.

Output Schema

NameRequiredDescriptionDefault
okNo
bookIdNo
statusNo
appliedNo
previewNo
blockersNo
activatedNo
expiresAtNo
actionItemIdNo
confirmationNo
correlationIdNo
approvalResultNo
idempotencyKeyNo
previewReceiptNo
idempotentReplayNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true and openWorldHint=false, but the description adds material context beyond them: it enumerates the exact validation refusals (empty grid, unresolved cost-driver attribute, duplicate/blank keys, bandless numeric attribute, unconfirmed mapping), states that blockers return as data with activated=false rather than as errors, discloses that the whole grid is rehashed against the target schema, and names the credential requirement (operator, unpinned). The gap is only that it says little about downstream effects on quotes/runs already referencing the book.

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?

The purpose and two-step requirement are front-loaded, and the long middle sentence listing refusal reasons earns its length because those are the conditions an agent must anticipate. There is minor redundancy between the refusal list and the later 'Blockers come back as data (activated=false) on any call' sentence, but each still carries distinct information.

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

Completeness4/5

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

For a destructive, credential-gated, two-step mutation this covers preconditions, failure modes, the preview/commit handshake, the idempotency contract and the already-active no-op. An output schema exists so return values need not be explained. The remaining minor gap is what happens to dependent quotes that were already priced by the book.

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 description coverage is 100%, so the structured fields already carry most parameter meaning and the baseline is 3. The description adds a little beyond the schema: it stresses the receipt is single-use, that the commit call must be identical with a fresh idempotencyKey, and that skipping unmatched rows does not waive the minimum match rate. The extra meaning is real but partly restates what the parameter descriptions already say.

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 and resource with a state constraint: 'Publish a DRAFT price book so it can price quotes and runs.' It also distinguishes itself from the read-only sibling by noting 'evaluate_price_book shows the same review in full', so an agent can separate previewing from actually activating.

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?

It gives an explicit required flow ('Two-step: preview=true ... repeat the identical call with that receipt'), names the alternative for review-only work (evaluate_price_book), and states a no-op case ('Already-active books return unchanged'). It also flags the item-priced edge case where a confirmation flag('skipUnmatchedRows') is needed rather than an outright refusal. Little about when to reach for it is left to inference.

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