-
Notifications
You must be signed in to change notification settings - Fork 689
Expand file tree
/
Copy pathImplementation.cs
More file actions
63 lines (57 loc) · 2.19 KB
/
Implementation.cs
File metadata and controls
63 lines (57 loc) · 2.19 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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 sealed class Implementation : IBaseMetadata
{
/// <inheritdoc />
[JsonPropertyName("name")]
public required string Name { get; set; }
/// <inheritdoc />
[JsonPropertyName("title")]
public string? Title { 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; }
/// <summary>
/// Gets or sets an optional list of icons for this implementation.
/// </summary>
/// <remarks>
/// This can be used by clients to display the implementation's icon in a user interface.
/// </remarks>
[JsonPropertyName("icons")]
public IList<Icon>? Icons { get; set; }
/// <summary>
/// Gets or sets an optional URL of the website for this implementation.
/// </summary>
/// <remarks>
/// <para>
/// This URL can be used by clients to link to documentation or more information about the implementation.
/// </para>
/// <para>
/// Consumers SHOULD take steps to ensure URLs are from the same domain as the client/server
/// or a trusted domain to prevent security issues.
/// </para>
/// </remarks>
[JsonPropertyName("websiteUrl")]
public string? WebsiteUrl { get; set; }
}