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

Function NewInventory

pkg/github/inventory.go:13–18  ·  view source on GitHub ↗

NewInventory creates an Inventory with all available tools, resources, and prompts. Tools, resources, and prompts are self-describing with their toolset metadata embedded. This function is stateless - no dependencies are captured. Handlers are generated on-demand during registration via RegisterAll(

(t translations.TranslationHelperFunc)

Source from the content-addressed store, hash-verified

11// Handlers are generated on-demand during registration via RegisterAll(ctx, server, deps).
12// The "default" keyword in WithToolsets will expand to toolsets marked with Default: true.
13func NewInventory(t translations.TranslationHelperFunc) *inventory.Builder {
14 return inventory.NewBuilder().
15 SetTools(AllTools(t)).
16 SetResources(AllResources(t)).
17 SetPrompts(AllPrompts(t))
18}

Callers 12

buildStaticInventoryFunction · 0.92
buildInventoryWithFlagsFunction · 0.92
generateReadmeDocsFunction · 0.92
runListScopesFunction · 0.92
GenerateToolsetsHelpFunction · 0.85
AddDefaultToolsetFunction · 0.85
GetDefaultToolsetIDsFunction · 0.85
mustEmptyInventoryFunction · 0.85
TestAllToolsetIconsExistFunction · 0.85

Calls 7

NewBuilderFunction · 0.92
AllToolsFunction · 0.85
AllResourcesFunction · 0.85
AllPromptsFunction · 0.85
SetPromptsMethod · 0.80
SetResourcesMethod · 0.80
SetToolsMethod · 0.80

Tested by 4

mustEmptyInventoryFunction · 0.68
TestAllToolsetIconsExistFunction · 0.68