Skip to main content
Glama

Find cheapest groceries

market_find_cheapest
Read-onlyIdempotent

Find the cheapest in-stock grocery offers near a delivery point by scanning open stores and ranking results by final price; check delivery fees and minimum orders before choosing.

Instructions

Find the cheapest in-stock offers for a grocery product near the point.

Scans open delivering stores; one flat list by final price. Check delivery_fee and min_order.

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": {
      "query": "<query>",
      "lat": "<lat>",
      "long": "<long>"
    },
    "name": "market_find_cheapest"
  }
}

Input Schema

NameRequiredDescriptionDefault
latYesDelivery latitude.
longYesDelivery longitude.
limitNoMax offers.
pagesNoPages to scan, 12 stores each.
queryYesProduct name, e.g. 'شیر کم چرب'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.4.0
    • changedInput schema / properties / lat / description
      Previous value: -"Delivery point latitude."New value: +"Delivery latitude."
    • changedInput schema / properties / long / description
      Previous value: -"Delivery point longitude."New value: +"Delivery longitude."
  2. Changed13 schema fields changedv0.2.0
    • changedInput schema / properties / lat / description
      Previous value: -"Latitude of the delivery point (Iran: ~25 to ~40)."New value: +"Delivery point latitude."
    • removedInput schema / properties / lat / title
      Removed value: -"Lat"
    • changedInput schema / properties / limit / default
      Previous value: -20New value: +10
    • changedInput schema / properties / limit / description
      Previous value: -"Max offers to return."New value: +"Max offers."
    • removedInput schema / properties / limit / title
      Removed value: -"Limit"
    • changedInput schema / properties / long / description
      Previous value: -"Longitude of the delivery point (Iran: ~44 to ~63)."New value: +"Delivery point longitude."
    • removedInput schema / properties / long / title
      Removed value: -"Long"
    • changedInput schema / properties / pages / description
      Previous value: -"Search pages to scan, 12 stores each."New value: +"Pages to scan, 12 stores each."
    • removedInput schema / properties / pages / title
      Removed value: -"Pages"
    • changedInput schema / properties / query / description
      Previous value: -"Product name, Persian works best, e.g. 'شیر کم چرب'."New value: +"Product name, e.g. 'شیر کم چرب'."
    • removedInput schema / properties / query / title
      Removed value: -"Query"
    • removedInput schema / title
      Removed value: -"market_find_cheapestArguments"
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "title": "market_find_cheapestDictOutput",
      -  "type": "object"
      -}New value: +null
  3. First observedv0.1.1

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, open-world, non-destructive behavior, so the bar is lower. The description still adds real value: results are a single flat list ordered by final price, only open delivering stores are scanned, and the caller should inspect delivery_fee and min_order before acting. It does not describe how `pages` affects cost or latency of the scan.

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 short sentences with the core action and the output shape front-loaded, and no filler. The semicolon fragment 'Scans open delivering stores; one flat list by final price' is slightly telegraphic and costs a bit of readability.

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?

For a 5-parameter read tool with no output schema and rich annotations, the description covers scope, result ordering, and two fields worth checking. What is missing is minor: how `pages`/`limit` interact with scan breadth and expected latency.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so query, lat, long, limit and pages are each documented in the schema. The description only adds the framing that lat/long is a delivery point and that offers are final-price ordered; it gives no extra detail on paging or limit trade-offs, so baseline 3 applies.

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: cheapest in-stock offers for a grocery product near a point. The 'market_' naming and grocery framing distinguish it from most siblings, but the near-identical food_find_cheapest is never acknowledged, so the agent must infer the separation from the name prefix alone.

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?

Usage context is implied rather than stated: 'scans open delivering stores' tells the agent eligibility conditions, and 'check delivery_fee and min_order' hints at a pre-purchase check. There is no explicit when-to-use-this-vs-alternatives guidance despite food_find_cheapest and market_search being plausible substitutes.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.