MCPcopy
hub / github.com/apache/answer / ensureMCPEnabled

Method ensureMCPEnabled

internal/controller/mcp_controller.go:82–87  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

80}
81
82func (c *MCPController) ensureMCPEnabled(ctx context.Context) error {
83 if c.featureToggleSvc == nil {
84 return nil
85 }
86 return c.featureToggleSvc.EnsureEnabled(ctx, feature_toggle.FeatureMCP)
87}
88
89func (c *MCPController) MCPQuestionsHandler() func(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) {
90 return func(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) {

Callers 8

MCPQuestionsHandlerMethod · 0.95
MCPAnswersHandlerMethod · 0.95
MCPCommentsHandlerMethod · 0.95
MCPTagsHandlerMethod · 0.95
MCPTagDetailsHandlerMethod · 0.95
MCPUserDetailsHandlerMethod · 0.95

Calls 1

EnsureEnabledMethod · 0.80

Tested by

no test coverage detected