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

Function newToolInfoCommand

internal/cli/tool_operator.go:148–172  ·  view source on GitHub ↗
(deps commandDeps)

Source from the content-addressed store, hash-verified

146}
147
148func newToolInfoCommand(deps commandDeps) *cobra.Command {
149 var scope toolScopeFlags
150 cmd := &cobra.Command{
151 Use: "info <tool_id>",
152 Short: "Show one registry tool descriptor and diagnostics",
153 Example: ` # Show a tool descriptor and availability diagnostics
154 agh tool info agh__skill_view -o json`,
155 Args: exactOneNonBlankArg(),
156 RunE: func(cmd *cobra.Command, args []string) error {
157 id, err := parseToolIDArg(args[0])
158 if err != nil {
159 return writeToolCommandError(cmd, err)
160 }
161 return runToolCommand(cmd, deps, func(client DaemonClient) error {
162 response, err := client.GetTool(cmd.Context(), id.String(), scope.query())
163 if err != nil {
164 return err
165 }
166 return writeCommandOutput(cmd, toolInfoBundle(&response))
167 })
168 },
169 }
170 scope.bind(cmd)
171 return cmd
172}
173
174func newToolApproveCommand(deps commandDeps) *cobra.Command {
175 var flags toolApprovalFlags

Callers 1

newToolCommandFunction · 0.85

Calls 10

queryMethod · 0.95
bindMethod · 0.95
exactOneNonBlankArgFunction · 0.85
parseToolIDArgFunction · 0.85
writeToolCommandErrorFunction · 0.85
runToolCommandFunction · 0.85
writeCommandOutputFunction · 0.85
toolInfoBundleFunction · 0.85
GetToolMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected