Skip to main content
Glama
digikala-mcp

digikala-mcp

by sepehr071

Find categories

dk_categories
Read-onlyIdempotent

Find category codes for product queries and main-category IDs for best-seller lists. Call with no arguments for main categories; use a parent ID to browse subcategories and leaf categories.

Instructions

Find category codes for dk_category_products and main-category ids for dk_best_sellers.

No arguments lists the main categories. A parent category mixes in accessories: browse its leaf.

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": "dk_categories"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
queryNoPersian name (finds more) or English code, e.g. 'لپ تاپ'.
parent_idNoList its sub-categories.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changedv0.6.0
    • removedInput schema / properties / limit / description
      Removed value: -"Max categories to return."
    • removedInput schema / properties / parent_id / anyOf
      Removed value: -[
      -  {
      -    "minimum": 1,
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • changedInput schema / properties / parent_id / description
      Previous value: -"List the sub-categories of this category id."New value: +"List its sub-categories."
    • addedInput schema / properties / parent_id / minimum
      Added value: +1
    • addedInput schema / properties / parent_id / type
      Added value: +[
      +  "integer",
      +  "null"
      +]
    • removedInput schema / properties / query / anyOf
      Removed value: -[
      -  {
      -    "maxLength": 100,
      -    "minLength": 2,
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • changedInput schema / properties / query / description
      Previous value: -"Words in the category name or code, e.g. 'هدفون' or 'laptop'."New value: +"Persian name (finds more) or English code, 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. Changed7 schema fields changedv0.4.0
    • changedInput schema / properties / limit / default
      Previous value: -40New value: +25
    • removedInput schema / properties / limit / title
      Removed value: -"Limit"
    • removedInput schema / properties / parent_id / title
      Removed value: -"Parent Id"
    • changedInput schema / properties / query / anyOf
      Previous value: -[
      -  {
      -    "minLength": 2,
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "maxLength": 100,
      +    "minLength": 2,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / query / title
      Removed value: -"Query"
    • removedInput schema / title
      Removed value: -"dk_categoriesArguments"
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "title": "dk_categoriesDictOutput",
      -  "type": "object"
      -}New value: +null
  3. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, openWorld, and non-destructive, so the safety profile is covered. The description adds genuinely non-obvious behavior: the zero-argument default listing and the caveat that a parent category mixes in accessories, which explains why leaf results differ. It says nothing about the limit/pagination behavior or result ordering.

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?

Three short lines, front-loaded with the purpose and immediately followed by the two calling modes; nothing is padded. The 'browse its leaf' phrasing is telegraphic and slightly cryptic, but it is not wasted space.

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 no output schema, the description carries the burden of explaining returns, and it does name the two return kinds (category codes and main-category ids). It still omits what other fields come back, such as category names or hierarchy depth, which an agent composing a response 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?

Schema coverage is 67%, with query and parent_id already documented in the schema (Persian name vs English code, sub-categories). The description reinforces the parent_id drill-down but adds no meaning for limit, which is undocumented in both places, so it does not compensate for the remaining coverage gap.

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?

The description states a specific verb and resource ('Find category codes... and main-category ids') and names the two downstream consumers, dk_category_products and dk_best_sellers, which tells an agent why this lookup exists. It falls short of a 5 because it never plainly says 'this lists categories' in a way that separates it from dk_filters or dk_search for an agent skimming sibling names.

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?

It gives concrete call patterns: calling with no arguments lists main categories, and browsing a parent's leaf is the correct drill-down. The guidance is contextual rather than a full when/when-not list, and it never explicitly says to use this instead of dk_search when the user only has a fuzzy category name.

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