MCPcopy Create free account
hub / github.com/Chat2AnyLLM/code-agent-manager / lookupTool

Function lookupTool

internal/cli/launch.go:128–133  ·  view source on GitHub ↗

lookupTool resolves a CLI-supplied tool name against the registry, trying both cli_command match (e.g. "claude") and tool key match (e.g. "claude-code") to mirror today's behaviour.

(registry *tools.Registry, name string)

Source from the content-addressed store, hash-verified

126// trying both cli_command match (e.g. "claude") and tool key match
127// (e.g. "claude-code") to mirror today's behaviour.
128func lookupTool(registry *tools.Registry, name string) (tools.Tool, bool) {
129 if t, ok := registry.ByCLICommand(name); ok {
130 return t, true
131 }
132 return registry.Get(name)
133}
134
135// resolveLaunchSelection produces the concrete tool/endpoint/model
136// triple by either invoking the interactive wizard (TTY + any field

Callers 2

applyCommandMethod · 0.85
launchCommandMethod · 0.85

Calls 2

ByCLICommandMethod · 0.80
GetMethod · 0.45

Tested by

no test coverage detected