-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
Description
Part of: #477
Story: Analytics & Monitoring Tools for MCP
Feature Group: F10 - Analytics & Monitoring (NEW)
📖 Story Overview
User Story
As a Claude.ai user, I want to access repository analytics and job monitoring through MCP so that I can understand codebase composition and monitor async operations without leaving the AI interface.
Objective
Expose 4 production-ready analytics and monitoring capabilities through MCP tools, enabling AI assistants to provide contextual insights about repository composition, health status, and operational monitoring.
User Value
- 📊 Repository Analytics: Understand codebase composition (languages, file counts, storage)
- 🖥️ Job Monitoring: Track async operations (activation, sync, indexing) with real-time status
- 🗂️ Multi-Repo Dashboard: Monitor all activated repositories from single view
- 🔗 Composite Repos: Manage multi-repository aggregation workflows
✅ Backend Status: 100% COMPLETE ✅
ALL 4 tools have complete, production-ready backend implementations:
- Tool [EPIC] Daemon Temporal Watch Integration #19:
get_repository_statistics→GET /api/repositories/{repo_id}/stats✅ - Tool [EPIC] Temporal Git History Semantic Search #20:
get_job_statistics→GET /api/admin/jobs/stats✅ - Tool [STORY] Implement POC Test Framework #21:
get_all_repositories_status→GET /api/repos/status✅ - Tool [STORY] Async Display Worker #22:
manage_composite_repository→ Multiple composite operations ✅
Implementation Work Required: Thin MCP wrappers only (~2-3 hours total)
🔧 MCP Tool Specifications
Tool #19: get_repository_statistics ⭐ HIGH
- Backend:
GET /api/repositories/{repo_id}/stats - Provides: File counts by 20+ languages, storage metrics, activity info, health assessment
- Effort: 20-30 minutes
Tool #20: get_job_statistics ⭐ HIGH (Admin)
- Backend:
GET /api/admin/jobs/stats - Provides: Queue stats, resource utilization, wait times, job history
- Effort: 30 minutes (admin filtering)
Tool #21: get_all_repositories_status ⭐ HIGH
- Backend:
GET /api/repos/status - Provides: Multi-repo dashboard, aggregate health, sync status
- Effort: 20-30 minutes
Tool #22: manage_composite_repository 🔸 MEDIUM
- Backend: Multiple composite operations
- Provides: Multi-repo aggregation, unified browsing, component-aware paths
- Effort: 60 minutes (action routing)
📋 Implementation Checklist
Tool Implementation (~2-3 hours total)
- Tool [EPIC] Daemon Temporal Watch Integration #19: get_repository_statistics (20-30 min)
- Tool [EPIC] Temporal Git History Semantic Search #20: get_job_statistics (30 min, admin filtering)
- Tool [STORY] Implement POC Test Framework #21: get_all_repositories_status (20-30 min)
- Tool [STORY] Async Display Worker #22: manage_composite_repository (60 min, action routing)
MCP Registry Updates
- Add 4 new tool definitions to registry
- Define JSON schemas for all 4 tools
- Implement admin-only filtering for Tool [EPIC] Temporal Git History Semantic Search #20
- Update tool count: 18 → 22
Testing
- Unit tests for all 4 wrappers
- Integration tests with MCP client
- Admin permission test for Tool [EPIC] Temporal Git History Semantic Search #20
- Composite repository workflow test
📊 Definition of Done
- All 4 MCP tools implemented and tested
- Admin-only filtering working for Tool [EPIC] Temporal Git History Semantic Search #20
- Composite repository support validated
- All unit tests passing (>85% coverage)
- Integration tests passing
- Documentation complete
- Tool registry updated (22 tools)
Story Metadata:
- Type: Feature
- Priority: 2 (Medium-High)
- Points: 2
- Components: MCP, Analytics, Monitoring
- Dependencies: Story [STORY] MCP Protocol Foundation and Tool Registry #479 (MCP Protocol Foundation)
- Backend Status: 100% complete ✅
- Implementation: Thin wrappers only