Skip to main content
Glama
Emenowicz

Hybris MCP Server

by Emenowicz

search_products

Find products in the Hybris catalog by entering a search query, with options to control page size and navigation.

Instructions

Search for products in the Hybris catalog using a query string

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query for products
pageSizeNoNumber of results per page (default: 20)
currentPageNoPage number to retrieve (0-indexed, default: 0)

Implementation Reference

  • Core handler function that performs the product search by making a request to the Hybris OCC REST API endpoint.
    async searchProducts(query: string, pageSize = 20, currentPage = 0): Promise<ProductSearchResult> {
      const params = new URLSearchParams({
        query,
        pageSize: pageSize.toString(),
        currentPage: currentPage.toString(),
        fields: 'products(code,name,description,price,stock,categories,images),pagination',
      });
    
      return this.request<ProductSearchResult>(
        `/rest/v2/${encodeURIComponent(this.config.baseSiteId!)}/products/search?${params}`
      );
    }
  • src/index.ts:104-125 (registration)
    Registration of the search_products tool in the tools list, including metadata and input schema for MCP discovery.
    {
      name: 'search_products',
      description: 'Search for products in the Hybris catalog using a query string',
      inputSchema: {
        type: 'object',
        properties: {
          query: {
            type: 'string',
            description: 'Search query for products',
          },
          pageSize: {
            type: 'number',
            description: 'Number of results per page (default: 20)',
          },
          currentPage: {
            type: 'number',
            description: 'Page number to retrieve (0-indexed, default: 0)',
          },
        },
        required: ['query'],
      },
    },
  • MCP tool dispatch handler that validates input arguments and invokes the HybrisClient searchProducts method.
    case 'search_products':
      result = await hybrisClient.searchProducts(
        validateString(args, 'query', true),
        validateNumber(args, 'pageSize', { min: 1, max: 100 }),
        validateNumber(args, 'currentPage', { min: 0 })
      );
      break;
  • TypeScript interface defining the structure of the search result output.
    export interface ProductSearchResult {
      products: Product[];
      pagination: {
        currentPage: number;
        pageSize: number;
        totalPages: number;
        totalResults: number;
      };
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions the search functionality but doesn't describe what happens when no results are found, whether the search is case-sensitive, what fields are searched, or any rate limits. For a search tool with zero annotation coverage, this leaves significant behavioral gaps.

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 states the core functionality without unnecessary words. It's appropriately sized for a straightforward search tool and gets directly to the point.

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

Completeness2/5

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

For a search tool with 3 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain what the search returns (product objects, IDs, etc.), how results are sorted, or any limitations of the search functionality. The agent would need to guess about important behavioral aspects.

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 description coverage is 100%, so the schema already documents all three parameters thoroughly. The description adds no additional parameter information beyond what's in the schema. The baseline score of 3 is appropriate when the schema does the heavy lifting for parameter documentation.

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 ('Search for products') and resource ('Hybris catalog'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'get_product' or 'flexible_search', which might offer alternative ways to retrieve product information.

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 like 'get_product' (for single product retrieval) or 'flexible_search' (which might offer more complex querying). There's no mention of prerequisites, limitations, or typical use cases beyond the basic search functionality.

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