Skip to main content
Glama

Filters of a listing

kh_filters
Read-onlyIdempotent

Retrieve available filters for a category, brand, tag, or search, including brands, colors, attributes, price ranges, and stock counts, to refine product browsing.

Instructions

List the filters of a category, brand, tag or search: sub-categories, brands, colors and attribute facets (skin type, hair type, free-from, ingredients, gender, ...) with ids and product counts, plus price range and stock counts.

Use before kh_browse: pass brand slugs as brands, color ids as colors, facet keys as facets. Brands are cut to the 40 biggest and each attribute group to 25 values (omitted says how many more); ask for one group to see it all. Prices in Toman. price_range is on the list price before discount (min 0 = out-of-stock items), so its max can be above the dearest payable price.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagNoCollection / campaign tag slug from kh_deals (the part after /tags/), e.g. 'festival-js' (pink box).
groupNoReturn only attribute groups whose name contains this, in full, e.g. 'نوع پوست' (skin type).
queryNoKeyword, alone or inside the listing.
brandsNoBrand slugs from kh_brands / kh_filters (OR), e.g. ['simple', 'cerave'].
category_idNoCategory id from kh_categories or kh_search, e.g. 145 (moisturizers).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, openWorld, non-destructive), and the description goes well beyond them by disclosing truncation behavior (brands cut to the 40 biggest, attribute groups to 25 values, with an `omitted` count) and non-obvious data semantics (prices in Toman, price_range based on list price before discount, min 0 meaning out-of-stock). These are exactly the quirks an agent would otherwise misread.

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-loaded with the core purpose, then progressively adds chaining guidance and gotchas in three tight paragraphs. The first sentence is dense with a long parenthetical enumerating facet types, which is slightly heavier than needed, but no sentence is filler.

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 not be spelled out, yet the description still explains the two most confusing output aspects (truncation with `omitted`, and the list-price basis of price_range). Combined with the annotations, an agent has everything needed to call it correctly and interpret the result.

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?

Schema description coverage is 100% and each parameter already carries a description with provenance (tag from kh_deals, brands from kh_brands/kh_filters, category_id from kh_categories), so the schema does the heavy lifting. The description's 'pass brand slugs as brands' restates the same mapping, adding little parameter-level meaning beyond the baseline.

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 ('List the filters of a category, brand, tag or search') and enumerates exactly what comes back: sub-categories, brands, colors, attribute facets, ids, product counts, price range and stock counts. It is clearly distinguishable from siblings like kh_search and kh_browse 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 Guidelines5/5

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

Explicitly frames the tool as a precursor: 'Use before kh_browse' and tells the agent how to feed the result forward ('pass brand slugs as brands, color ids as colors, facet keys as facets'). This is a concrete when-and-how-to-use directive rather than an implied one.

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