Table of Contents

Class CancelTaskRequestParams

Namespace
ModelContextProtocol.Protocol
Assembly
ModelContextProtocol.Core.dll

Represents the parameters for a tasks/cancel request to signal intent to cancel an in-progress task.

public sealed class CancelTaskRequestParams : RequestParams
Inheritance
CancelTaskRequestParams
Inherited Members

Remarks

Cancellation is cooperative: the request signals intent, and the server decides whether and when to honor it. A server is not obligated to actually stop the work; it is only obligated to acknowledge the request. Eventual transition to Cancelled is not guaranteed.

The notifications/cancelled notification must not be used for task cancellation.

See the SEP-2663 specification for details.

Properties

TaskId

Gets or sets the identifier of the task to cancel.

[JsonPropertyName("taskId")]
public required string TaskId { get; set; }

Property Value

string