Skip to main content

Definition

Assembly: CloudNimble.McpEssentials.Cosmos.dll Namespace: CloudNimble.McpEssentials.Cosmos.Tasks Inheritance: System.Object

Syntax

Summary

Cosmos document for a task. CosmosStoredMcpTask.Id is the Cosmos item id (the task id). Partition key is CosmosStoredMcpTask.OwnerUserId.

Constructors

.ctor

Syntax

.ctor Inherited

Inherited from object

Syntax

Properties

CreatedAt

Gets or sets when the task was created, UTC.

Syntax

Property Value

Type: System.DateTimeOffset

DiscardAfter

Gets or sets when the document should be discarded.

Syntax

Property Value

Type: System.Nullable<System.DateTimeOffset>

Error

Gets or sets the JSON-RPC error payload.

Syntax

Property Value

Type: System.Nullable<System.Text.Json.JsonElement>

ExpiresAt

Gets or sets the work-window end.

Syntax

Property Value

Type: System.Nullable<System.DateTimeOffset>

Id

Gets or sets the Cosmos item id (the opaque task identifier).

Syntax

Property Value

Type: string

InputRequests

Gets or sets outstanding input requests.

Syntax

Property Value

Type: System.Collections.Generic.Dictionary<string, ModelContextProtocol.Protocol.InputRequest>?

LastUpdatedAt

Gets or sets when the task last changed, UTC.

Syntax

Property Value

Type: System.DateTimeOffset

OwnerUserId

Gets or sets the user recorded when the task was created. Partition key.

Syntax

Property Value

Type: string

PollIntervalMs

Gets or sets the client poll interval in milliseconds.

Syntax

Property Value

Type: System.Nullable<long>

Result

Gets or sets the terminal result payload.

Syntax

Property Value

Type: System.Nullable<System.Text.Json.JsonElement>

Status

Gets or sets the protocol status (enum name).

Syntax

Property Value

Type: ModelContextProtocol.Extensions.Tasks.McpTaskStatus

StatusMessage

Gets or sets an optional status message.

Syntax

Property Value

Type: string?

TimeToLive

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

Syntax

Property Value

Type: System.Nullable<System.TimeSpan>

TimeToLiveSeconds

Gets or sets Cosmos per-document TTL in seconds, or null when unlimited.

Syntax

Property Value

Type: System.Nullable<int>

Methods

Equals Inherited Virtual

Inherited from object

Syntax

Parameters

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

Parameters

Returns

Type: bool

From

Copies stored into a Cosmos document.

Syntax

Parameters

Returns

Type: CloudNimble.McpEssentials.Cosmos.Tasks.CosmosStoredMcpTask A document with the same fields.

Exceptions

GetHashCode Inherited Virtual

Inherited from object

Syntax

Returns

Type: int

GetType Inherited

Inherited from object

Syntax

Returns

Type: System.Type

MemberwiseClone Inherited

Inherited from object

Syntax

Returns

Type: object

ReferenceEquals Inherited

Inherited from object

Syntax

Parameters

Returns

Type: bool

ToStored Virtual

Builds a StoredMcpTask from this document.

Syntax

Returns

Type: CloudNimble.McpEssentials.Core.Tasks.StoredMcpTask A snapshot the Core Try* methods can mutate.

ToString Inherited Virtual

Inherited from object

Syntax

Returns

Type: string?

ToTtlSeconds

Converts discardAfter into Cosmos TTL seconds from now.

Syntax

Parameters

Returns

Type: System.Nullable<int> At least 1 second, or null when unlimited.