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

Function toolValidationCommandError

internal/cli/tool_operator.go:505–527  ·  view source on GitHub ↗
(
	id toolspkg.ToolID,
	message string,
	err error,
)

Source from the content-addressed store, hash-verified

503}
504
505func toolValidationCommandError(
506 id toolspkg.ToolID,
507 message string,
508 err error,
509) *toolCommandError {
510 reason := toolspkg.ReasonSchemaInvalid
511 if extracted, ok := toolspkg.ReasonOf(err); ok {
512 reason = extracted
513 }
514 payload := contract.ToolErrorPayload{
515 Code: toolspkg.ErrorCodeInvalidInput,
516 Message: message,
517 ReasonCodes: []toolspkg.ReasonCode{reason},
518 Layer: toolOperatorCLIKey,
519 }
520 if id != "" {
521 payload.ToolID = id
522 }
523 return &toolCommandError{
524 response: ToolErrorResponseRecord{Error: payload},
525 err: fmt.Errorf("%s: %w", message, err),
526 }
527}
528
529func toolListBundle(response ToolsResponseRecord) outputBundle {
530 return listBundle(

Callers 6

newToolSearchCommandFunction · 0.85
newToolApproveCommandFunction · 0.85
newToolInvokeCommandFunction · 0.85
parseToolIDArgFunction · 0.85
parseToolsetIDArgFunction · 0.85

Calls

no outgoing calls

Tested by 1