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

Function toolListBundle

internal/cli/tool_operator.go:529–565  ·  view source on GitHub ↗
(response ToolsResponseRecord)

Source from the content-addressed store, hash-verified

527}
528
529func toolListBundle(response ToolsResponseRecord) outputBundle {
530 return listBundle(
531 response,
532 response.Tools,
533 toolOperatorToolsValue,
534 []string{"TOOL ID", "BACKEND", "SOURCE", "STATUS", "CALLABLE", "REASONS"},
535 "tools",
536 []string{
537 toolOperatorToolIDKey,
538 toolOperatorBackendKey,
539 automationSourceKey,
540 automationStatusKey,
541 "callable",
542 toolOperatorReasonsKey,
543 },
544 func(item ToolRecord) []string {
545 return []string{
546 item.Descriptor.ToolID.String(),
547 string(item.Descriptor.Backend.Kind),
548 toolSourceSummary(item.Descriptor.Source),
549 toolAvailabilitySummary(item.Availability),
550 formatBool(item.Decision.Callable),
551 joinReasons(item.Availability.ReasonCodes, item.Decision.ReasonCodes),
552 }
553 },
554 func(item ToolRecord) []string {
555 return []string{
556 item.Descriptor.ToolID.String(),
557 string(item.Descriptor.Backend.Kind),
558 toolSourceSummary(item.Descriptor.Source),
559 toolAvailabilitySummary(item.Availability),
560 formatBool(item.Decision.Callable),
561 joinReasons(item.Availability.ReasonCodes, item.Decision.ReasonCodes),
562 }
563 },
564 )
565}
566
567func toolInfoBundle(response *ToolResponseRecord) outputBundle {
568 tool := response.Tool

Callers 3

newToolListCommandFunction · 0.85
newToolSearchCommandFunction · 0.85

Calls 6

listBundleFunction · 0.85
toolSourceSummaryFunction · 0.85
toolAvailabilitySummaryFunction · 0.85
formatBoolFunction · 0.85
joinReasonsFunction · 0.85
StringMethod · 0.45

Tested by 1