MCPcopy Create free account
hub / github.com/GoMudEngine/GoMud / getAllowedTools

Method getAllowedTools

modules/clibridge/clibridge.go:102–118  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

100}
101
102func (m *CLIBridgeModule) getAllowedTools() []string {
103 lc := m.loadListConfig()
104 if len(lc.AllowedTools) > 0 {
105 return lc.AllowedTools
106 }
107 v := m.plug.Config.Get(`AllowedTools`)
108 if tools, ok := v.([]any); ok {
109 result := make([]string, 0, len(tools))
110 for _, t := range tools {
111 if s, ok := t.(string); ok {
112 result = append(result, s)
113 }
114 }
115 return result
116 }
117 return nil
118}
119
120func (m *CLIBridgeModule) getAllowedPaths() []string {
121 lc := m.loadListConfig()

Callers 3

apiGetConfigMethod · 0.95
isToolAllowedMethod · 0.95
onAutoCompleteMethod · 0.95

Calls 2

loadListConfigMethod · 0.95
GetMethod · 0.45

Tested by

no test coverage detected