Skip to content

Conversation

@adamoutler
Copy link
Collaborator

@adamoutler adamoutler commented Feb 3, 2026

  • Add sessions/totals/named endpoint
    • Operates similar to the device/totals/named
    • Completes the transformation to self-describing APIs
  • Expose OpenAPI as a resource for MCP allowing for more information
  • Enhance skills for initializing the MCP within development environments

Summary by CodeRabbit

  • New Features

    • Added new API endpoint for named event totals with enhanced field accessibility
    • API specification now available as a Model Context Protocol resource
  • Documentation

    • Updated devcontainer management guidance to include testing and command execution
    • Added Model Context Protocol activation documentation for development environments
  • Deprecations

    • Existing event totals endpoint marked as deprecated; migrate to the new named variant

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 3, 2026

📝 Walkthrough

Walkthrough

This pull request expands the NetAlertX AI integration capabilities by adding MCP Activation skill documentation, introducing a new /sessions/totals/named API endpoint with a structured response model, deprecating the existing /sessions/totals endpoint, enhancing MCP resource listing to expose the OpenAPI specification, and updating devcontainer management skill guidance.

Changes

Cohort / File(s) Summary
Skill Documentation
.gemini/skills/devcontainer-management/SKILL.md, .gemini/skills/mcp-activation/SKILL.md, .github/skills/mcp-activation/SKILL.md
Added new MCP Activation skill documentation describing how to expose Model Context Protocol server to AI agents. Updated devcontainer management skill guidance to include "running commands, testing" alongside existing scope.
API Endpoint & Schema
server/api_server/api_server_start.py, server/api_server/openapi/schemas.py
Introduced new GET /sessions/totals/named endpoint with named field response structure (EventsTotalsNamedResponse). Deprecated existing /sessions/totals endpoint. Added EventsTotalsNamedResponse schema containing total, sessions, missing, voided, new, and down fields.
MCP Resource Handling
server/api_server/mcp_endpoint.py
Extended MCP resource enumeration to recognize and expose OpenAPI specification as a readable resource (netalertx://api/openapi.json), enabling AI agents to access the API schema.

Possibly related PRs

  • netalertx/NetAlertX#1480: Adds complementary named totals response models and modifies the same API server and OpenAPI schema files.

Poem

🐰 A skill for agents to comprehend,
MCP paths now twist and bend,
Named totals dance with graceful fields,
What wondrous API access yields!
The schema sings, the endpoints gleam,
NetAlertX achieves its dream! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'MCP Enhancements: Named Totals, OpenAPI Resource, and Dev Skills' accurately summarizes all three main changes: the new named totals endpoint, OpenAPI resource exposure, and dev skills enhancements.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jokob-sk jokob-sk merged commit 7cb1728 into netalertx:main Feb 3, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants