health_check
Verify SAP Commerce Cloud instance availability and operational status to ensure system connectivity and functionality.
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:849-866 (handler)Core handler function that executes the health check logic by attempting a product search to verify Hybris instance connectivity and health.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:323-330 (registration)Registration of the 'health_check' tool in the MCP tools list, including name, description, and input schema.{ name: 'health_check', description: 'Check if the Hybris instance is healthy and reachable', inputSchema: { type: 'object', properties: {}, }, },
- src/index.ts:326-329 (schema)Input schema definition for the health_check tool (empty object, no parameters required).inputSchema: { type: 'object', properties: {}, },
- src/index.ts:462-464 (handler)MCP server handler dispatch for 'health_check' tool, which calls the HybrisClient healthCheck method.case 'health_check': result = await hybrisClient.healthCheck(); break;