Skip to main content
Glama
Emenowicz

Hybris MCP Server

by Emenowicz

get_categories

Retrieve the product catalog's category tree structure for navigation and organization purposes.

Instructions

Get the category tree from the product catalog

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function that fetches the category tree from the Hybris OCC REST API endpoint and returns the subcategories array.
    async getCategories(): Promise<Category[]> {
      const result = await this.request<{ subcategories: Category[] }>(
        `/rest/v2/${encodeURIComponent(this.config.baseSiteId!)}/catalogs/${encodeURIComponent(this.config.catalogId!)}/${encodeURIComponent(this.config.catalogVersion!)}/categories`
      );
      return result.subcategories || [];
    }
  • Tool registration including name, description, and empty input schema (no parameters required). Serves as both schema definition and registration in the tools list.
    {
      name: 'get_categories',
      description: 'Get the category tree from the product catalog',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • Type definition for Category used in the getCategories return type.
    export interface Category {
      id: string;
      name: string;
      subcategories?: Category[];
    }
  • src/index.ts:385-387 (registration)
    Dispatch/registration in the tool call switch statement that invokes the handler.
    case 'get_categories':
      result = await hybrisClient.getCategories();
      break;
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but offers minimal information. It states what the tool does but doesn't describe how it behaves: no mention of response format (e.g., tree structure, JSON hierarchy), performance characteristics, error conditions, or whether it's idempotent. For a read operation with zero annotation coverage, this leaves significant gaps in understanding the tool's behavior.

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?

The description is a single, efficient sentence that communicates the core purpose without unnecessary words. It's front-loaded with the essential information ('Get the category tree') and specifies the source ('from the product catalog'). Every word earns its place, making it maximally concise while remaining clear.

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?

Given the tool's simplicity (zero parameters, no output schema, no annotations), the description is minimally adequate. It tells the agent what the tool does but doesn't provide enough context about the return value format or how the category tree is structured. For a tool that presumably returns hierarchical data, more information about the output would be helpful, though the absence of an output schema means the description should ideally compensate more than it does.

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?

The tool has zero parameters, and the input schema has 100% description coverage (though empty). The description appropriately doesn't discuss parameters since none exist. It correctly focuses on the tool's purpose rather than attempting to document non-existent inputs, earning a high baseline score for parameter semantics in this specific case.

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 clearly states the action ('Get') and resource ('category tree from the product catalog'), making the tool's purpose immediately understandable. It distinguishes itself from siblings like 'get_category' (singular) by implying it retrieves the entire hierarchical structure rather than a single category. However, it doesn't explicitly contrast with other catalog-related tools like 'search_products' or 'trigger_catalog_sync'.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when this tool is appropriate compared to 'get_category' (for individual categories), 'search_products' (for product-focused queries), or 'trigger_catalog_sync' (for updating catalog data). There's also no indication of prerequisites, dependencies, or typical use cases.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Emenowicz/hybris-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server