Skip to main content
Glama

Price range for an item

price_range
Read-onlyIdempotent

Where a price sits: the cheapest, typical (median) and priciest qualified unit price for the same item across stores near a place on a day (flyer offers valid that day, shelf prices read within a week), how many prices each rests on, and status ranged | thin_range | unranged. Give quantity, unit and paidMinor to get the percentile and savings for a price. Use it before a purchase to say what a fair price is; record_purchases stores the same numbers.

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": {
      "item": "<item>",
      "near": "<near>"
    },
    "name": "price_range"
  }
}

Input Schema

NameRequiredDescriptionDefault
onNoDay to price, YYYY-MM-DD (default today).
itemYesThe generic item, as compare_items takes it: "chicken thighs", "large eggs", "bananas". Not a brand or receipt code.
nearYesWhere the shopper is: a Canadian postal code ("M6H 2B6"), an FSA ("M6H"), or "lat,lng".
unitNoUnit of `quantity`; also picks the unit prices compare in (kg, L or each).
quantityNo
radiusKmNoSearch radius in km around `near` (default 5).
paidMinorNoA price paid or planned for `quantity`, in cents.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive), so the bar is lower, and the description goes well beyond them by disclosing data provenance: only flyer offers valid on the queried day and shelf prices read within a week qualify. It also exposes the thin_range/unranged status concept and the fact that each figure carries a sample count, which matters for trusting a result. It doesn't cover ordering, pagination, or what an unranged response looks like in practice.

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?

Output shape is front-loaded, then qualification rules, then the optional paidMinor behavior, then the use case — a sensible order. It is one dense run-on with nested parentheticals, but nearly every clause carries distinct information and nothing is pure filler.

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?

With seven parameters, no output schema, and a non-trivial statistical result, the description carries the full burden and does so: it explains the three returned figures, the counts behind them, the status enum, the freshness windows, and the optional percentile/savings mode. An agent has enough to call it correctly and interpret the response without further documentation.

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 86%, so the schema already documents most parameters; the description nonetheless adds meaning the schema cannot, namely that quantity + unit + paidMinor together yield a percentile rank and a savings figure, not just a pass-through price. The note that 'item' is the same generic form compare_items takes helps the agent construct a valid value. Radius, defaults, and format constraints are left 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?

The description names the specific resource (qualified unit price for one item across nearby stores on a day) and enumerates exactly what is returned: cheapest, median, priciest, plus the sample counts behind each. It also spells out the status values (ranged | thin_range | unranged), which makes the tool's function concrete. It stops short of explicitly contrasting itself with close siblings like compare_items or price_history, so an agent must infer the boundary.

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?

'Use it before a purchase to say what a fair price is' gives a clear situational trigger, and the pointer to record_purchases clarifies the division of labor with the write-side sibling. The conditional 'Give quantity, unit and paidMinor to get the percentile and savings' tells the agent how to unlock extra output. No exclusion rules are given for when compare_items or price_history would be the better pick.

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