MCP PHP SDK

ProgressNotification extends Notification

An out-of-band notification used to inform the receiver of a progress update for a long-running request.

Tags
author

Kyrian Obikwelu koshnawaza@gmail.com

Table of Contents

Properties

$message  : string|null
$progress  : float
$progressToken  : string|int
$total  : float|null
$meta  : array<string, mixed>|null

Methods

__construct()  : mixed
fromArray()  : self
getMethod()  : string
jsonSerialize()  : NotificationData
fromParams()  : Notification
getParams()  : array<string, mixed>|null

Properties

Methods

__construct()

public __construct(string|int $progressToken, float $progress[, float|null $total = null ][, string|null $message = null ]) : mixed
Parameters
$progressToken : string|int

the progress token which was given in the initial request, used to associate this notification with the request that is proceeding

$progress : float

The progress thus far. This should increase every time progress is made, even if the total is unknown.

$total : float|null = null

total number of items to process (or total progress required), if known

$message : string|null = null

an optional message describing the current progress

fromArray()

public static fromArray(NotificationData $data) : self
Parameters
$data : NotificationData
Return values
self

jsonSerialize()

public jsonSerialize() : NotificationData
Return values
NotificationData

getParams()

protected getParams() : array<string, mixed>|null
Return values
array<string, mixed>|null

        
On this page

Search results