using Microsoft.Extensions.Logging;

namespace ColaFlow.Modules.Mcp.Application.Handlers;

/// <summary>
/// Handler for the 'tools/list' MCP method
/// </summary>
public class ToolsListMethodHandler : IMcpMethodHandler
{
    private readonly ILogger<ToolsListMethodHandler> _logger;

    public string MethodName => "tools/list";

    public ToolsListMethodHandler(ILogger<ToolsListMethodHandler> logger)
    {
        _logger = logger;
    }

    public Task<object?> HandleAsync(object? @params, CancellationToken cancellationToken)
    {
        _logger.LogDebug("Handling tools/list request");

        // TODO: Implement in Story 5.11 (Core MCP Tools)
        // For now, return empty list
        var response = new
        {
            tools = Array.Empty<object>()
        };

        return Task.FromResult<object?>(response);
    }
}
