get_news_detail
Retrieve detailed information for a specific news article from the N Lobby school portal, including content and optional read status updates.
Instructions
Retrieve detailed information for a specific news article
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| newsId | Yes | The ID of the news article to retrieve | |
| markAsRead | No | Mark the news article as read (optional, default: false) |
Implementation Reference
- src/server.ts:526-563 (handler)MCP tool handler for get_news_detail: extracts newsId and optional markAsRead, calls api.getNewsDetail, optionally marks as read, returns JSON response or error message.case "get_news_detail": try { const { newsId, markAsRead = false } = args as { newsId: string; markAsRead?: boolean; }; const newsDetail = await this.api.getNewsDetail(newsId); if (markAsRead) { try { await this.api.markNewsAsRead(newsId); } catch (markError) { logger.error( `Failed to mark news ${newsId} as read:`, markError, ); } } return { content: [ { type: "text", text: JSON.stringify(newsDetail, null, 2), }, ], }; } catch (error) { return { content: [ { type: "text", text: `Error: ${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`, }, ], }; }
- src/server.ts:184-202 (schema)Input schema for get_news_detail tool: requires newsId (string), optional markAsRead (boolean, default false).name: "get_news_detail", description: "Retrieve detailed information for a specific news article", inputSchema: { type: "object", properties: { newsId: { type: "string", description: "The ID of the news article to retrieve", }, markAsRead: { type: "boolean", description: "Mark the news article as read (optional, default: false)", default: false, }, }, required: ["newsId"], },