Skip to main content
Glama

List categories

kh_categories
Read-onlyIdempotent

List Khanoumi's category tree with IDs, URL paths, and product counts, optionally filtered by keyword, to retrieve category IDs for browsing, filtering, or price comparison.

Instructions

List Khanoumi's category tree with ids, URL paths and product counts.

Use to get a category_id for kh_browse / kh_filters / kh_find_cheapest. Without a query only levels up to max_level are listed; with a query every level is searched. kh_search also returns the categories matching a keyword.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNoOptional filter on the Persian name or English slug, any level, e.g. 'ضد آفتاب' or 'shampoo'.
max_levelNoDeepest level to list when no query is given (1 = top level).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, openWorld), so the bar is lower. The description adds real operational context beyond that: without a query only levels up to max_level are returned, while with a query every level is searched, which materially affects results.

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 tight sentences with no filler; the primary purpose and the routing cue come first, followed by the query/no-query distinction and the alternative tool.

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 and annotations carry the safety profile, so the description need not explain return shapes. What remains — purpose, routing to sibling tools, and query-mode behavior — is fully covered.

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 description coverage is 100%, so the baseline is 3. The description goes further by explaining how the two parameters interact (level truncation only applies in the no-query case; a query searches all levels), which is not stated in the schema itself.

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 (list) and resource (Khanoumi's category tree) and enumerates what it returns: ids, URL paths, product counts. This is clearly distinguishable from siblings like kh_search or kh_browse, which the description positions it against.

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 states the reason to call it (to obtain a category_id for kh_browse / kh_filters / kh_find_cheapest) and names kh_search as the alternative that also surfaces matching categories. It also clarifies the query vs no-query behavior, so an agent knows which mode fits its situation.

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