Skip to main content
Glama

Find product categories

em_categories
Read-onlyIdempotent

Find Emalls category IDs by keyword or browse the category tree to obtain the category_id required for em_search.

Instructions

Find Emalls category ids by words, or browse the category tree (top level, then children of a category id).

Use it to get category_id for em_search. With query: matching categories plus popular search phrases. Without: top-level categories; parent_id lists sub-categories and brand shortcuts.

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

Input Schema

NameRequiredDescriptionDefault
queryNoWords, e.g. لپ تاپ. Empty browses the tree.
parent_idNoSub-categories of this id. Empty: top level.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.2.0
    • changedInput schema / properties / parent_id / description
      Previous value: -"List the sub-categories of this category id (from this tool). Empty: top-level categories."New value: +"Sub-categories of this id. Empty: top level."
    • changedInput schema / properties / query / description
      Previous value: -"Words to find categories for, e.g. لپ تاپ or یخچال. Leave empty to browse the tree."New value: +"Words, e.g. لپ تاپ. Empty browses the tree."
  2. First observedv0.1.1

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, non-destructive, open-world behavior, so safety is covered. The description adds valuable return-content context absent from annotations: with a query you get matching categories plus popular search phrases; without one you get top-level categories or sub-categories and brand shortcuts.

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 compact paragraphs with the primary purpose front-loaded, followed by the mode-specific behavior. No filler sentences and every clause carries operational information.

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 only two optional parameters, no output schema, and rich annotations, the definition covers what an agent needs to call it correctly. It stops short of mentioning result limits, ordering, or whether brand shortcuts are usable as parent_id inputs, which would fully close the loop.

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 adds meaning beyond the schema by explaining the query-mode return set ('popular search phrases') and by noting that parent_id yields 'brand shortcuts' as well as sub-categories — details not present in the parameter descriptions.

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?

The opening sentence names a specific verb ('Find') and resource ('Emalls category ids') and covers both operating modes: keyword lookup and tree browsing. It is clearly distinguishable from siblings like em_search, which consume the ids this tool produces.

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 explicitly states the workflow purpose: 'Use it to get `category_id` for em_search,' which tells the agent when this tool should precede a search. It also specifies the mode split (with query vs without), though it names no alternative tool for browsing categories elsewhere.

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