Feature implementation from commits 3d695c3..4dbf805#3
Feature implementation from commits 3d695c3..4dbf805#3codeOwlAI wants to merge 15 commits intofeature-base-branch-3from
Conversation
* Update the model to handle new changes to schema based on modelcontextprotocol#33 * Made the import script a little simpler. * Add a new updated seed file * update template mcp.json file for publisher
I originally introduced `package_canonical` into the API schema because, at the time, we were thinking to "pin" the version of the MCP server to _one_ of the referenced source code packages. We are no longer doing this (we are maintaining a separate notion of `version` unique to the MCP server), so I don't believe `package_canonical` is needed anymore. Does anyone see otherwise? This change removes all mentions in READMEs and usages in code.
…tprotocol#62) <!-- Provide a brief summary of your changes --> Inline ServerDetail fields in PublishRequest ## Motivation and Context <!-- Why is this change needed? What problem does it solve? --> Fix modelcontextprotocol#55 ## How Has This Been Tested? <!-- Have you tested this in a real application? Which scenarios were tested? --> ## Breaking Changes <!-- Will users need to update their code or configurations? --> ## Types of changes <!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update ## Checklist <!-- Go over all the following points, and put an `x` in all the boxes that apply. --> - [x] I have read the [MCP Documentation](https://modelcontextprotocol.io) - [x] My code follows the repository's style guidelines - [x] New and existing tests pass locally - [x] I have added appropriate error handling - [x] I have added or updated documentation as needed ## Additional context <!-- Add any other context, implementation notes, or design decisions --> https://github.com/modelcontextprotocol/registry/blob/94c19fafa45896df4ea55fc2fd06309b42499393/scripts/test_publish.sh#L61-L102 --------- Co-authored-by: Avinash Sridhar <sridharavinash@users.noreply.github.com>
| } | ||
|
|
||
| var result []*model.Entry | ||
| var result []*model.Server |
There was a problem hiding this comment.
🐛 Correctness Issue
Type mismatch between result and filteredEntries.
Changed result type to []*model.Server but it's being assigned from filteredEntries which may still be of type []*model.Entry, causing compilation errors.
Proposed Code:
var result []*model.Server
if startIdx < len(filteredEntries) {
result = filteredEntries[startIdx:endIdx] // Type mismatch if filteredEntries is []*model.Entry
} else {
result = []*model.Server{}
}
| // Convert from []*model.Entry to []model.Entry | ||
| result := make([]model.Entry, len(entries)) | ||
| // Convert from []*model.Server to []model.Server | ||
| result := make([]model.Server, len(entries)) |
There was a problem hiding this comment.
🐛 Correctness Issue
Type Mismatch Between Signature and Implementation.
The function signature returns []model.Entry but the implementation creates []model.Server objects, which will cause compilation errors.
Current Code (Diff):
- result := make([]model.Server, len(entries))
+ result := make([]model.Entry, len(entries))📝 Committable suggestion
‼️ IMPORTANT
Trust, but verify! 🕵️ Please review this suggestion with the care of a code archaeologist - check that it perfectly replaces the highlighted code, preserves all lines, maintains proper indentation, and won't break anything in production. Your future self will thank you! 🚀
| result := make([]model.Server, len(entries)) | |
| result := make([]model.Entry, len(entries)) |
| // RegistryService defines the interface for registry operations | ||
| type RegistryService interface { | ||
| List(cursor string, limit int) ([]model.Entry, string, error) | ||
| List(cursor string, limit int) ([]model.Server, string, error) |
There was a problem hiding this comment.
🐛 Correctness Issue
Breaking Interface Change.
Changing the return type from []model.Entry to []model.Server breaks the interface contract and will cause compilation failures in all implementations and consumers.
Proposed Code:
List(cursor string, limit int) ([]model.Server, string, error)
PR Summary
Change Return Type from model.Entry to model.Server
Overview
This PR refactors the system to use model.Server instead of model.Entry as the return type across multiple services and database interactions. It also updates a function call to include a required githubClientID parameter.
Change Types
Affected Modules
database/memory.goservice/fake_service.goservice/service.gopublisher/main.goBreaking Changes
Notes for Reviewers