Skip to content

Conversation

@eschizoid
Copy link
Owner

No description provided.

@eschizoid eschizoid requested a review from Copilot September 5, 2025 20:50
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR separates MCP (Model Context Protocol) server capabilities from infrastructure concerns by extracting tool, prompt, and resource registration logic into dedicated files. This refactoring improves code organization and maintainability by following the single responsibility principle.

  • Extracted tool registration logic into a dedicated ToolsRegistrar.kt file
  • Separated prompt templates into PromptsRegistrar.kt
  • Moved resource endpoint definitions to ResourcesRegistrar.kt

Reviewed Changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.

File Description
ToolsRegistrar.kt Contains all MCP tool definitions (analyze-repository, check-analysis-status, cancel-analysis) extracted from main class
PromptsRegistrar.kt Houses prompt template registrations for codebase analysis and code review functionality
ResourcesRegistrar.kt Defines resource endpoints for analysis results and repository metrics
Mcp.kt Simplified by delegating registrations to dedicated registrar functions and removing unused imports

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@codecov
Copy link

codecov bot commented Sep 5, 2025

Codecov Report

❌ Patch coverage is 57.56303% with 101 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.84%. Comparing base (7ddd316) to head (3dc13ab).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
.../kotlin/mcp/code/analysis/server/ToolsRegistrar.kt 60.71% 46 Missing and 20 partials ⚠️
...otlin/mcp/code/analysis/server/PromptsRegistrar.kt 50.00% 21 Missing ⚠️
...lin/mcp/code/analysis/server/ResourcesRegistrar.kt 44.00% 14 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main      #23      +/-   ##
============================================
+ Coverage     56.42%   56.84%   +0.42%     
  Complexity       75       75              
============================================
  Files             8       11       +3     
  Lines           872      876       +4     
  Branches        115      115              
============================================
+ Hits            492      498       +6     
+ Misses          336      334       -2     
  Partials         44       44              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@eschizoid eschizoid merged commit 3171d6f into main Sep 5, 2025
4 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