Skip to main content
Glama

verify_authentication

Check authentication status and synchronize cookies across all clients to maintain secure access to the N Lobby school portal.

Instructions

Verify authentication status and cookie synchronization across all clients

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'verify_authentication' tool. It retrieves the authentication status from the API and appends recommendations generated by getAuthenticationRecommendations().
    case "verify_authentication": {
      const authStatus = this.api.getCookieStatus();
      return {
        content: [
          {
            type: "text",
            text: `[INFO] Authentication Verification Report\n\n${authStatus}\n\n[LOG] Recommendations:\n${this.getAuthenticationRecommendations()}`,
          },
        ],
      };
    }
  • src/server.ts:399-407 (registration)
    Registration of the 'verify_authentication' tool in the ListToolsRequestSchema handler, including its name, description, and empty input schema.
    {
      name: "verify_authentication",
      description:
        "Verify authentication status and cookie synchronization across all clients",
      inputSchema: {
        type: "object",
        properties: {},
      },
    },
  • Helper method called by the tool handler to generate specific recommendations based on the current authentication status.
    private getAuthenticationRecommendations(): string {
      const authStatus = this.api.getCookieStatus();
      const recommendations = [];
    
      // Check if no authentication is present
      if (
        authStatus.includes("[ERROR] no cookies") &&
        authStatus.includes("[ERROR] not authenticated")
      ) {
        recommendations.push(
          "1. Run interactive_login to authenticate with N Lobby",
        );
        recommendations.push(
          "2. Make sure to complete the login process in the browser window",
        );
        recommendations.push(
          '3. Wait for the "Login successful" message before proceeding',
        );
      }
    
      // Check if authentication is partial
      else if (authStatus.includes("[ERROR] not synchronized")) {
        recommendations.push("1. Cookie synchronization issue detected");
        recommendations.push(
          "2. Try running interactive_login again to refresh all cookies",
        );
        recommendations.push(
          "3. Check if any network issues are preventing proper cookie setting",
        );
      }
    
      // Check if authentication is complete but endpoints are failing
      else if (
        authStatus.includes("[SUCCESS] authenticated") &&
        authStatus.includes("[SUCCESS] synchronized")
      ) {
        recommendations.push("1. Authentication appears to be working correctly");
        recommendations.push(
          "2. If endpoints are still failing, the issue may be server-side",
        );
        recommendations.push(
          "3. Try running health_check to verify connectivity",
        );
        recommendations.push("4. Check if N Lobby server is experiencing issues");
      }
    
      // Default recommendations
      else {
        recommendations.push(
          "1. Check the authentication status above for specific issues",
        );
        recommendations.push(
          "2. Run health_check to verify overall system health",
        );
        recommendations.push("3. Try get_news to test data retrieval");
      }
    
      return recommendations.join("\n");
    }
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 states what the tool does ('verify' and 'synchronization') but lacks critical details: whether this is a read-only operation, if it performs any mutations (e.g., refreshing tokens), what the output looks like (e.g., success/failure status, error messages), or any side effects (e.g., logging, rate limits). For a tool with zero annotation coverage, this is a significant gap in transparency.

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 unnecessary words. Every part ('verify authentication status', 'cookie synchronization', 'across all clients') adds value, and there is no redundancy or fluff. It's appropriately sized for a no-parameter tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (authentication/cookie verification across clients), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what 'verify' entails (e.g., checks validity, returns boolean), what 'synchronization' means (e.g., ensures consistency, reports mismatches), or the scope of 'all clients' (e.g., web/mobile, active sessions). For a tool with no structured behavioral data, more detail is needed to guide the agent effectively.

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% (though trivial since there are no parameters). The description doesn't need to explain parameters, so it meets the baseline expectation. No additional parameter information is required or provided.

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 specific verbs ('verify authentication status' and 'cookie synchronization') and identifies the resource ('across all clients'). It distinguishes from obvious siblings like 'check_cookies' (which likely checks cookie values rather than authentication status) and 'health_check' (which might be broader system health). However, it doesn't explicitly differentiate from all potential overlapping tools like 'debug_connection'.

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 (e.g., whether authentication must be initialized first), exclusions (e.g., when other tools like 'check_cookies' might be more appropriate), or specific scenarios (e.g., troubleshooting login issues vs. routine checks). The agent must infer usage from the purpose alone.

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