Skip to main content
Glama

Trueprice

Cheapest way to buy

cheapest_path

The cheapest way to buy a product Trueprice tracks (same as POST /api/v1/prices/optimize): the exact steps (sale, each code, shipping, tax, rewards) with each step's amount, source_id (the code's deals id or the product URL), confidence and checked_at, then checkout_total = items − eligible discounts + shipping + tax (tax only with user.taxRate), effective_cost after rewards (null without one), codes rejected and why (not stackable, minimum not met, new customers only, expired), assumptions, and snapshot_id: the purchase_paths row that reproduces every number. Maths is deterministic code, never a model; ranking never follows commission. Pass a product URL, or domain + handle, or your own offers/coupons/rewards. path is null when nothing is buyable.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "cheapest_path"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoProduct page URL (a tracked Shopify store or any store page Trueprice tracks)
userNo
domainNo
handleNo
offersNoYour own offers: {store, url, price, checked_at, compare_at?, currency?, shipping?, available?, kind?, ref?}
couponsNo{code, store, kind: percent|fixed|ship_percent|ship_fixed, value, min_spend?, stackable?, new_customer_only?, expires_at?}
rewardsNo{source, kind: percent|fixed, value, checked_at, store?, cap?, min_spend?}

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Adds substantial behavior beyond the annotations: the maths is deterministic code, ranking never follows commission, tax is applied only when user.taxRate is set, effective_cost is null without rewards, and the result persists as a purchase_paths snapshot_id (consistent with readOnlyHint=false and idempotentHint=false). It stops short of stating rate limits, auth requirements, or cost/latency for a computation that fetches live store pages.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core purpose is front-loaded, but the opening is a single very long run-on sentence packed with parentheticals that is hard to parse. Given there is no output schema, most of the output detail earns its place, but the structure could be broken into a purpose line plus separate input and output lines.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 7 optional parameters, nested objects, and no output schema, the description does the heavy lifting by enumerating the return shape (steps with source_id, confidence, checked_at; checkout_total formula; rejected codes and reasons; snapshot_id; null path). Minor gaps remain around user.region/firstOrder semantics and per-item structure of offers, which the schema carries at 57% coverage.

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 only 57%, and the description compensates by explaining the three mutually alternative input modes (url vs domain+handle vs own offers/coupons/rewards) and tying user.taxRate to the tax line. It still leaves user.region, firstOrder, and the offers/rewards field vocabularies to the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: computing the cheapest purchase path for a tracked product, and even anchors it to the equivalent API route (POST /api/v1/prices/optimize). It is distinguishable from siblings like lookup_price or product_history by being an optimization rather than a lookup, though it never names or contrasts those siblings explicitly.

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

Usage Guidelines3/5

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

Gives concrete input-mode guidance ('Pass a product URL, or domain + handle, or your own offers/coupons/rewards') and an edge case ('path is null when nothing is buyable'). It does not say when to prefer this over lookup_price or store_codes, so the when-to-use-versus-alternatives dimension is only implied.

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