forked from modelcontextprotocol/csharp-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPaginatedRequest.cs
More file actions
23 lines (21 loc) · 839 Bytes
/
PaginatedRequest.cs
File metadata and controls
23 lines (21 loc) · 839 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using System.Text.Json.Serialization;
namespace ModelContextProtocol.Protocol;
/// <summary>
/// Provides a base class for paginated requests.
/// </summary>
/// <remarks>
/// <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/2024-11-05/schema.json">See the schema for details</see>
/// </remarks>
public class PaginatedRequestParams : RequestParams
{
/// <summary>
/// Gets or sets an opaque token representing the current pagination position.
/// </summary>
/// <remarks>
/// If provided, the server should return results starting after this cursor.
/// This value should be obtained from the <see cref="PaginatedResult.NextCursor"/>
/// property of a previous request's response.
/// </remarks>
[JsonPropertyName("cursor")]
public string? Cursor { get; init; }
}