-
Notifications
You must be signed in to change notification settings - Fork 680
Expand file tree
/
Copy pathRootsCapability.cs
More file actions
36 lines (34 loc) · 1.52 KB
/
RootsCapability.cs
File metadata and controls
36 lines (34 loc) · 1.52 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
using System.ComponentModel;
using System.Text.Json.Serialization;
using ModelContextProtocol.Client;
namespace ModelContextProtocol.Protocol;
/// <summary>
/// Represents a client capability that enables root resource discovery in the Model Context Protocol.
/// </summary>
/// <remarks>
/// <para>
/// When present in <see cref="ClientCapabilities"/>, it indicates that the client supports listing
/// root URIs that serve as entry points for resource navigation.
/// </para>
/// <para>
/// The roots capability establishes a mechanism for servers to discover the directories and files
/// the client considers relevant. Root URIs represent top-level entry points that inform the server
/// about the working context, providing informational guidance rather than enforcing access control.
/// </para>
/// <para>
/// See the <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/">schema</see> for details.
/// </para>
/// </remarks>
public sealed class RootsCapability
{
/// <summary>
/// Gets or sets a value that indicates whether the client supports notifications for changes to the roots list.
/// </summary>
/// <remarks>
/// When set to <see langword="true"/>, the client can notify servers when roots are added,
/// removed, or modified, allowing servers to refresh their roots cache accordingly.
/// This enables servers to stay synchronized with client-side changes to available roots.
/// </remarks>
[JsonPropertyName("listChanged")]
public bool? ListChanged { get; set; }
}