Skip to main content
Glama

Resolve Unit Cost

resolve_unit_cost
Read-only

Resolve a unit cost + flat setup cost for a quantity — a pure read (no quote is created). Three forms: (a) itemSku alone — prices via the item's DEFAULT sourcing profile: the profile names the book, and the spec is derived live from the item's current custom-field values; refused (naming the missing or unrecognized attributes) when the item's own data does not resolve the book's cost drivers. (b) bookId + spec — prices an explicit spec-keyed grid directly; also works for ComponentPriced books (the response includes a componentBreakdown with each component's contribution). Spec values are normalized against the book's schema first, so a numeric-band attribute accepts the raw number ('6') or its band label ('6-inch') interchangeably. (c) bookId + itemSku — prices an item against a book that prices by item rather than by spec, which has no sourcing profiles to go through. found=false in the result means nothing in that book priced it; for ComponentPriced books the result's unresolvedComponents then names each component that applies to the spec but had no matching rate — a component never silently drops out of the sum.

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": {
      "quantity": "<quantity>"
    },
    "name": "resolve_unit_cost"
  }
}

Input Schema

NameRequiredDescriptionDefault
specNoExplicit form: concrete cost-driver attribute values keyed by the book's schema, e.g. {"trim": "6x9"}.
bookIdNoExplicit form: the price book id (GUID). Requires spec.
itemSkuNoItem form: an item SKU, priced via its default sourcing profile. Mutually exclusive with bookId/spec.
quantityYesQuantity to price (must be greater than zero).

Output Schema

NameRequiredDescriptionDefault
okNo
dataNo
specNo
bookIdNo
itemIdNo
warningsNo
sourcingProfileIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnly/non-destructive/closed-world, and the description adds substantial behavior beyond them: that no quote is created, that the item form is refused with the specific missing/unrecognized attributes when data doesn't resolve, that spec values are normalized so '6' and '6-inch' are interchangeable, and that found=false plus unresolvedComponents signal components that apply but had no rate. These are real failure-mode and result-shape disclosures, not restatements.

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-loads the one-line purpose, then enumerates forms (a)/(b)/(c) in a scannable structure, ending with result semantics. It is dense and long, with some nested clauses (the refusal explanation) that could be trimmed, but nearly every sentence carries operational information.

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 4-parameter read tool with full schema coverage, full annotations, and an output schema, the description supplies everything an agent needs to pick a form, anticipate refusals, and interpret found=false/componentBreakdown/unresolvedComponents. Nothing material is deferred to guesswork.

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 meaning the schema does not: itemSku routes through the item's default sourcing profile and is mutually exclusive in spirit with bookId/spec, bookId+spec prices a spec-keyed grid and also works for ComponentPriced books, and spec values are normalized against the book's schema before matching. It does not detail the quantity or null/empty handling, keeping it short of a 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 and resource ('Resolve a unit cost + flat setup cost for a quantity') and immediately distinguishes the three invocation forms, including what each form keys off (item default sourcing profile, explicit bookId+spec grid, bookId+itemSku). An agent can tell exactly what this does and how it differs from a pricing tool that would create a quote, which it explicitly rules out.

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

Usage Guidelines4/5

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

Gives clear conditions for each of the three forms (itemSku alone vs bookId+spec vs bookId+itemSku) and explains that form (c) is for books that price by item rather than spec. It does not name a sibling alternative (e.g. resolve_customer_price) or state when to prefer that tool over this one, so guidance is strong but not exhaustive.

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