AI-Studio/app/MindWork AI Studio/Tools/MCPClient/MCPResult.cs
2026-07-11 18:56:04 +02:00

24 lines
636 B
C#

namespace AIStudio.Tools.MCPClient;
/// <summary>
/// The result of a call against an MCP server.
/// </summary>
/// <typeparam name="T">The type of the data returned on success.</typeparam>
public sealed class MCPResult<T>
{
/// <summary>
/// Was the call successful?
/// </summary>
public bool Successful { get; init; }
/// <summary>
/// When the call was not successful, this will contain a user-facing error message.
/// </summary>
public string Message { get; init; } = string.Empty;
/// <summary>
/// The data returned by the call.
/// </summary>
public T? Data { get; init; }
}