Skip to main content
Glama
basalam-mcp

basalam-mcp

by sepehr071

Find cheapest products

bs_find_cheapest
Read-onlyIdempotent

Find in-stock offers for a product query, ordered by price from low to high in Toman; filters out unavailable items and narrows by price, rating, category, shipping, or vendor filters.

Instructions

List the cheapest in-stock offers for a query, cheapest first, prices in Toman.

Drops out-of-stock items. Raise min_price if results are still accessories; narrow with category_id.

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>"
    },
    "name": "bs_find_cheapest"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoOffers to return.
queryYesPersian words, e.g. 'عسل طبیعی'.
max_priceNoToman, e.g. 500000.
min_priceNoLowest price in Toman; 5000 hides filler listings.
rating_minNoMin rating; above 0 drops unrated.
category_idNoId from bs_categories, any level.
top_vendorsNoOnly top-rated shops.
free_shippingNoOnly free shipping.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv0.2.2
    • changedInput schema / properties / category_id / description
      Previous value: -"Category id from bs_categories (any level), e.g. 172 for honey."New value: +"Id from bs_categories, any level."
    • changedInput schema / properties / free_shipping / description
      Previous value: -"Only products with free shipping to the whole country."New value: +"Only free shipping."
    • changedInput schema / properties / max_price / description
      Previous value: -"Highest price in Toman, e.g. 500000."New value: +"Toman, e.g. 500000."
    • changedInput schema / properties / min_price / description
      Previous value: -"Lowest price in Toman. Default 5000 hides sample or filler listings that cost a few hundred."New value: +"Lowest price in Toman; 5000 hides filler listings."
    • changedInput schema / properties / query / description
      Previous value: -"Search words, Persian matches best, e.g. 'عسل طبیعی'."New value: +"Persian words, e.g. 'عسل طبیعی'."
    • changedInput schema / properties / rating_min / description
      Previous value: -"Drop products rated below this; above 0 also drops unrated ones."New value: +"Min rating; above 0 drops unrated."
    • changedInput schema / properties / top_vendors / description
      Previous value: -"Only products from top-rated shops (غرفه برتر)."New value: +"Only top-rated shops."
  2. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, non-destructive, open-world behavior, so the description only needs incremental context — and it delivers: the deterministic sort order, the currency, and the automatic exclusion of out-of-stock offers are all behavioral facts not in the annotations. It says nothing about result volume limits beyond the schema or about failure behavior for empty queries.

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 compact lines, front-loaded with what the tool returns before the tuning advice. Minor redundancy in restating 'prices in Toman', which the schema already declares, and the second line reads as clipped fragments rather than a coherent sentence.

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 an 8-parameter read tool with annotations and no output schema, the description covers the important 'what comes back and in what order' plus practical filter tuning. It leaves the caller to infer result shape (per-offer fields, vendor info) and how limit interacts with the filtering.

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 climbs above it by giving a tactical heuristic for min_price (raise it if results are still accessories) and by pairing category_id with narrowing. It adds actionable meaning rather than restating 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 ('List the cheapest in-stock offers for a query') plus ordering ('cheapest first') and currency (Toman), which distinguishes it from a general search tool. It never names the sibling search tool it overlaps with, so differentiation is implied rather than explicit.

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?

Gives concrete operating guidance — results are cheapest-first, out-of-stock items are removed, and it tells the caller to raise min_price when accessory listings pollute results and to narrow with category_id. What's missing is any exclusion rule (e.g., when to prefer a broader search sibling instead).

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