Skip to main content
Glama
martin-1103
by martin-1103

health_check

Verify the operational status of the GASSAPI MCP server to ensure it's running correctly and ready for API management tasks.

Instructions

Check if the MCP server is running properly

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The asynchronous handler function that executes the health_check tool logic. It computes server uptime, memory usage, lists available tools, and returns a formatted status response or error.
    [healthCheckTool.name]: async (args: Record<string, any>) => {
      try {
        const uptime = process.uptime();
        const memory = process.memoryUsage();
    
        const status = {
          server: 'GASSAPI MCP Client',
          version: '1.0.0',
          status: 'healthy',
          timestamp: new Date().toISOString(),
          uptime: uptime,
          memory: memory,
          tools: ALL_TOOLS.map(t => t.name),
          migration_status: 'Refactoring Complete - Modular Structure Implemented'
        };
    
        return {
          content: [
            {
              type: 'text',
              text: `✅ GASSAPI MCP Server Status\n\n${JSON.stringify(status, null, 2)}`
            }
          ]
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: `❌ Health check failed: ${error instanceof Error ? error.message : 'Unknown error'}`
            }
          ],
          isError: true
        };
      }
    }
  • The tool definition including name, description, and input schema (empty object). Used in ALL_TOOLS export.
    export const healthCheckTool: McpTool = {
      name: 'health_check',
      description: 'Check if the MCP server is running properly',
      inputSchema: {
        type: 'object',
        properties: {}
      }
    };
  • src/server.ts:90-97 (registration)
    Registers the health_check handler via createAllToolHandlers() into toolHandlers map and registers the tool object from ALL_TOOLS into the server's tools Map and availableTools array.
    this.toolHandlers = createAllToolHandlers();
    
    // Initialize tools immediately for consistency
    ALL_TOOLS.forEach(tool => {
      this.tools.set(tool.name, tool);
    });
    this.availableTools = ALL_TOOLS;
    this.toolsLoaded = true;
  • src/server.ts:134-152 (registration)
    Fallback registration in case of tool loading error: defines a minimal healthCheckTool and registers it exclusively to ensure server functionality.
    const healthCheckTool = {
      name: 'health_check',
      description: 'Check if the MCP server is running properly',
      inputSchema: {
        type: 'object',
        properties: {}
      }
    };
    
    this.tools.clear();
    this.tools.set(healthCheckTool.name, healthCheckTool);
    this.availableTools = [healthCheckTool];
    this.toolsLoaded = true;
    
    logger.warn('Using fallback tool registration', {
      toolsCount: this.tools.size,
      tools: Array.from(this.tools.keys()),
      module: 'McpServer'
    });
  • Legacy or alternative handler method in McpServer class (not actively used in toolHandlers routing). Provides similar health check logic.
    private async handleHealthCheck(args: Record<string, any>): Promise<any> {
      try {
        const uptime = (Date.now() - this.startTime) / 1000;
        const memory = process.memoryUsage();
    
        // Ensure tools are loaded
        await this.ensureToolsLoaded();
    
        const status = {
          server: 'GASSAPI MCP Client',
          version: '1.0.0',
          status: 'healthy',
          timestamp: new Date().toISOString(),
          uptime: uptime,
          memory: memory,
          tools: Array.from(this.tools.keys()),
          migration_status: 'Step 1 - Core Framework Migrated'
        };
    
        return {
          content: [
            {
              type: 'text',
              text: `✅ GASSAPI MCP Server Status\n\n${JSON.stringify(status, null, 2)}`
            }
          ]
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: `❌ Health check failed: ${error instanceof Error ? error.message : 'Unknown error'}`
            }
          ],
          isError: true
        };
      }
    }
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 the tool's behavior as a diagnostic check, which is useful, but lacks details like what 'properly' entails (e.g., connectivity, status codes), response format, or error handling. This is a minimal but adequate disclosure for a simple tool.

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, efficient sentence that front-loads the core purpose without any wasted words. It's appropriately sized for a simple, no-parameter tool and earns its place by clearly stating the action and target.

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 params, no output schema, no annotations), the description is complete enough for basic use. However, it could benefit from slightly more context on what 'running properly' means or expected outputs, but it's largely adequate for this simple diagnostic function.

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 input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description doesn't add param info, which is fine here, but it could hint at implicit inputs (e.g., server context). Baseline is 4 for zero params, as it doesn't compensate but doesn't need to.

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 ('Check') and resource ('MCP server') with the explicit purpose of verifying if it's 'running properly'. It distinguishes itself from all sibling tools, which are focused on CRUD operations for endpoints, environments, flows, folders, and project context, making this a unique diagnostic tool.

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

Usage Guidelines4/5

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

The description implies usage context—when you need to verify server health—but doesn't explicitly state when not to use it or name alternatives. Given that all siblings are unrelated (e.g., create_endpoint, execute_flow), the context is clear, but no exclusions or direct comparisons are provided.

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/martin-1103/mcp2'

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