Table of Contents

Class TaskStatusNotificationParams

Namespace
ModelContextProtocol.Protocol
Assembly
ModelContextProtocol.Core.dll

Represents the parameters for a notifications/tasks notification sent by the server to push task status updates to the client.

[JsonConverter(typeof(TaskStatusNotificationParams.Converter))]
public abstract class TaskStatusNotificationParams : NotificationParams
Inheritance
TaskStatusNotificationParams
Derived
Inherited Members

Remarks

Each notification carries a complete task state for the current status, identical to what tasks/get would have returned at that moment. The concrete type depends on the task's current status:

To receive task status notifications, clients send a subscriptions/listen request including the task IDs they are interested in.

See the SEP-2663 specification for details.

Properties

CreatedAt

Gets or sets the ISO 8601 timestamp when the task was created.

[JsonPropertyName("createdAt")]
public required DateTimeOffset CreatedAt { get; set; }

Property Value

DateTimeOffset

LastUpdatedAt

Gets or sets the ISO 8601 timestamp when the task was last updated.

[JsonPropertyName("lastUpdatedAt")]
public required DateTimeOffset LastUpdatedAt { get; set; }

Property Value

DateTimeOffset

PollIntervalMs

Gets or sets the suggested polling interval in milliseconds.

[JsonPropertyName("pollIntervalMs")]
public long? PollIntervalMs { get; set; }

Property Value

long?

Status

Gets or sets the current task status.

[JsonPropertyName("status")]
public abstract McpTaskStatus Status { get; }

Property Value

McpTaskStatus

StatusMessage

Gets or sets an optional message describing the current task state.

[JsonPropertyName("statusMessage")]
public string? StatusMessage { get; set; }

Property Value

string

TaskId

Gets or sets the stable identifier for this task.

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

Property Value

string

TimeToLive

Gets or sets the time-to-live duration from creation, or null for unlimited.

[JsonPropertyName("ttlMs")]
public TimeSpan? TimeToLive { get; set; }

Property Value

TimeSpan?