-
Notifications
You must be signed in to change notification settings - Fork 720
Expand file tree
/
Copy pathListResourceTemplatesResult.cs
More file actions
45 lines (41 loc) · 1.88 KB
/
Copy pathListResourceTemplatesResult.cs
File metadata and controls
45 lines (41 loc) · 1.88 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
using System.Text.Json.Serialization;
namespace ModelContextProtocol.Protocol;
/// <summary>
/// Represents a server's response to a <see cref="RequestMethods.ResourcesTemplatesList"/> request from the client,
/// containing available resource templates.
/// </summary>
/// <remarks>
/// <para>
/// This result is returned when a client sends a <see cref="RequestMethods.ResourcesTemplatesList"/> request to discover
/// available resource templates on the server.
/// </para>
/// <para>
/// It inherits from <see cref="PaginatedResult"/>, allowing for paginated responses when there are many resource templates.
/// The server can provide the <see cref="PaginatedResult.NextCursor"/> property to indicate there are more
/// resource templates available beyond what was returned in the current response.
/// </para>
/// <para>
/// See the <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/">schema</see> for details.
/// </para>
/// </remarks>
public sealed class ListResourceTemplatesResult : PaginatedResult, ICacheableResult
{
/// <summary>
/// Gets or sets a list of resource templates that the server offers.
/// </summary>
/// <remarks>
/// This collection contains all the resource templates returned in the current page of results.
/// Each <see cref="ResourceTemplate"/> provides metadata about resources available on the server,
/// including URI templates, names, descriptions, and MIME types.
/// </remarks>
[JsonPropertyName("resourceTemplates")]
public IList<ResourceTemplate> ResourceTemplates { get; set; } = [];
/// <inheritdoc />
[JsonPropertyName("ttlMs")]
[JsonConverter(typeof(TimeSpanMillisecondsConverter))]
public TimeSpan? TimeToLive { get; set; }
/// <inheritdoc />
[JsonPropertyName("cacheScope")]
[JsonConverter(typeof(CacheScopeConverter))]
public CacheScope? CacheScope { get; set; }
}