Skip to main content
Glama

Append Item-Priced Rows

append_item_priced_rows
DestructiveIdempotent

Append rows to a DRAFT price book that prices by ITEM rather than by spec — the plain per-SKU list a supplier sends as a one-page PDF or CSV (their SKU, a description, a unit price, sometimes a case quantity). Max 500 rows per call, and re-sending a chunk OVERWRITES its rows rather than failing, so an interrupted import resumes by re-sending. Each supplier SKU is matched to an internal item as the rows are written — first against purchase SKUs recorded for this book's supplier, then the tenant's own item SKU, then UPC — and the response reports which SKUs found nothing, or matched several items, so you can resolve them without another call. Rows that never match price nothing until they are linked to an item. A chunk is validated against the book as it stands when the write reaches it, so if another caller published the book while your chunk was in flight you get a VALIDATION_ERROR saying so rather than rows landing in a live book — stop appending and resolve remaining rows with link_price_book_row_to_item. Use append_price_book_breaks instead for a book keyed on spec attributes.

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

Input Schema

NameRequiredDescriptionDefault
rowsYesRows to add (max 500): supplierSku (required, exactly as the list prints it), minimumQuantity (0 for a flat price), unitCost, setupCost, isActive. Pass itemId only to override matching with an item you have already identified.
bookIdYesThe DRAFT price book id (GUID). Must have been created to price by item.
expectedTotalRowsNoOptional total rows expected in the finished list. Supply it on every chunk to receive remainingRows, progressPercent, and an exact next-tool recommendation.

Output Schema

NameRequiredDescriptionDefault
okNo
addedNo
bookIdNo
matchedNo
updatedNo
totalRowsNo
unmatchedNo
nextActionNo
remainingRowsNo
unmatchedSkusNo
maxRowsPerChunkNo
progressPercentNo
processedInChunkNo
expectedTotalRowsNo
recommendedNextToolNo

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?

Goes well beyond the annotations: discloses the 500-row cap, that re-sending a chunk overwrites rather than errors (consistent with idempotentHint), the exact SKU matching cascade (purchase SKU, then tenant item SKU, then UPC), that unmatched rows price nothing, and the mid-write validation failure mode. This is rich behavioral context the agent cannot get from the schema.

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 important constraints (draft-only, item-priced, 500-row cap) are front-loaded and every sentence carries information. It is one dense paragraph with long compound clauses, though, so readability suffers slightly despite the absence of filler.

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, idempotent bulk-append tool, the description covers limits, overwrite semantics, matching behavior, failure modes, and what the response reports. With an output schema already present, nothing material 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, but the description adds real meaning: itemId is explained as a matching override, and expectedTotalRows is justified by the progress/next-tool output it unlocks. Supplier SKU and case-quantity semantics are clarified beyond the schema's per-field text.

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 ('Append rows to a DRAFT price book') and immediately scopes it to item-priced books rather than spec-priced ones, with a concrete example of the input shape. It also names the sibling for the other case, so an agent can distinguish the two without opening schemas.

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?

Explicitly routes to append_price_book_breaks for spec-keyed books, explains the resume-on-overwrite behavior for interrupted imports, and tells the agent to stop appending and use link_price_book_row_to_item when the book was published mid-flight. When-to-use and when-to-switch guidance are both present.

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