Skip to main content
Glama

Get Categories

get_categories

Retrieve the OpenCart category tree by parent ID. Set parent_id=0 to fetch top-level categories for building menus or browsing your store's catalog structure.

Instructions

Get category tree. Set parent_id=0 for top-level categories.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
parent_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.0

TDQS

B3.4/5.0
Behavior2/5

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

No annotations and no explanation of whether this is safe, cached, or whether the category tree includes nested descendants, active/inactive categories, or store-scoped data. With an output schema present, return shape is not needed, but the description still lacks behavioral context like whether it traverses children or returns only direct children.

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 short imperative sentences, front-loaded with the action and immediately followed by the key parameter behavior. No filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-parameter read tool with an output schema, the description covers the main call pattern but omits important context: whether the tree includes nested descendants, whether inactive categories are returned, and what happens with invalid parent_id. Adequate minimum viable, but clear gaps remain.

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 0%, so the description carries the burden. It explains that parent_id=0 means top-level categories and implies parent_id selects children of a given category. This is meaningful semantics beyond the bare integer in the schema. It does not clarify whether the integer must reference an existing category ID or whether invalid IDs error.

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: get the category tree. Distinguishes from nearby tools like get_product, get_products, update_category, etc. It names the object (category tree) but does not explicitly call out its sibling relationships beyond resource specificity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

Provides an implicit usage instruction: setting parent_id=0 returns top-level categories. It does not say when to use this tool versus alternatives like get_products or get_product_attributes, and there's no exclusion guidance beyond the parameter hint.

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