Skip to main content
Glama

Append Rate Components

append_rate_components
DestructiveIdempotent

Add or upsert rate components on a DRAFT ComponentPriced price book. Components are keyed by their string key: a component whose key already exists is overwritten, so re-sending after an interruption is safe. Use this to load the parametric cost model (text printing, cover paper, binding, etc.) that a ComponentPriced book resolves — it replaces the grid that a SpecPriced book would use. After loading all components, call evaluate_price_book then activate_price_book.

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

Input Schema

NameRequiredDescriptionDefault
bookIdYesThe DRAFT ComponentPriced price book id (GUID).
componentsYesRate components to add/upsert. Each needs: key (unique machine key), label, basis (PerCopy | PerUnitPerCopy | FlatPerOrder), rates (list of {specKey, minimumQuantity, rate}). Optional: basisAttributeKey (required for PerUnitPerCopy), rateKeyAttributes, appliesWhen (condition tree), excludeFromMarkup, clamp ({minPerOrder, maxPerOrder}).

Output Schema

NameRequiredDescriptionDefault
okNo
addedNo
bookIdNo
updatedNo
nextActionNo
componentKeysNo
totalComponentsNo
recommendedNextToolNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Goes beyond the annotations by disclosing the upsert-by-key overwrite semantics and that re-sending after an interruption is safe (corroborating idempotentHint=true), plus the DRAFT-only precondition. With destructiveHint=true, it does not state what happens to pre-existing components whose keys are absent from the payload, which is the main residual risk an agent would want disclosed.

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

Conciseness5/5

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

Four sentences, front-loaded with the operation and target book state, then the key semantics, then the business rationale, then the next-step calls. Every sentence carries information the agent needs; nothing is padding.

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?

An output schema exists, so return values need no explanation, and the description covers preconditions, idempotency, and the downstream workflow. It leaves open two things an agent might need for a destructive bulk upsert: behavior toward components omitted from the payload and any batch-size or validation-failure guidance.

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 baseline is 3, and the description earns an extra point by adding key-uniqueness meaning, the PerUnitPerCopy→basisAttributeKey dependency, and the rates shape ({specKey, minimumQuantity, rate}) which the schema does not tie together narratively. It largely restates the schema's field list rather than adding further semantics for appliesWhen, clamp, or excludeFromMarkup.

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 pair (add/upsert), the exact resource (rate components), and the constraint that the target must be a DRAFT ComponentPriced price book. This distinguishes it from siblings such as append_price_book_breaks and append_item_priced_rows, which target different book types/entities.

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?

Gives explicit when-to-use ('load the parametric cost model ... that a ComponentPriced book resolves') and the contrast case ('it replaces the grid that a SpecPriced book would use'). It also prescribes the follow-up sequence: call evaluate_price_book then activate_price_book after loading, so the agent knows its position in the workflow.

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