< Summary

Information
Class: Shared.Contracts.Mcp.McpResponse
Assembly: Shared
File(s): /home/runner/work/InvAit/InvAit/Shared/Contracts/Mcp/McpProtocol.cs
Tag: 14_22728831704
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 52
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Jsonrpc()100%11100%
get_Result()100%11100%
get_Error()100%11100%
get_Id()100%11100%

File(s)

/home/runner/work/InvAit/InvAit/Shared/Contracts/Mcp/McpProtocol.cs

#LineLine coverage
 1namespace Shared.Contracts.Mcp;
 2
 3/// <summary>
 4/// JSON-RPC 2.0 Request
 5/// </summary>
 6public class McpRequest
 7{
 8    public string Jsonrpc { get; set; } = "2.0";
 9    public string Method { get; set; } = string.Empty;
 10    public object? Params { get; set; }
 11    public string? Id { get; set; }
 12}
 13
 14/// <summary>
 15/// JSON-RPC 2.0 Response
 16/// </summary>
 17public class McpResponse
 18{
 419    public string Jsonrpc { get; set; } = "2.0";
 420    public object? Result { get; set; }
 221    public McpError? Error { get; set; }
 222    public string? Id { get; set; }
 23}
 24
 25/// <summary>
 26/// JSON-RPC 2.0 Error
 27/// </summary>
 28public class McpError
 29{
 30    public int Code { get; set; }
 31    public string Message { get; set; } = string.Empty;
 32    public object? Data { get; set; }
 33}
 34
 35/// <summary>
 36/// Result of tools/list
 37/// </summary>
 38public class McpListToolsResult
 39{
 40    public List<McpTool> Tools { get; set; } = [];
 41    public string? NextCursor { get; set; }
 42}
 43
 44/// <summary>
 45/// JSON-RPC 2.0 Notification (no id)
 46/// </summary>
 47public class McpNotification
 48{
 49    public string Jsonrpc { get; set; } = "2.0";
 50    public string Method { get; set; } = string.Empty;
 51    public object? Params { get; set; }
 52}