using System;
namespace io.github.hatayama.uLoopMCP
{
///
/// Individual log entry information
///
public class LogEntry
{
public string Type { get; set; }
public string Message { get; set; }
public string StackTrace { get; set; }
public LogEntry(string type, string message, string stackTrace)
{
Type = type;
Message = message;
StackTrace = stackTrace;
}
///
/// Parameterless constructor for JSON deserialization
///
public LogEntry()
{
}
}
///
/// Response schema for GetLogs command
/// Provides type-safe response structure
///
public class GetLogsResponse : BaseToolResponse
{
///
/// Total number of logs available
///
public int TotalCount { get; set; }
///
/// Number of logs displayed in this response
///
public int DisplayedCount { get; set; }
///
/// Log type filter used
///
public string LogType { get; set; }
///
/// Maximum count limit used
///
public int MaxCount { get; set; }
///
/// Search text filter used
///
public string SearchText { get; set; }
///
/// Whether stack trace was included
///
public bool IncludeStackTrace { get; set; }
///
/// Array of log entries
///
public LogEntry[] Logs { get; set; }
///
/// Create a new GetLogsResponse
///
public GetLogsResponse(int totalCount, int displayedCount, string logType, int maxCount,
string searchText, bool includeStackTrace, LogEntry[] logs)
{
TotalCount = totalCount;
DisplayedCount = displayedCount;
LogType = logType;
MaxCount = maxCount;
SearchText = searchText;
IncludeStackTrace = includeStackTrace;
Logs = logs ?? Array.Empty();
}
///
/// Parameterless constructor for JSON deserialization
///
public GetLogsResponse()
{
LogType = string.Empty;
SearchText = string.Empty;
Logs = Array.Empty();
}
}
}