using ColaFlow.Modules.Mcp.Contracts.JsonRpc;

namespace ColaFlow.Modules.Mcp.Domain.Exceptions;

/// <summary>
/// Exception thrown when the requested method does not exist or is not available
/// Maps to JSON-RPC error code -32601 (MethodNotFound)
/// </summary>
public class McpMethodNotFoundException : McpException
{
    /// <summary>
    /// Initializes a new instance of the <see cref="McpMethodNotFoundException"/> class
    /// </summary>
    /// <param name="method">The method name that was not found</param>
    public McpMethodNotFoundException(string method)
        : base(JsonRpcErrorCode.MethodNotFound, $"Method not found: {method}")
    {
    }
}
