Skip to main content
Glama

clear_cache

Clear cache in SAP Commerce Cloud (Hybris) to resolve data inconsistencies and improve system performance. Specify a cache type or clear all caches.

Instructions

Clear the Hybris cache

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cacheTypeNoSpecific cache type to clear (optional, clears all if not specified)

Implementation Reference

  • The core handler function that executes the cache clearing logic by POSTing to the Hybris Administration Console (HAC) cache clear endpoint, optionally for a specific cache type.
    async clearCache(cacheType?: string): Promise<{ success: boolean; message: string }> { const endpoint = cacheType ? `${this.hacPrefix}/monitoring/cache/clear/${cacheType}` : `${this.hacPrefix}/monitoring/cache/clear`; const formData = new URLSearchParams(); return this.hacRequest<{ success: boolean; message: string }>( endpoint, { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', }, body: formData, } ); }
  • The tool registration including name, description, and input schema definition for the clear_cache tool.
    { name: 'clear_cache', description: 'Clear the Hybris cache', inputSchema: { type: 'object', properties: { cacheType: { type: 'string', description: 'Specific cache type to clear (optional, clears all if not specified)', }, }, }, },
  • src/index.ts:351-353 (registration)
    The switch case in the MCP CallToolRequest handler that routes clear_cache calls to the hybrisClient.clearCache method.
    case 'clear_cache': result = await hybrisClient.clearCache(args?.cacheType as string | undefined); break;

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