Skip to main content
Glama
serbia-prices-mcp

serbia-prices-mcp

by moskrc

Optimize Basket

optimize_basket
Read-only

Estimate the total cost of a grocery basket per store and rank stores that carry every item first. Add product barcodes to price exact products instead of cheapest name matches.

Instructions

Estimate grocery basket cost per store. Each item has a Serbian Latin query and the number of packages, e.g. {'query': 'jaja', 'quantity': 1}. Without ean, every store gets the cheapest package whose name matches, which may be a different product (chocolate milk for 'mleko'). For an exact product, first find it with search_products, let the user choose, then pass its ean: {'query': 'mleko 2.8% 1l', 'ean': '860...', 'quantity': 2}. Cost is price x quantity; stores with all items come first.

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": {
      "items": "<items>"
    },
    "name": "optimize_basket"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemsYes
preferred_chainsNoOptional chain or store format names to restrict results, e.g. ['Lidl', 'Maxi', 'Idea'].

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, so the safety profile is covered, but the description adds real behavioral detail beyond that: the fuzzy name-matching fallback ("may be a different product (chocolate milk for 'mleko')"), the cost formula (price x quantity), and the result ordering ("stores with all items come first"). It does not cover what happens when an item is unavailable everywhere, which is the one remaining behavioral gap.

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

Conciseness5/5

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

Every sentence carries information, and the structure is front-loaded: purpose first, then matching semantics, then the exact-product workflow, then cost and ordering. The inline examples replace paragraphs that would otherwise be needed.

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?

An output schema exists, so return values need no explanation, and the description still covers the things the schema cannot: substitution risk, the two-step ean workflow, cost computation, and result ordering. For a two-parameter read-only estimator this is complete.

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 50%, and the description compensates well for the item fields: it explains that query is a Serbian Latin name and that quantity is a number of packages, and it adds a concrete JSON shape for each item. It says nothing about preferred_chains, though that parameter is documented in the schema itself, so the gap is minor.

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?

The opening sentence names a specific verb and resource: "Estimate grocery basket cost per store." It also implicitly separates itself from the lookup siblings by describing a per-store cost aggregation rather than a product search, so an agent can distinguish it from search_products without reading the schema.

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

Usage Guidelines5/5

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

It gives an explicit decision path: without an ean, expect the cheapest name-matching package; for an exact product, "first find it with search_products, let the user choose, then pass its ean." That names the alternative tool and the precondition for using it, which is exactly the routing guidance required.

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