Skip to main content
Glama

health

Check server health status, view version details, and monitor current configuration to ensure optimal performance of the distributed AI coding network.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'health' tool call. It checks Claude CLI status, gathers server version, config, system info, and returns formatted JSON health status.
    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) }] };
    }
  • Schema definition and registration of the 'health' tool in the listTools response, with empty input schema as it takes no parameters.
    {
      name: 'health',
      description: 'Returns health status, version information, and current configuration of the Claude Code MCP server.',
      inputSchema: {
        type: 'object',
        properties: {},
        required: [],
      },
    },
  • src/server.ts:288-392 (registration)
    Registration of all tools including 'health' via setRequestHandler for ListToolsRequestSchema.
        this.server.setRequestHandler(ListToolsRequestSchema, async () => ({
          tools: [
            {
              name: 'health',
              description: 'Returns health status, version information, and current configuration of the Claude Code MCP server.',
              inputSchema: {
                type: 'object',
                properties: {},
                required: [],
              },
            },
            {
              name: 'convert_task_markdown',
              description: 'Converts markdown task files into Claude Code MCP-compatible JSON format. Returns an array of tasks that can be executed using the claude_code tool.',
              inputSchema: {
                type: 'object',
                properties: {
                  markdownPath: {
                    type: 'string',
                    description: 'Path to the markdown task file to convert.',
                  },
                  outputPath: {
                    type: 'string',
                    description: 'Optional path where to save the JSON output. If not provided, returns the JSON directly.',
                  },
                },
                required: ['markdownPath'],
              },
            },
            {
              name: 'claude_code',
              description: `Claude Code Agent: Your versatile multi-modal assistant for code, file, Git, and terminal operations via Claude CLI. Use \`workFolder\` for contextual execution.
    
    • File ops: Create, read, (fuzzy) edit, move, copy, delete, list files, analyze/ocr images, file content analysis
        └─ e.g., "Create /tmp/log.txt with 'system boot'", "Edit main.py to replace 'debug_mode = True' with 'debug_mode = False'", "List files in /src", "Move a specific section somewhere else"
    
    • Code: Generate / analyse / refactor / fix
        └─ e.g. "Generate Python to parse CSV→JSON", "Find bugs in my_script.py"
    
    • Git: Stage ▸ commit ▸ push ▸ tag (any workflow)
        └─ "Commit '/workspace/src/main.java' with 'feat: user auth' to develop."
    
    • Terminal: Run any CLI cmd or open URLs
        └─ "npm run build", "Open https://developer.mozilla.org"
    
    • Web search + summarise content on-the-fly
    
    • Multi-step workflows  (Version bumps, changelog updates, release tagging, etc.)
    
    • GitHub integration  Create PRs, check CI status
    
    • Confused or stuck on an issue? Ask Claude Code for a second opinion, it might surprise you!
    
    • Task Orchestration with "Boomerang" pattern
        └─ Break down complex tasks into subtasks for Claude Code to execute separately
        └─ Pass parent task ID and get results back for complex workflows
        └─ Specify return mode (summary or full) for tailored responses
    
    **Prompt tips**
    
    1. Be concise, explicit & step-by-step for complex tasks. No need for niceties, this is a tool to get things done.
    2. For multi-line text, write it to a temporary file in the project root, use that file, then delete it.
    3. If you get a timeout, split the task into smaller steps.
    4. **Seeking a second opinion/analysis**: If you're stuck or want advice, you can ask \`claude_code\` to analyze a problem and suggest solutions. Clearly state in your prompt that you are looking for analysis only and no actual file modifications should be made.
    5. If workFolder is set to the project path, there is no need to repeat that path in the prompt and you can use relative paths for files.
    6. Claude Code is really good at complex multi-step file operations and refactorings and faster than your native edit features.
    7. Combine file operations, README updates, and Git commands in a sequence.
    8. **Task Orchestration**: For complex workflows, use \`parentTaskId\` to create subtasks and \`returnMode: "summary"\` to get concise results back.
    9. Claude can do much more, just ask it!
    
            `,
              inputSchema: {
                type: 'object',
                properties: {
                  prompt: {
                    type: 'string',
                    description: 'The detailed natural language prompt for Claude to execute.',
                  },
                  workFolder: {
                    type: 'string',
                    description: 'Mandatory when using file operations or referencing any file. The working directory for the Claude CLI execution.',
                  },
                  parentTaskId: {
                    type: 'string',
                    description: 'Optional ID of the parent task that created this task (for task orchestration/boomerang).',
                  },
                  returnMode: {
                    type: 'string',
                    enum: ['summary', 'full'],
                    description: 'How results should be returned: summary (concise) or full (detailed). Defaults to full.',
                  },
                  taskDescription: {
                    type: 'string',
                    description: 'Short description of the task for better organization and tracking in orchestrated workflows.',
                  },
                  mode: {
                    type: 'string',
                    description: 'When MCP_USE_ROOMODES=true, specifies the mode from .roomodes to use (e.g., "boomerang-mode", "coder", "designer", etc.).',
                  },
                },
                required: ['prompt'],
              },
            }
          ],
        }));
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes the return content (health status, version, configuration) but lacks details on response format, potential errors, or operational constraints like rate limits. The description is accurate but minimal, providing basic behavioral context without depth.

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 unnecessary words. It is front-loaded with the core action ('Returns') and specifies all key details concisely, making it easy for an agent to parse and understand quickly.

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 annotations, no output schema), the description is adequate but minimal. It covers the basic purpose and return types, but lacks details on output structure or error handling. For a diagnostic tool, more context on response format would enhance completeness, though the current description meets minimum viability.

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 with 100% schema description coverage, so no parameter documentation is needed. The description appropriately omits parameter details, focusing instead on the tool's purpose and output. This aligns with the baseline expectation for zero-parameter tools.

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 action ('Returns') and the exact resources returned ('health status, version information, and current configuration'), with the target system explicitly named ('Claude Code MCP server'). It distinguishes itself from sibling tools like 'claude_code' and 'convert_task_markdown' by focusing on server diagnostics rather than code operations or markdown conversion.

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 (checking server health/configuration) but does not explicitly state when to use this tool versus alternatives. No guidance is provided on prerequisites, timing, or comparisons with sibling tools, leaving the agent to infer appropriate usage 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

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/twalichiewicz/meshseeks'

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