health_check
Verify the operational status and accessibility of your SAP Commerce Cloud instance to ensure system availability.
Instructions
Check if the Hybris instance is healthy and reachable
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/hybris-client.ts:538-555 (handler)Core implementation of the health_check tool. Performs a lightweight product search to verify Hybris instance connectivity and returns health status with details.async healthCheck(): Promise<{ healthy: boolean; details: Record<string, unknown> }> { try { // Test connectivity via a simple product search const result = await this.searchProducts('', 1, 0); return { healthy: true, details: { baseSiteId: this.config.baseSiteId, totalProducts: result.pagination?.totalResults ?? 'unknown', }, }; } catch (error) { return { healthy: false, details: { error: error instanceof Error ? error.message : 'Unknown error' }, }; } }
- src/index.ts:254-261 (registration)Registers the 'health_check' tool in the MCP tools list, including its name, description, and empty input schema.{ name: 'health_check', description: 'Check if the Hybris instance is healthy and reachable', inputSchema: { type: 'object', properties: {}, }, },
- src/index.ts:367-369 (handler)Dispatches calls to the 'health_check' tool by invoking the hybrisClient.healthCheck() method within the main MCP tool request handler.case 'health_check': result = await hybrisClient.healthCheck(); break;
- src/index.ts:257-260 (schema)Defines the input schema for the 'health_check' tool (no required parameters). Also note the output type defined in the handler signature.inputSchema: { type: 'object', properties: {}, },