Skip to main content
Glama

login_help

Resolve login issues and access troubleshooting guidance for the N Lobby school portal. Provide your email for personalized assistance.

Instructions

Get help and troubleshooting tips for N Lobby login

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailNoYour email address (optional, for personalized help)

Implementation Reference

  • The main execution logic for the 'login_help' tool. Parses optional email argument, validates it using CredentialManager, constructs a comprehensive help message with user-type specific guidance, troubleshooting tips, and session statistics, then returns it as text content.
    case "login_help": {
      const { email } = args as { email?: string };
    
      let helpMessage = `[LOGIN] N Lobby Login Help\n\n`;
    
      if (email) {
        const emailValidation =
          this.credentialManager.validateEmail(email);
        helpMessage += `[EMAIL] Email: ${email}\n`;
        helpMessage += `[USER] User Type: ${emailValidation.userType}\n`;
        helpMessage += `[SUCCESS] Valid: ${emailValidation.valid ? "Yes" : "No"}\n\n`;
    
        if (!emailValidation.valid) {
          helpMessage += `[ERROR] Issue: ${emailValidation.message}\n\n`;
        }
    
        helpMessage += this.credentialManager.getLoginGuidance(
          emailValidation.userType,
        );
      } else {
        helpMessage += this.credentialManager.getLoginGuidance("unknown");
      }
    
      helpMessage += `\n\n${this.credentialManager.getTroubleshootingTips()}`;
    
      // Add session stats
      const stats = this.credentialManager.getSessionStats();
      helpMessage += `\n\n[STATUS] Session Stats:\n- Active sessions: ${stats.total - stats.expired}\n- Expired sessions: ${stats.expired}`;
    
      return {
        content: [
          {
            type: "text",
            text: helpMessage,
          },
        ],
      };
    }
  • src/server.ts:418-431 (registration)
    Registers the 'login_help' tool in the MCP server's tool list, including its name, description, and input schema defining an optional 'email' parameter.
    {
      name: "login_help",
      description: "Get help and troubleshooting tips for N Lobby login",
      inputSchema: {
        type: "object",
        properties: {
          email: {
            type: "string",
            description:
              "Your email address (optional, for personalized help)",
          },
        },
      },
    },
  • Defines the input schema for the 'login_help' tool, specifying an optional string 'email' parameter.
      inputSchema: {
        type: "object",
        properties: {
          email: {
            type: "string",
            description:
              "Your email address (optional, for personalized help)",
          },
        },
      },
    },
  • Helper method called by login_help handler to validate the provided email and determine user type (student, staff, parent, or unknown) based on domain.
    validateEmail(email: string): {
      valid: boolean;
      userType: "student" | "staff" | "parent" | "unknown";
      message?: string;
    } {
      const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
    
      if (!emailRegex.test(email)) {
        return {
          valid: false,
          userType: "unknown",
          message: "Invalid email format",
        };
      }
    
      const domain = email.split("@")[1].toLowerCase();
    
      // N High School Group domains
      if (domain === "nnn.ed.jp") {
        return { valid: true, userType: "student" };
      } else if (domain === "nnn.ac.jp") {
        return { valid: true, userType: "staff" };
      } else if (
        domain === "gmail.com" ||
        domain === "yahoo.com" ||
        domain === "outlook.com" ||
        domain === "hotmail.com"
      ) {
        return { valid: true, userType: "parent" };
      } else {
        return { valid: true, userType: "parent" }; // Allow other domains for parents
      }
    }
  • Helper method providing user-type specific login instructions, used by the login_help handler to generate personalized guidance.
      getLoginGuidance(
        userType: "student" | "staff" | "parent" | "unknown",
      ): string {
        switch (userType) {
          case "student":
            return `
    [STUDENT] Student Login Guide:
    - Use your @nnn.ed.jp email address
    - Use your N High School password
    - If you have 2FA enabled, you'll need to complete it during login
    - Contact your homeroom teacher if you've forgotten your password`;
    
          case "staff":
            return `
    [STAFF] Staff Login Guide:
    - Use your @nnn.ac.jp email address
    - Use your N High School staff password
    - If you have 2FA enabled, you'll need to complete it during login
    - Contact IT support if you're having trouble accessing your account`;
    
          case "parent":
            return `
    [PARENT] Parent Login Guide:
    - Use the email address registered with your child's school account
    - Use the password you set when creating your parent account
    - If you haven't created a parent account yet, contact your child's school
    - If you've forgotten your password, use the password reset option`;
    
          default:
            return `
    [LOGIN] General Login Guide:
    - Use your registered email address
    - Use your N Lobby password
    - If you have 2FA enabled, you'll need to complete it during login
    - Contact support if you're having trouble`;
        }
      }

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