MCP TypeScript SDK (V2)
    Preparing search index...

    Task created message.

    Yielded once when the server creates a new task for a long-running operation. This is always the first message for task-augmented requests.

    interface TaskCreatedMessage {
        task: {
            createdAt: string;
            lastUpdatedAt: string;
            pollInterval?: number;
            status:
                | "working"
                | "input_required"
                | "completed"
                | "failed"
                | "cancelled";
            statusMessage?: string;
            taskId: string;
            ttl: number
            | null;
        };
        type: "taskCreated";
    }

    Hierarchy (View Summary)

    Index

    Properties

    Properties

    task: {
        createdAt: string;
        lastUpdatedAt: string;
        pollInterval?: number;
        status: "working" | "input_required" | "completed" | "failed" | "cancelled";
        statusMessage?: string;
        taskId: string;
        ttl: number | null;
    }

    Type Declaration

    • createdAt: string

      ISO 8601 timestamp when the task was created.

    • lastUpdatedAt: string

      ISO 8601 timestamp when the task was last updated.

    • OptionalpollInterval?: number
    • status: "working" | "input_required" | "completed" | "failed" | "cancelled"
    • OptionalstatusMessage?: string

      Optional diagnostic message for failed tasks or other status information.

    • taskId: string
    • ttl: number | null

      Time in milliseconds to keep task results available after completion. If null, the task has unlimited lifetime until manually cleaned up.

    type: "taskCreated"