forked from modelcontextprotocol/csharp-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathImplementation.cs
More file actions
40 lines (37 loc) · 1.4 KB
/
Implementation.cs
File metadata and controls
40 lines (37 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using System.Text.Json.Serialization;
namespace ModelContextProtocol.Protocol;
/// <summary>
/// Provides the name and version of an MCP implementation.
/// </summary>
/// <remarks>
/// <para>
/// The <see cref="Implementation"/> class is used to identify MCP clients and servers during the initialization handshake.
/// It provides version and name information that can be used for compatibility checks, logging, and debugging.
/// </para>
/// <para>
/// Both clients and servers provide this information during connection establishment.
/// </para>
/// <para>
/// See the <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/">schema</see> for details.
/// </para>
/// </remarks>
public class Implementation
{
/// <summary>
/// Gets or sets the name of the implementation.
/// </summary>
/// <remarks>
/// This is typically the name of the client or server library/application.
/// </remarks>
[JsonPropertyName("name")]
public required string Name { get; set; }
/// <summary>
/// Gets or sets the version of the implementation.
/// </summary>
/// <remarks>
/// The version is used during client-server handshake to identify implementation versions,
/// which can be important for troubleshooting compatibility issues or when reporting bugs.
/// </remarks>
[JsonPropertyName("version")]
public required string Version { get; set; }
}