Class McpTaskStatusNotificationParams
- Namespace
- ModelContextProtocol.Protocol
- Assembly
- ModelContextProtocol.Core.dll
Represents the parameters for a notifications/tasks/status notification.
[Experimental("MCPEXP001", UrlFormat = "https://github.com/modelcontextprotocol/csharp-sdk/blob/main/docs/list-of-diagnostics.md#mcpexp001")]
public sealed class McpTaskStatusNotificationParams : NotificationParams
- Inheritance
-
McpTaskStatusNotificationParams
- Inherited Members
Remarks
When a task status changes, receivers may send this notification to inform the requestor of the change. This notification includes the full task state.
Requestors must not rely on receiving this notification, as it is optional. Receivers are not required to send status notifications and may choose to only send them for certain status transitions. Requestors should continue to poll via tasks/get to ensure they receive status updates.
Properties
CreatedAt
Gets or sets the ISO 8601 timestamp when the task was created.
[JsonPropertyName("createdAt")]
public required DateTimeOffset CreatedAt { get; set; }
Property Value
LastUpdatedAt
Gets or sets the ISO 8601 timestamp when the task status was last updated.
[JsonPropertyName("lastUpdatedAt")]
public required DateTimeOffset LastUpdatedAt { get; set; }
Property Value
PollInterval
Gets or sets the suggested time between status checks.
[JsonPropertyName("pollInterval")]
[JsonConverter(typeof(TimeSpanMillisecondsConverter))]
public TimeSpan? PollInterval { get; set; }
Property Value
Status
Gets or sets the current status of the task.
[JsonPropertyName("status")]
public required McpTaskStatus Status { get; set; }
Property Value
StatusMessage
Gets or sets an optional human-readable message describing the current state.
[JsonPropertyName("statusMessage")]
public string? StatusMessage { get; set; }
Property Value
TaskId
Gets or sets the task ID.
[JsonPropertyName("taskId")]
public required string TaskId { get; set; }
Property Value
TimeToLive
Gets or sets the time to live (retention duration) from creation before the task may be deleted.
[JsonPropertyName("ttl")]
[JsonConverter(typeof(TimeSpanMillisecondsConverter))]
public TimeSpan? TimeToLive { get; set; }