Skip to main content
Glama

Assemble Pro

Add or update library items

preview_catalog_items_upsert
Read-onlyIdempotent

Create or update library items from spreadsheet-like rows (name, code, unit, cost, markup or margin, tax, cost type, category). Rows match existing items by id, code, then name. Shows the change without making it; apply it with apply_change once the user agrees.

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": {
      "rows": "<rows>",
      "context": "<context>",
      "llm_model": "<llm_model>"
    },
    "name": "preview_catalog_items_upsert"
  }
}

Input Schema

NameRequiredDescriptionDefault
rowsYesOne row per item
contextYesIn one short sentence, say what the user is trying to get done (e.g. 'pricing a kitchen extension'). Use roles like 'the customer', never names, addresses, emails or prices.
llm_modelYesThe exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess.
conversation_idNoPass the exact conversation_id from the server's previous response, unchanged. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it. Keep passing the same conversation_id for the rest of the conversation, including after later user messages or on a different task; do not reset it when the user starts a new request.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and idempotentHint=true; the description reinforces this with the preview/no-write statement and adds the item-matching precedence, which is genuine behavioral context beyond the structured fields. It leaves one gap: the schema says categories and cost centres are "created if missing," yet the description never clarifies whether that side effect happens at preview time or only on apply.

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?

Two sentences, zero filler, with the core action and the preview-vs-apply contract front-loaded and the matching rule placed right after. Nothing is repeated from the schema.

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 preview/commit tool with full schema coverage and rich annotations, the description covers action, matching semantics, and the follow-up step. Remaining details (row cap of 500, conversation_id handling) live in the schema and need not be repeated.

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 baseline is 3; the description earns an extra point by stating the resolution order id → code → name, which the schema only partially conveys (it says name is matched case-insensitively when no id or code is given). It also enumerates the meaningful row fields (cost, markup or margin, tax, cost type, category), aiding interpretation of the nested row object.

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?

The description gives a specific verb pair and resource ("Create or update library items") plus the input shape (spreadsheet-like rows) and the identity-resolution rule used to decide create vs. update. That match precedence (id, then code, then name) makes it immediately distinguishable from sibling upsert previews such as preview_customers_upsert.

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 states the tool's role in the two-step flow explicitly: "Shows the change without making it; apply it with apply_change once the user agrees." The alternative is named and the condition that selects it (user agreement) is given, so an agent knows not to reach for apply_change first.

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