Skip to main content
Glama
grahama1970

Claude Code MCP Enhanced

by grahama1970

health

Monitor health status, version details, and configuration of the Claude Code MCP server for real-time insights and system maintenance.

Instructions

Returns health status, version information, and current configuration of the Claude Code MCP server.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for the 'health' tool call. Verifies Claude CLI availability, gathers package version, environment config, system resources, and returns formatted JSON health status.
    // Handle health check tool
    if (toolName === 'health') {
      // Check if Claude CLI is accessible
      let claudeCliStatus = 'unknown';
      try {
        const { stdout } = await spawnAsync('/bin/bash', [this.claudeCliPath, '--version'], { timeout: 5000 });
        claudeCliStatus = 'available';
      } catch (error) {
        claudeCliStatus = 'unavailable';
      }
    
      // Collect and return system information
      const healthInfo = {
        status: 'ok',
        version: this.packageVersion,
        claudeCli: {
          path: this.claudeCliPath,
          status: claudeCliStatus
        },
        config: {
          debugMode,
          heartbeatIntervalMs,
          executionTimeoutMs,
          useRooModes,
          maxRetries,
          retryDelayMs
        },
        system: {
          platform: os.platform(),
          release: os.release(),
          arch: os.arch(),
          cpus: os.cpus().length,
          memory: {
            total: Math.round(os.totalmem() / (1024 * 1024)) + 'MB',
            free: Math.round(os.freemem() / (1024 * 1024)) + 'MB'
          },
          uptime: Math.round(os.uptime() / 60) + ' minutes'
        },
        timestamp: new Date().toISOString()
      };
      
      // Health check request completed, remove from tracking
      this.activeRequests.delete(requestId);
      debugLog(`[Debug] Health check request ${requestId} completed`);
    
      return { content: [{ type: 'text', text: JSON.stringify(healthInfo, null, 2) }] };
  • src/server.ts:290-298 (registration)
    Registration of the 'health' tool in the ListToolsRequestSchema response, defining its name, description, and empty input schema (no parameters required).
    {
      name: 'health',
      description: 'Returns health status, version information, and current configuration of the Claude Code MCP server.',
      inputSchema: {
        type: 'object',
        properties: {},
        required: [],
      },
    },
  • Input schema for the 'health' tool: an empty object (no input parameters). Note: schema is defined inline within the tool registration.
    inputSchema: {
      type: 'object',
      properties: {},
      required: [],
    },
Behavior3/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. It discloses that the tool returns health status, version, and configuration, which gives basic behavioral context. However, it lacks details on potential side effects, error handling, or performance characteristics, which would be useful for a monitoring tool. The description does not contradict any annotations.

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, well-structured sentence that efficiently conveys the tool's purpose without any wasted words. It is front-loaded with the key action ('Returns') and clearly lists the returned information, making it easy to understand at a glance.

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

Completeness4/5

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

Given the tool's low complexity (0 parameters, no output schema, no annotations), the description is complete enough for its purpose. It explains what the tool returns, which is adequate for a simple health-check tool. However, without an output schema, adding a hint about the return format could slightly improve completeness.

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 is no need for parameter documentation in the description. The baseline for 0 parameters is 4, as the description appropriately omits parameter details and focuses on the tool's purpose, which is sufficient given the lack of inputs.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific verb ('Returns') and resource ('health status, version information, and current configuration of the Claude Code MCP server'), distinguishing it from sibling tools like 'claude_code' and 'convert_task_markdown' which likely perform different functions. It precisely defines what the tool does without being vague or tautological.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context by specifying it returns server health and configuration, suggesting it should be used for monitoring or diagnostic purposes. However, it does not explicitly state when to use this tool versus alternatives or provide any exclusions, leaving some ambiguity about its specific application scenarios.

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

Related 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/grahama1970/claude-code-mcp-enhanced'

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