Skip to main content
Glama

Resolve Customer Price

resolve_customer_price
Read-only

What a customer pays for some lines on a day, and why, exactly as the order form and POST /api/v1/pricing/resolve price them: the customer's own lists, then its groups', then the tenant default list, each line at its own quantity and unit, then the best discount (none on a net list). Name the customer by customerId, customerEmail or exact customerName, or omit all three to price a sale with no customer. day is YYYY-MM-DD in the tenant's calendar; omit it for the tenant's today. Up to 500 lines, each an item (id or SKU), a quantity (default 1) and an optional uomId. Each line returns unitPrice, the discount, netUnitPrice and its source: the list and break it came from, or the item's own price. Read-only. Requires an operator (unpinned) credential and a User.

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": {
      "lines": "<lines>"
    },
    "name": "resolve_customer_price"
  }
}

Input Schema

NameRequiredDescriptionDefault
dayNoOptional day to price on, YYYY-MM-DD in the tenant's calendar; omit for today.
linesYesThe lines to price, 1 to 500.
customerIdNoOptional customer id (GUID).
customerNameNoOptional customer name (exact, case-insensitive).
customerEmailNoOptional customer email (exact, case-insensitive).

Output Schema

NameRequiredDescriptionDefault
dayNo
linesNo
customerIdNo
customerNameNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Adds substantial context beyond the annotations: the list-cascade resolution order, net-list no-discount rule, per-line source attribution, 500-line cap, and an explicit credential requirement ('operator (unpinned) credential and a User'). The read-only claim matches readOnlyHint=true. The credential/permission note is the main value-add; no rate-limit or error behavior is described.

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?

Two dense but front-loaded sentences covering purpose, identity options, day semantics, line limits, return shape, and access requirements. Every clause carries information; slightly cramped but not wasteful.

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?

Complete for a read-only pricing tool: purpose, cascade logic, identity handling, line constraints, and credential prerequisites are all covered, and an output schema exists to cover return values.

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 baseline is 3, but the description adds the combination rule for the three customer identifiers (omit all to price with no customer) and reinforces day-in-tenant-calendar and default quantity. That is genuine meaning beyond the schema, though much overlaps with existing parameter descriptions.

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 ('what a customer pays for some lines on a day, and why') and pins it to the exact pricing order-form semantics. It distinguishes itself from the price-book sibling family by framing the output as a resolved per-line price plus its source.

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 operating context: price a sale, optionally with no customer by omitting all three identity parameters, up to 500 lines, day defaults to tenant today. It does not explicitly contrast with siblings like resolve_unit_cost or evaluate_price_book, so it falls short of a 5.

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