Skip to main content
Glama

health_check

Verify the functionality and connection status of the N Lobby API to ensure seamless access to school portal data, including schedules, announcements, and learning resources.

Instructions

Check if N Lobby API connection is working

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler for 'health_check': calls api.healthCheck() and returns health status as text content.
    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)
    Registers the 'health_check' tool in the MCP tools list with description and empty input schema.
    { name: "health_check", description: "Check if N Lobby API connection is working", inputSchema: { type: "object", properties: {}, }, },
  • Input schema for 'health_check' tool: empty object (no parameters required).
    inputSchema: { type: "object", properties: {}, },
  • Core healthCheck implementation: sequentially tests multiple tRPC methods (updateLastAccess, getUnreadNewsCount, findMainNavigations) until one succeeds, logging progress.
    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; }

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-mcp'

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