MCPcopy
hub / github.com/github/github-mcp-server / RegisterTools

Method RegisterTools

pkg/inventory/registry.go:217–221  ·  view source on GitHub ↗

RegisterTools registers all available tools with the server using the provided dependencies. The context is used for feature flag evaluation and client capability checks. MCP Apps UI metadata (`_meta.ui`) is stripped from the registered tools when either the MCP Apps feature flag is not enabled for

(ctx context.Context, s *mcp.Server, deps any)

Source from the content-addressed store, hash-verified

215// falsely report the flag off, even when the actual request arrived on the
216// /insiders route.
217func (r *Inventory) RegisterTools(ctx context.Context, s *mcp.Server, deps any) {
218 for _, tool := range r.ToolsForRegistration(ctx) {
219 tool.RegisterFunc(s, deps)
220 }
221}
222
223// RegisterResourceTemplates registers all available resource templates with the server.
224// The context is used for feature flag evaluation.

Callers 1

RegisterAllMethod · 0.95

Calls 2

ToolsForRegistrationMethod · 0.95
RegisterFuncMethod · 0.80

Tested by

no test coverage detected