MCPcopy Create free account
hub / github.com/compozy/agh / runToolCommand

Function runToolCommand

internal/cli/tool_operator.go:352–362  ·  view source on GitHub ↗
(cmd *cobra.Command, deps commandDeps, run func(DaemonClient) error)

Source from the content-addressed store, hash-verified

350}
351
352func runToolCommand(cmd *cobra.Command, deps commandDeps, run func(DaemonClient) error) error {
353 client, err := clientFromDeps(deps)
354 if err != nil {
355 return err
356 }
357 err = run(client)
358 if err != nil {
359 return writeToolCommandError(cmd, err)
360 }
361 return nil
362}
363
364func parseToolIDArg(raw string) (toolspkg.ToolID, error) {
365 id := toolspkg.ToolID(strings.TrimSpace(raw))

Callers 7

newToolListCommandFunction · 0.85
newToolSearchCommandFunction · 0.85
newToolInfoCommandFunction · 0.85
newToolApproveCommandFunction · 0.85
newToolInvokeCommandFunction · 0.85
newToolsetsListCommandFunction · 0.85
newToolsetsInfoCommandFunction · 0.85

Calls 3

clientFromDepsFunction · 0.85
writeToolCommandErrorFunction · 0.85
runFunction · 0.50

Tested by

no test coverage detected