< Summary

Information
Class: Shared.Contracts.Mcp.McpRequest
Assembly: Shared
File(s): /home/runner/work/InvAit/InvAit/Shared/Contracts/Mcp/McpProtocol.cs
Tag: 14_22728831704
Line coverage
0%
Covered lines: 0
Uncovered lines: 4
Coverable lines: 4
Total lines: 52
Line coverage: 0%
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%210%
get_Method()100%210%
get_Params()100%210%
get_Id()100%210%

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{
 08    public string Jsonrpc { get; set; } = "2.0";
 09    public string Method { get; set; } = string.Empty;
 010    public object? Params { get; set; }
 011    public string? Id { get; set; }
 12}
 13
 14/// <summary>
 15/// JSON-RPC 2.0 Response
 16/// </summary>
 17public class McpResponse
 18{
 19    public string Jsonrpc { get; set; } = "2.0";
 20    public object? Result { get; set; }
 21    public McpError? Error { get; set; }
 22    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}