package utils

import (
	"strings"

	"github.com/acp/interceptor/internal/models"
)

// ValidateToolCallRequest enforces MVP constraints beyond Gin binding tags.
func ValidateToolCallRequest(r *models.ToolCallRequest) error {
	if strings.TrimSpace(r.AgentID) == "" {
		return ValidationError{Field: "agent_id", Message: "required"}
	}
	if strings.TrimSpace(r.Tool) == "" {
		return ValidationError{Field: "tool", Message: "required"}
	}
	if strings.TrimSpace(r.Action) == "" {
		return ValidationError{Field: "action", Message: "required"}
	}
	return nil
}
