test_page_content
Retrieve and display sample content from the N Lobby school portal to verify data accessibility and format before integration.
Instructions
Test page content retrieval and show sample content
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| endpoint | No | Endpoint to test (default: /news) | /news |
| length | No | Number of characters to show (default: 1000) |
Implementation Reference
- src/server.ts:360-378 (registration)Registration of the 'test_page_content' tool in the listTools handler, including name, description, and input schema definition.{ name: "test_page_content", description: "Test page content retrieval and show sample content", inputSchema: { type: "object", properties: { endpoint: { type: "string", description: "Endpoint to test (default: /news)", default: "/news", }, length: { type: "number", description: "Number of characters to show (default: 1000)", default: 1000, }, }, }, },
- src/server.ts:363-377 (schema)Input schema definition for the 'test_page_content' tool, specifying optional endpoint and length parameters.inputSchema: { type: "object", properties: { endpoint: { type: "string", description: "Endpoint to test (default: /news)", default: "/news", }, length: { type: "number", description: "Number of characters to show (default: 1000)", default: 1000, }, }, },
- src/server.ts:934-951 (handler)The execution handler for the 'test_page_content' tool in the CallToolRequestSchema switch statement. It parses arguments, calls this.api.testPageContent(endpoint, length), and returns the sample content as text response.case "test_page_content": { const { endpoint: testEndpoint, length } = args as { endpoint?: string; length?: number; }; const sampleContent = await this.api.testPageContent( testEndpoint || "/news", length || 1000, ); return { content: [ { type: "text", text: `Sample content from ${testEndpoint || "/news"}:\n\n${sampleContent}\n\nThis content was retrieved after successful authentication.`, }, ], }; }