Add filtering functionality to server list endpoint (#374)
## Summary - Adds `updated_since`, `search`, and `version` query parameters to `GET /v0/servers` - Enables incremental synchronization via RFC3339 timestamp filtering - Provides simple substring search on server names - Supports latest version filtering with `version=latest` This implementation provides the core filtering capabilities needed for efficient registry synchronization and improved server discovery. Fixes #291 Fixes #135
This commit is contained in:
parent
be6c2d9142
commit
a85456a9b9
1 changed files with 262 additions and 13 deletions
|
|
@ -1,13 +1,14 @@
|
|||
package service
|
||||
|
||||
import (
|
||||
"github.com/modelcontextprotocol/registry/internal/database"
|
||||
apiv0 "github.com/modelcontextprotocol/registry/pkg/api/v0"
|
||||
)
|
||||
|
||||
// RegistryService defines the interface for registry operations
|
||||
type RegistryService interface {
|
||||
// Retrieve all servers
|
||||
List(cursor string, limit int) ([]apiv0.ServerJSON, string, error)
|
||||
// Retrieve all servers with optional filtering
|
||||
List(filter *database.ServerFilter, cursor string, limit int) ([]apiv0.ServerJSON, string, error)
|
||||
// Retrieve a single server by registry metadata ID
|
||||
GetByID(id string) (*apiv0.ServerJSON, error)
|
||||
// Publish a server
|
||||
|
|
|
|||
Loading…
Reference in a new issue