get_student_card_screenshot
Capture a screenshot of your student ID card through the N Lobby school portal's secure authentication flow.
Instructions
Capture a screenshot of the student ID card by following the secure portal redirect flow
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server.ts:213-221 (registration)Tool registration entry in ListToolsRequestSchema handler, defining the tool name, description, and input schema (empty object).{ name: "get_student_card_screenshot", description: "Capture a screenshot of the student ID card by following the secure portal redirect flow", inputSchema: { type: "object", properties: {}, }, },
- src/server.ts:217-220 (schema)Input schema definition for the tool: empty object (no parameters required).inputSchema: { type: "object", properties: {}, },
- src/server.ts:588-627 (handler)MCP CallToolRequestSchema handler for get_student_card_screenshot. Calls this.api.getStudentCardScreenshot() to get the screenshot data, returns text metadata and base64 PNG image content, with error handling.case "get_student_card_screenshot": try { const result = await this.api.getStudentCardScreenshot(); return { content: [ { type: "text", text: JSON.stringify( { message: "Student card screenshot captured successfully. Image data attached as base64.", filePath: result.path, studentNo: result.studentNo, secureHost: result.secureHost, callbackUrl: result.callbackUrl, finalUrl: result.finalUrl, elementSize: result.elementSize, }, null, 2, ), }, { type: "image", mimeType: "image/png", data: result.base64, }, ], }; } catch (error) { return { content: [ { type: "text", text: `Error capturing student card screenshot: ${error instanceof Error ? error.message : "Unknown error"}\n\nPlease verify authentication (set_cookies or interactive_login) and ensure the student portal is accessible.`, }, ], }; }