Skip to main content
Glama

List categories

kh_categories
Read-onlyIdempotent

Lists Khanoumi's category tree with IDs, URL paths, and product counts; searches every level by Persian name or English slug to help obtain a category_id.

Instructions

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

Use to get a category_id. A query searches every level; without one, levels up to max_level.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "kh_categories"
  }
}

Input Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.4.0
    • removedInput schema / properties / query / anyOf
      Removed value: -[
      -  {
      -    "minLength": 2,
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / query / minLength
      Added value: +2
    • addedInput schema / properties / query / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  2. Changed5 schema fields changedv0.2.0
    • removedInput schema / properties / max_level / title
      Removed value: -"Max Level"
    • changedInput schema / properties / query / description
      Previous value: -"Optional filter on the Persian name or English slug, any level, e.g. 'ضد آفتاب' or 'shampoo'."New value: +"Filter on Persian name or English slug, e.g. 'ضد آفتاب' or 'shampoo'."
    • removedInput schema / properties / query / title
      Removed value: -"Query"
    • removedInput schema / title
      Removed value: -"kh_categoriesArguments"
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "title": "kh_categoriesDictOutput",
      -  "type": "object"
      -}New value: +null
  3. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent and non-destructive, so the safety profile is covered. The description adds genuinely new behavior: a query searches every level regardless of max_level, while a bare call is bounded by max_level. What it returns (ids, paths, counts) is also disclosed; pagination or ordering is not.

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?

Two sentences, front-loaded with purpose and return content, then the mode logic. Nothing is redundant or padded.

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?

With no output schema, the description carries the return-value burden and does so by naming ids, URL paths and product counts. Combined with the mode explanation and the calling context, an agent has everything needed to invoke it correctly.

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, but the description goes beyond the schema by describing the interaction between the two parameters: max_level only applies when no query is supplied. That interplay is not expressed in the schema itself.

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 Khanoumi's category tree') and even enumerates the returned fields (ids, URL paths, product counts). It does not explicitly contrast itself with siblings such as kh_search or kh_browse, but the category-tree scope makes it distinguishable in practice.

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 to get a category_id' gives a concrete calling context, and the second sentence explains the two operating modes (query vs. no query). No alternatives are named and no exclusions are given, which keeps it just short of a 5.

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