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
| Name | Required | Description | Default |
|---|---|---|---|
| cookies | Yes | Cookie 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"], }, },
- src/server.ts:882-893 (handler)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.", }, ], }; }
- src/nextauth.ts:35-42 (helper)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, }); }