Skip to main content
Glama

health_check

Verify WebSim API connectivity to ensure the service is operational and accessible for project browsing, content discovery, and community interactions.

Instructions

Check if the WebSim API is accessible

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'health_check' tool. It attempts to make a GET request to the WebSim API's projects endpoint to verify connectivity. Returns a JSON response indicating 'healthy' if successful or 'unhealthy' with error details if failed.
    handler: async (args) => {
      try {
        // Try to access a simple endpoint to test connectivity
        await apiClient.makeRequest('/api/v1/projects', { method: 'GET' });
        return {
          content: [{
            type: "text",
            text: JSON.stringify({
              success: true,
              status: "healthy",
              message: "WebSim API is accessible",
              timestamp: new Date().toISOString()
            }, null, 2)
          }]
        };
      } catch (error) {
        return {
          content: [{
            type: "text",
            text: JSON.stringify({
              success: false,
              status: "unhealthy",
              message: `WebSim API is not accessible: ${error.message}`,
              timestamp: new Date().toISOString()
            }, null, 2)
          }]
        };
      }
    }
  • server.js:1079-1115 (registration)
    The 'health_check' tool registration within the tools array used by the MCP server for listing and calling tools.
    {
      name: "health_check",
      description: "Check if the WebSim API is accessible",
      inputSchema: {
        type: "object",
        properties: {}
      },
      handler: async (args) => {
        try {
          // Try to access a simple endpoint to test connectivity
          await apiClient.makeRequest('/api/v1/projects', { method: 'GET' });
          return {
            content: [{
              type: "text",
              text: JSON.stringify({
                success: true,
                status: "healthy",
                message: "WebSim API is accessible",
                timestamp: new Date().toISOString()
              }, null, 2)
            }]
          };
        } catch (error) {
          return {
            content: [{
              type: "text",
              text: JSON.stringify({
                success: false,
                status: "unhealthy",
                message: `WebSim API is not accessible: ${error.message}`,
                timestamp: new Date().toISOString()
              }, null, 2)
            }]
          };
        }
      }
    }
  • The input schema for the 'health_check' tool, which requires no parameters (empty object).
    inputSchema: {
      type: "object",
      properties: {}
    },
  • The makeRequest method of WebSimAPIClient class, used by the health_check handler to perform the API connectivity test.
    async makeRequest(endpoint, options = {}) {
      const url = `${this.baseURL}${endpoint}`;
      
      try {
        const controller = new AbortController();
        const timeoutId = setTimeout(() => controller.abort(), this.timeout);
        
        const response = await fetch(url, {
          ...options,
          signal: controller.signal,
          headers: {
            'Content-Type': 'application/json',
            ...options.headers
          }
        });
        
        clearTimeout(timeoutId);
        
        if (!response.ok) {
          throw new Error(`HTTP ${response.status}: ${response.statusText}`);
        }
        
        return await response.json();
      } catch (error) {
        if (error.name === 'AbortError') {
          throw new Error(`Request timeout after ${this.timeout}ms`);
        }
        throw new Error(`API request failed: ${error.message}`);
      }
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'Check' implies a read-only operation, it doesn't specify what 'accessible' means (e.g., network connectivity, authentication status, service health), what the response format might be, or any error conditions. This leaves significant behavioral gaps.

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 that states the core purpose without any wasted words. It's perfectly front-loaded and appropriately sized for a simple health check tool.

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?

For a zero-parameter health check tool with no output schema, the description is minimally adequate. It states what the tool does but lacks details about what constitutes 'accessible' or what the response contains. Given the simplicity of the tool, it's complete enough to be functional but could be more informative.

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 zero parameters, and the input schema has 100% description coverage (though empty). The description appropriately doesn't discuss parameters, which is correct for a no-parameter tool, earning a high baseline score.

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 with a specific verb ('Check') and resource ('WebSim API accessibility'), making it immediately understandable. However, it doesn't explicitly differentiate from sibling tools, which are all data retrieval operations, so it falls short of 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, timing considerations, or how it differs from the many sibling data-fetching tools, leaving the agent with no usage context.

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/gigachadtrey/websimm'

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