Skip to main content
Glama

Find cheapest product

kh_find_cheapest
Read-onlyIdempotent

Find the lowest-priced in-stock products for a keyword, sorted by payable price in Toman. Narrow results by category and match all query words.

Instructions

Find the cheapest in-stock products for a keyword, one flat list sorted by payable price (Toman).

Use when the user wants the lowest price for X. The site sorts in-stock matches by payable price; this drops sponsored items and, by default, loose matches whose title lacks a query word. Narrow with category_id (kh_categories / kh_search). final_price is the cheapest shade: check the chosen shade with kh_product. complete=false: matches go on past scanned, raise scan.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scanNoMax search results to scan, cheapest first, 300 per request.
limitNoMax offers to return.
queryYesProduct name or keyword, Persian or English, e.g. 'کرم مرطوب کننده' or 'cerave'.
category_idNoCategory id from kh_categories or kh_search, e.g. 145 (moisturizers).
match_all_wordsNoKeep only products whose Persian or English title or brand contains every word of the query.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly/openWorld/idempotent/non-destructive, so the safety profile is covered. The description adds genuine operational behavior not in the annotations: sponsored items are dropped, loose title matches are excluded by default, results are sorted by payable price, and complete=false signals that matches continue past `scanned` and scan should be raised.

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?

Front-loads the core purpose in the first sentence and then layers usage, filtering, and pagination notes compactly. The terse fragments ('complete=false: matches go on past `scanned`, raise scan') are dense but slightly clipped, costing a little polish rather than content.

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 an output schema present, return values needn't be explained, and the description covers the non-obvious behavioral quirks (sponsored-filtering, match_all_words default, scan/complete pagination loop). Cross-references to kh_product and kh_categories round out what an agent needs to act.

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 baseline would be 3, but the description earns extra credit by clarifying scan semantics (matches continue past the scanned set on complete=false), the default match_all_words filtering behavior, and that final_price is the cheapest shade to verify with kh_product.

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 (find), resource (cheapest in-stock products), and scope (one flat list sorted by payable price in Toman). It implicitly separates itself from the broader kh_search by emphasizing 'cheapest' and dropping sponsored items, so an agent can route correctly without opening either schema.

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?

'Use when the user wants the lowest price for X' gives a clear triggering intent, and it points to kh_categories/kh_search for narrowing via category_id. It does not state when NOT to use this tool or explicitly contrast alternatives like kh_search for general browsing, so it stops short of full routing guidance.

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