Implement MCP task support (SEP-1686) (#1170)

Co-authored-by: Stephen Halter <halter73@gmail.com>
This commit is contained in:
Eirik Tsarpalis 2026-01-28 05:21:02 +02:00 • committed by GitHub
commit 10e4f5b20f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -121,4 +121,32 @@ public static class RequestMethods
/// and information, establishing the protocol version and available features for the session.
/// </remarks>
public const string Initialize = "initialize";
/// <summary>
/// The name of the request method to retrieve task status.
/// </summary>
/// <remarks>
/// Requestors poll for task completion by sending tasks/get requests. They should respect
/// the pollInterval provided in responses when determining polling frequency.
/// </remarks>
public const string TasksGet = "tasks/get";
/// <summary>
/// The name of the request method to retrieve the result of a completed task.
/// </summary>
/// <remarks>
/// This request blocks until the task reaches a terminal status (completed, failed, or cancelled).
/// The result structure matches the original request type (e.g., CallToolResult for tools/call).
/// </remarks>
public const string TasksResult = "tasks/result";
/// <summary>
/// The name of the request method to retrieve a list of tasks with pagination support.
/// </summary>
public const string TasksList = "tasks/list";
/// <summary>
/// The name of the request method to explicitly cancel a task.
/// </summary>
public const string TasksCancel = "tasks/cancel";
}