Skip to main content
Glama

test_calendar_endpoints

Validate personal and school calendar endpoints by specifying date ranges to ensure accurate data retrieval and functionality in the N Lobby MCP Server environment.

Instructions

Test both personal and school calendar endpoints

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
from_dateNoStart date in YYYY-MM-DD format (optional). If only from_date is provided, it will be treated as a single day.
to_dateNoEnd date in YYYY-MM-DD format (optional). Must be at least 1 day after from_date when both are provided.

Implementation Reference

  • src/server.ts:293-311 (registration)
    Registration of the 'test_calendar_endpoints' tool including its name, description, and input schema definition in the ListToolsRequestSchema handler.
    { name: "test_calendar_endpoints", description: "Test both personal and school calendar endpoints", inputSchema: { type: "object", properties: { from_date: { type: "string", description: "Start date in YYYY-MM-DD format (optional). If only from_date is provided, it will be treated as a single day.", }, to_date: { type: "string", description: "End date in YYYY-MM-DD format (optional). Must be at least 1 day after from_date when both are provided.", }, }, }, },
  • The main handler for the 'test_calendar_endpoints' tool. It processes input arguments to create a date range, calls the underlying API's testCalendarEndpoints method, formats a detailed test report showing success/failure status and event counts for both personal and school calendars, and handles errors gracefully.
    case "test_calendar_endpoints": try { const { from_date, to_date } = args as { from_date?: string; to_date?: string; }; // Create date range if provided let dateRange; if (from_date && to_date) { dateRange = this.api.createDateRange(from_date, to_date); } else if (from_date) { // Single day range dateRange = this.api.createSingleDayRange(from_date); } const testResults = await this.api.testCalendarEndpoints(dateRange); const reportLines = [ "[TEST] Calendar Endpoints Test Results", "=".repeat(40), "", `[DATE] Test Period: ${ dateRange ? `${dateRange.from.toDateString()} to ${dateRange.to.toDateString()}` : "Current week (default)" }`, "", "[PERSONAL] Personal Calendar:", ` Status: ${testResults.personal.success ? "[SUCCESS] Success" : "[ERROR] Failed"}`, ` Events: ${testResults.personal.count}`, testResults.personal.error ? ` Error: ${testResults.personal.error}` : "", "", "[SCHOOL] School Calendar:", ` Status: ${testResults.school.success ? "[SUCCESS] Success" : "[ERROR] Failed"}`, ` Events: ${testResults.school.count}`, testResults.school.error ? ` Error: ${testResults.school.error}` : "", "", "[STATUS] Summary:", ` Total Endpoints: 2`, ` Successful: ${ (testResults.personal.success ? 1 : 0) + (testResults.school.success ? 1 : 0) }`, ` Failed: ${ (testResults.personal.success ? 0 : 1) + (testResults.school.success ? 0 : 1) }`, ` Total Events: ${testResults.personal.count + testResults.school.count}`, ]; return { content: [ { type: "text", text: reportLines.filter(Boolean).join("\n"), }, ], }; } catch (error) { return { content: [ { type: "text", text: `Error testing calendar endpoints: ${ error instanceof Error ? error.message : "Unknown error" }\n\nTo authenticate:\n1. Login to N Lobby in your browser\n2. Open Developer Tools (F12)\n3. Go to Application/Storage tab\n4. Copy cookies and use the set_cookies tool\n5. Use health_check to verify connection`, }, ], }; }

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