Skip to main content
Glama

Plan a Canadian grocery order

plan_grocery_order
Read-onlyIdempotent

Plans a grocery order from a shopping list as the shopper wrote it, in a covered Canadian city. Use when a shopper asks where their list is cheapest or wants to buy groceries online. Takes the list as text (English or French, quantities included, up to 60 lines), the city or the first three characters of a postal code inside it and, optionally, the stores the shopper uses. Returns each line as exact, closest (a different size, variant or brand: not priced and in no total) or not tracked; per-store totals with coverage and price dates; a cheapest store only when every compared item is priced at two or more chains with a clear lead (or, when the only obstacle is a pack item whose count no store's listing gives, a store labelled cheapest for the other lines, with those lines listed apart), otherwise the reason; per-item links to each store's own product page or search; and interpretation notes that state what the result does and does not cover. Read-only: it never orders, adds to a cart, saves a list or contacts a store.

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": {
      "list": "<list>"
    },
    "name": "plan_grocery_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
cityNoThe covered Canadian city whose chain prices are compared (the price market): its English or French name, or its slug. A municipality in a covered city's metropolitan area (for example Mississauga, Laval or Surrey; "Richmond, BC" where another province has the name) is answered with that city's prices, and the result says so (city.resolvedFrom is metro_area). Give this or postalCode.
listYesThe shopper's grocery list exactly as they wrote it, one item per line (or comma-separated), English or French, with quantities if they gave them: "2L milk", "dozen eggs", "3 lbs lean ground beef", "oeufs".
storesNoOptional: only the stores the shopper is willing to use (names like "No Frills" or catalogue keys). Omit to compare every tracked chain in the city.
languageNoLanguage for item names and store links. Default en.
postalCodeNoThe first three characters of a Canadian postal code (the forward sortation area, for example K1P), used only to choose the covered city. An area in a covered city's metropolitan area is answered with that city's prices and marked the same way; areas outside those metropolitan areas are refused, never moved to the nearest one. A full postal code is accepted; only its first three characters are read.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / city / description
      Previous value: -"The covered Canadian city whose chain prices are compared (the price market): its English or French name, or its slug. Give this or postalCode."New value: +"The covered Canadian city whose chain prices are compared (the price market): its English or French name, or its slug. A municipality in a covered city's metropolitan area (for example Mississauga, Laval or Surrey; \"Richmond, BC\" where another province has the name) is answered with that city's prices, and the result says so (city.resolvedFrom is metro_area). Give this or postalCode."
    • changedInput schema / properties / postalCode / description
      Previous value: -"The first three characters of a Canadian postal code (the forward sortation area, for example K1P), used only to choose the covered city. Areas outside the covered cities are refused, never moved to the nearest one. A full postal code is accepted; only its first three characters are read."New value: +"The first three characters of a Canadian postal code (the forward sortation area, for example K1P), used only to choose the covered city. An area in a covered city's metropolitan area is answered with that city's prices and marked the same way; areas outside those metropolitan areas are refused, never moved to the nearest one. A full postal code is accepted; only its first three characters are read."
  2. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Beyond the supplied annotations it states the side effects explicitly ('never orders, adds to a cart, saves a list or contacts a store'), reinforcing readOnlyHint rather than merely repeating it. It also discloses non-obvious behavior: the multi-condition rule for when a cheapest store is declared, the fallback when a pack count is missing, refusal of out-of-area postal codes, and the metro-area resolution caveat.

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?

It is front-loaded with purpose, then usage, inputs, and outputs, and with no output schema the long return-value section earns its space. The density is high, though: the cheapest-store clause is a single convoluted sentence with nested parentheticals that is harder to parse than necessary.

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 no output schema, the description carries the full return contract and does so thoroughly: line-level classifications, per-store totals with coverage and price dates, conditional cheapest-store output, deep links, and interpretation notes. The remaining gap is routing: it does not explain how this differs from compare_grocery_list, which the usage sentence arguably overlaps with.

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 the baseline is 3; the description adds real meaning on top by specifying 'up to 60 lines' for the list (a line-count limit the 3000-character schema does not express) and by restating the city/postal-code alternation as a single either-or decision. It does not add much for 'stores' or 'language' beyond what the schema already documents.

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 opening names a specific verb and resource ('Plans a grocery order from a shopping list') plus the operating scope ('in a covered Canadian city'), so an agent knows exactly what it produces. It stops short of naming or contrasting the sibling tools, so the boundary with compare_grocery_list must be inferred from behavior rather than stated.

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?

It gives concrete triggering conditions: 'when a shopper asks where their list is cheapest or wants to buy groceries online.' There are no explicit exclusions or named alternatives, so an agent facing a similarly worded sibling tool has no stated rule for choosing between them.

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