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

Function newToolsetsListCommand

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

Source from the content-addressed store, hash-verified

288}
289
290func newToolsetsListCommand(deps commandDeps) *cobra.Command {
291 var scope toolScopeFlags
292 cmd := &cobra.Command{
293 Use: toolOperatorListKey,
294 Short: "List registry toolsets",
295 Example: ` # List known toolsets and expansion diagnostics
296 agh toolsets list -o json`,
297 Args: cobra.NoArgs,
298 RunE: func(cmd *cobra.Command, _ []string) error {
299 return runToolCommand(cmd, deps, func(client DaemonClient) error {
300 response, err := client.ListToolsets(cmd.Context(), scope.query())
301 if err != nil {
302 return err
303 }
304 return writeCommandOutput(cmd, toolsetListBundle(response))
305 })
306 },
307 }
308 scope.bind(cmd)
309 return cmd
310}
311
312func newToolsetsInfoCommand(deps commandDeps) *cobra.Command {
313 var scope toolScopeFlags

Callers 1

newToolsetsCommandFunction · 0.85

Calls 6

queryMethod · 0.95
bindMethod · 0.95
runToolCommandFunction · 0.85
writeCommandOutputFunction · 0.85
toolsetListBundleFunction · 0.85
ListToolsetsMethod · 0.65

Tested by

no test coverage detected