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).
    {},
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool checks health and accessibility, implying a read-only, non-destructive operation, but doesn't specify what 'healthy' means (e.g., response codes, latency), whether it requires authentication, or if it has rate limits. For a tool with zero annotation coverage, this leaves key behavioral traits unclear.

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, clear sentence: 'Check if Kubecost API is healthy and accessible.' It's front-loaded with the core purpose, has zero wasted words, and is appropriately sized for a simple tool. Every part of the sentence earns its place by defining the action and target.

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

Completeness3/5

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

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose but lacks details on behavioral aspects like what constitutes 'healthy' or output format. Without annotations or output schema, more context would be helpful, but the description meets the minimum for a straightforward health check tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and schema description coverage is 100%, so there's no need for parameter details in the description. The description appropriately avoids discussing parameters, focusing on the tool's purpose instead. A baseline of 4 is applied since no parameters exist, and the description doesn't add unnecessary information.

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 tool's purpose: 'Check if Kubecost API is healthy and accessible.' It specifies the verb ('Check') and resource ('Kubecost API'), and the health/accessibility focus distinguishes it from sibling tools that manage budgets or retrieve cost data. However, it doesn't explicitly differentiate from potential sibling health-check tools (though none are listed), keeping it from a perfect score.

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. It doesn't mention prerequisites (e.g., before performing operations like create_budget), exclusions (e.g., not for cost queries), or contextual triggers (e.g., after errors). With siblings focused on budget management and cost retrieval, the lack of usage context is a notable gap.

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

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