forked from modelcontextprotocol/csharp-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathListRootsResult.cs
More file actions
39 lines (36 loc) · 1.31 KB
/
ListRootsResult.cs
File metadata and controls
39 lines (36 loc) · 1.31 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
using System.Text.Json;
using System.Text.Json.Serialization;
namespace ModelContextProtocol.Protocol;
/// <summary>
/// Represents a client's response to a <see cref="RequestMethods.RootsList"/> request from the server,
/// containing available roots.
/// </summary>
/// <remarks>
/// <para>
/// This result is returned when a server sends a <see cref="RequestMethods.RootsList"/> request to discover
/// available roots on the client.
/// </para>
/// <para>
/// See the <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/">schema</see> for details.
/// </para>
/// </remarks>
public class ListRootsResult
{
/// <summary>
/// Gets or sets additional metadata for the result.
/// </summary>
/// <remarks>
/// This property is reserved by the protocol for future use.
/// </remarks>
[JsonPropertyName("meta")]
public JsonElement? Meta { get; init; }
/// <summary>
/// Gets or sets the list of root URIs provided by the client.
/// </summary>
/// <remarks>
/// This collection contains all available root URIs and their associated metadata.
/// Each root serves as an entry point for resource navigation in the Model Context Protocol.
/// </remarks>
[JsonPropertyName("roots")]
public required IReadOnlyList<Root> Roots { get; init; }
}