23 mcp server api integration - #25
Conversation
- Removed SIMPLENS_DASHBOARD_URL from server configuration. - Updated index.ts to remove references to SIMPLENS_DASHBOARD_URL. - Introduced new tools for managing admin alert channels, including listing, creating, updating, and deleting channels. - Added dashboard tools for fetching stats and trends. - Replaced resolve_alert tool with delete_alert for dismissing alerts. - Implemented notifications management tools for listing and deleting notifications. - Added template management tools for creating, updating, and deleting notification templates. - Enhanced tests to verify the registration of new tools and their functionalities.
…ation and improve code consistency
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d0a8d73752
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| async getDashboardTrends(range?: string): Promise<ApiResponse> { | ||
| return request(this.baseUrl, 'api/dashboard/trends', { | ||
| headers: this.authHeader, | ||
| params: range ? { range } : undefined, |
There was a problem hiding this comment.
Send dashboard trend period with the expected query key
When get_dashboard_trends is called with 7d or 30d, this client sends ?range=..., but the core trends endpoint reads req.query.period (see src/api/controllers/dashboard.controller.ts), so the API silently falls back to 24h and returns the wrong trend window. Map the tool's range value to the period query parameter before calling /api/dashboard/trends.
Useful? React with 👍 / 👎.
… and add parameter handling
…from 'range' to 'period'
Changes