MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / getToolsForMode

Function getToolsForMode

src/shared/modes.ts:28–42  ·  view source on GitHub ↗
(groups: readonly GroupEntry[])

Source from the content-addressed store, hash-verified

26
27// Helper to get all tools for a mode
28export function getToolsForMode(groups: readonly GroupEntry[]): string[] {
29 const tools = new Set<string>()
30
31 // Add tools from each group (excluding customTools which are opt-in only)
32 groups.forEach((group) => {
33 const groupName = getGroupName(group)
34 const groupConfig = TOOL_GROUPS[groupName]
35 groupConfig.tools.forEach((tool: string) => tools.add(tool))
36 })
37
38 // Always add required tools
39 ALWAYS_AVAILABLE_TOOLS.forEach((tool) => tools.add(tool))
40
41 return Array.from(tools)
42}
43
44// Main modes configuration as an ordered array
45export const modes = DEFAULT_MODES

Callers 1

filterNativeToolsForModeFunction · 0.90

Calls 3

forEachMethod · 0.80
fromMethod · 0.80
getGroupNameFunction · 0.70

Tested by

no test coverage detected