Skip to main content
Glama

set_cookies

Configure authentication cookies to enable secure access to N Lobby school portal data, including announcements, schedules, and learning resources.

Instructions

Set authentication cookies for N Lobby access

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cookiesYesCookie string from authenticated N Lobby session

Implementation Reference

  • src/server.ts:313-327 (registration)
    Registration of the 'set_cookies' tool including name, description, and input schema requiring a 'cookies' string.
    {
      name: "set_cookies",
      description: "Set authentication cookies for N Lobby access",
      inputSchema: {
        type: "object",
        properties: {
          cookies: {
            type: "string",
            description:
              "Cookie string from authenticated N Lobby session",
          },
        },
        required: ["cookies"],
      },
    },
  • MCP tool handler for 'set_cookies': extracts cookies from input arguments, calls api.setCookies(cookies), and returns success message.
    case "set_cookies": {
      const { cookies } = args as { cookies: string };
      this.api.setCookies(cookies);
      return {
        content: [
          {
            type: "text",
            text: "Authentication cookies have been set. You can now access real N Lobby data.",
          },
        ],
      };
    }
  • NextAuthHandler.setCookies method parses the provided cookie string into sessionToken, csrfToken, and callbackUrl using parseCookies.
    setCookies(cookieString: string): void {
      this.cookies = this.parseCookies(cookieString);
      logger.debug("NextAuth cookies parsed:", {
        hasSessionToken: !!this.cookies.sessionToken,
        hasCsrfToken: !!this.cookies.csrfToken,
        hasCallbackUrl: !!this.cookies.callbackUrl,
      });
    }

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