namespace ColaFlow.Modules.Mcp.Contracts.Tools;

/// <summary>
/// Result of a tool execution
/// </summary>
public sealed class McpToolResult
{
    /// <summary>
    /// Tool result content (typically text describing the PendingChange created)
    /// </summary>
    public IEnumerable<McpToolContent> Content { get; set; } = Array.Empty<McpToolContent>();

    /// <summary>
    /// Whether the tool execution failed
    /// </summary>
    public bool IsError { get; set; }
}

/// <summary>
/// Content item in a tool result
/// </summary>
public sealed class McpToolContent
{
    /// <summary>
    /// Content type: "text" or "resource"
    /// </summary>
    public string Type { get; set; } = "text";

    /// <summary>
    /// Text content (for type="text")
    /// </summary>
    public string? Text { get; set; }

    /// <summary>
    /// Resource URI (for type="resource")
    /// </summary>
    public string? Resource { get; set; }
}
