diff --git a/pkg/http/handler.go b/pkg/http/handler.go index 4e1fbb143..c45929a20 100644 --- a/pkg/http/handler.go +++ b/pkg/http/handler.go @@ -17,14 +17,6 @@ import ( "github.com/modelcontextprotocol/go-sdk/mcp" ) -// WithSchemaCache sets a shared SchemaCache for the handler. -// This avoids repeated schema reflection when a new MCP Server is created per request. -func WithSchemaCache(cache *mcp.SchemaCache) HandlerOption { - return func(o *HandlerOptions) { - o.SchemaCache = cache - } -} - type InventoryFactoryFunc func(r *http.Request) (*inventory.Inventory, error) type GitHubMCPServerFactoryFunc func(r *http.Request, deps github.ToolDependencies, inventory *inventory.Inventory, cfg *github.MCPServerConfig) (*mcp.Server, error) @@ -83,6 +75,14 @@ func WithFeatureChecker(checker inventory.FeatureFlagChecker) HandlerOption { } } +// WithSchemaCache sets a shared SchemaCache for the handler. +// This avoids repeated schema reflection when a new MCP Server is created per request. +func WithSchemaCache(cache *mcp.SchemaCache) HandlerOption { + return func(o *HandlerOptions) { + o.SchemaCache = cache + } +} + func NewHTTPMcpHandler( ctx context.Context, cfg *ServerConfig,