Resolve Unit Cost
resolve_unit_costResolve 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
| Name | Required | Description | Default |
|---|---|---|---|
| spec | No | Explicit form: concrete cost-driver attribute values keyed by the book's schema, e.g. {"trim": "6x9"}. | |
| bookId | No | Explicit form: the price book id (GUID). Requires spec. | |
| itemSku | No | Item form: an item SKU, priced via its default sourcing profile. Mutually exclusive with bookId/spec. | |
| quantity | Yes | Quantity to price (must be greater than zero). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| data | No | ||
| spec | No | ||
| bookId | No | ||
| itemId | No | ||
| warnings | No | ||
| sourcingProfileId | No |