Skip to main content
Glama
cortezcristian

Kubecost MCP Server

health_check

Verify the operational status and accessibility of the Kubecost API to ensure the cost management platform is functioning correctly.

Instructions

Check if Kubecost API is healthy and accessible

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Primary MCP tool handler and registration for 'health_check'. Calls kubecostClient.healthCheck() and formats the response as text.
    this.tool( 'health_check', 'Check if Kubecost API is healthy and accessible', {}, async () => { try { const isHealthy = await this.kubecostClient.healthCheck(); return { isError: false, content: [{ type: 'text', text: isHealthy ? 'Kubecost API is healthy and accessible' : 'Kubecost API is not accessible' }] }; } catch (error) { return { isError: true, content: [{ type: 'text', text: error instanceof Error ? error.message : String(error) }] }; } } );
  • Core helper function that performs the actual health check by querying the Kubecost /healthz endpoint.
    async healthCheck(): Promise<boolean> { try { await this.client.get('/healthz'); return true; } catch (error) { return false; } }
  • Tool schema definition for health_check (no inputs required), though not used in main registration.
    health_check: { description: 'Check if Kubecost API is healthy and accessible', inputSchema: { type: 'object', properties: {}, required: [], }, },
  • Alternative handler implementation in cost-tools module (switch case in handleCostToolCall).
    case 'health_check': { const isHealthy = await kubecostClient.healthCheck(); return { content: [ { type: 'text', text: isHealthy ? 'Kubecost API is healthy and accessible' : 'Kubecost API is not accessible', }, ], }; }
  • Inline empty schema for health_check tool in main registration (no input parameters).
    {},

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/cortezcristian/kubecost-mcp'

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