Skip to main content
Glama
digikala-mcp

digikala-mcp

by sepehr071

Best picks for a budget

dk_best_for_budget
Read-onlyIdempotent

Rank in-stock products under a Toman budget by rating weighted by review count, so a high score from many buyers outranks a small-sample score.

Instructions

Rank the best-rated in-stock products within a budget (Toman) by a rating weighted by its count.

A 5.0 from 3 buyers does not beat a 4.6 from 900. Use for "best X under Y".

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": {
      "max_price": "<max_price>"
    },
    "name": "dk_best_for_budget"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
pagesNoPages to scan.
queryNoe.g. 'هدفون بی سیم'.
max_priceYesBudget, Toman.
min_priceNoToman. Default for a query: a floor that drops accessories.
min_ratingsNo
category_codeNoInstead of query, e.g. 'mobile-phone'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed17 schema fields changedv0.6.0
    • removedInput schema / properties / category_code / anyOf
      Removed value: -[
      -  {
      -    "pattern": "^[a-z0-9][a-z0-9_.'’-]{1,80}$",
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • changedInput schema / properties / category_code / description
      Previous value: -"Or a category code instead of a query, e.g. 'mobile-phone' (from dk_suggest)."New value: +"Instead of query, e.g. 'mobile-phone'."
    • addedInput schema / properties / category_code / pattern
      Added value: +"^[a-z0-9][a-z0-9_.'’-]{1,80}$"
    • addedInput schema / properties / category_code / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedInput schema / properties / limit / description
      Removed value: -"Max picks to return."
    • changedInput schema / properties / max_price / description
      Previous value: -"Budget in Toman, e.g. 20000000 for 20 million Toman."New value: +"Budget, Toman."
    • removedInput schema / properties / min_price / anyOf
      Removed value: -[
      -  {
      -    "minimum": 0,
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • changedInput schema / properties / min_price / description
      Previous value: -"Skip anything cheaper, in Toman. Default for a query: a floor that drops accessories."New value: +"Toman. Default for a query: a floor that drops accessories."
    • addedInput schema / properties / min_price / minimum
      Added value: +0
    • addedInput schema / properties / min_price / type
      Added value: +[
      +  "integer",
      +  "null"
      +]
    • removedInput schema / properties / min_ratings / description
      Removed value: -"Skip products with fewer ratings than this."
    • changedInput schema / properties / pages / description
      Previous value: -"Result pages to scan, 20 products each."New value: +"Pages to scan."
    • removedInput schema / properties / query / anyOf
      Removed value: -[
      -  {
      -    "maxLength": 100,
      -    "minLength": 2,
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • changedInput schema / properties / query / description
      Previous value: -"What to buy, e.g. 'هدفون بی سیم' or 'گوشی سامسونگ'."New value: +"e.g. 'هدفون بی سیم'."
    • addedInput schema / properties / query / maxLength
      Added value: +100
    • addedInput schema / properties / query / minLength
      Added value: +2
    • addedInput schema / properties / query / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  2. Changed9 schema fields changedv0.4.0
    • removedInput schema / properties / category_code / title
      Removed value: -"Category Code"
    • removedInput schema / properties / limit / title
      Removed value: -"Limit"
    • removedInput schema / properties / max_price / title
      Removed value: -"Max Price"
    • removedInput schema / properties / min_price / title
      Removed value: -"Min Price"
    • removedInput schema / properties / min_ratings / title
      Removed value: -"Min Ratings"
    • removedInput schema / properties / pages / title
      Removed value: -"Pages"
    • removedInput schema / properties / query / title
      Removed value: -"Query"
    • removedInput schema / title
      Removed value: -"dk_best_for_budgetArguments"
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "title": "dk_best_for_budgetDictOutput",
      -  "type": "object"
      -}New value: +null
  3. Addedv0.2.1

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare this a read-only, idempotent, non-destructive query, so the safety profile is covered. The description adds two useful behavioral facts — results are restricted to in-stock items and ranking is deliberately not raw rating — but says nothing about result shape, how many pages are scanned, or the cost of a wide scan despite the pages parameter.

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?

Three short sentences, each earning its place: the operation, the tie-break intuition with a concrete counterexample, then the usage trigger. Front-loaded and free of filler.

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 7-parameter ranking tool with no output schema, the description covers the essential semantics: budget, in-stock filter, and ranking rule. It is still missing any hint of what is returned (ranked product list with price/rating?) and how the page-scan budget affects results, which an agent would want.

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?

With 71% schema coverage, the schema already explains query, max_price, min_price, and category_code. The description adds only the weighting idea and repeats the Toman currency; it explains nothing about min_ratings (the sample-size floor that drives the weighting) or limit, both of which lack schema descriptions.

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?

States a specific verb and resource (rank in-stock products within a budget) and goes further by naming the ranking rule — rating weighted by count — which distinguishes it from cheapness-oriented siblings like dk_find_cheapest and from plain dk_search.

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?

The quoted trigger phrase "best X under Y" gives a concrete when-to-use signal and implicitly excludes cheapest-first or plain keyword lookups. It never names an alternative sibling explicitly (dk_find_cheapest, dk_best_sellers, dk_search), so the routing is inferred rather than stated.

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