Skip to main content
Glama

health_check

Verify connectivity to the N Lobby school portal API to ensure reliable access to announcements, schedules, and learning resources.

Instructions

Check if N Lobby API connection is working

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler for the 'health_check' tool. It invokes the api.healthCheck() method and formats the response indicating whether the N Lobby API connection is healthy or failed.
    case "health_check": {
      const isHealthy = await this.api.healthCheck();
      return {
        content: [
          {
            type: "text",
            text: `N Lobby API connection: ${isHealthy ? "healthy" : "failed"}`,
          },
        ],
      };
    }
  • src/server.ts:336-343 (registration)
    Registration of the 'health_check' tool in the tools list provided to MCP server, including its name, description, and input schema (empty object).
    {
      name: "health_check",
      description: "Check if N Lobby API connection is working",
      inputSchema: {
        type: "object",
        properties: {},
      },
    },
  • Input schema for the health_check tool: an empty object (no parameters required).
    inputSchema: {
      type: "object",
      properties: {},
    },
  • The core healthCheck implementation in the TrpcClient class. It tests multiple tRPC methods (updateLastAccess, getUnreadNewsCount, findMainNavigations) sequentially and returns true if any succeeds, false otherwise.
    async healthCheck(): Promise<boolean> {
      logger.info("Running tRPC health check...");
    
      // Try multiple endpoints to verify connection
      const healthCheckMethods = [
        { name: "updateLastAccess", method: () => this.updateLastAccess() },
        { name: "getUnreadNewsCount", method: () => this.getUnreadNewsCount() },
        { name: "findMainNavigations", method: () => this.findMainNavigations() },
      ];
    
      for (const { name, method } of healthCheckMethods) {
        try {
          logger.debug(`Trying tRPC method: ${name}`);
          await method();
          logger.info(`[SUCCESS] tRPC health check passed with method: ${name}`);
          return true;
        } catch (error) {
          logger.debug(
            `[ERROR] tRPC method ${name} failed:`,
            error instanceof Error ? error.message : "Unknown error",
          );
          continue;
        }
      }
    
      logger.error("[ERROR] All tRPC health check methods failed");
      return false;
    }
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 mentions checking API connectivity but doesn't elaborate on what 'working' entails (e.g., response time, status codes), potential side effects, error handling, or authentication requirements. This leaves significant gaps in understanding the tool's behavior.

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 N Lobby API connection is working'. It is front-loaded with the core action, wastes no words, and efficiently communicates the essential function without unnecessary elaboration, making it highly concise and well-structured.

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) and lack of annotations, the description is minimally adequate. It states what the tool does but omits details like expected output format, error conditions, or integration with sibling tools. For a basic connectivity check, this is passable but leaves room for improvement in contextual guidance.

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 baseline for this scenario is 4, as the description appropriately avoids redundant information while clearly stating the tool's purpose without parameter clutter.

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 N Lobby API connection is working'. It specifies the action ('Check') and the target ('N Lobby API connection'), making the intent unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'debug_connection' or 'verify_authentication', which prevents 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. With siblings like 'debug_connection', 'test_calendar_endpoints', and 'verify_authentication', there's no indication of specific contexts, prerequisites, or exclusions for 'health_check'. This lack of comparative guidance limits its utility for an AI agent.

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/minagishl/nlobby-cli'

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