Skip to main content
Glama

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
NameRequiredDescriptionDefault

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: {},
      },
    },
  • Input schema definition for the tool: empty object (no parameters required).
    inputSchema: {
      type: "object",
      properties: {},
    },
  • 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.`,
            },
          ],
        };
      }

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