Skip to content

Commit 3457aa5

Browse files
committed
Update progress.md
1 parent 032f61d commit 3457aa5

File tree

1 file changed

+19
-31
lines changed

1 file changed

+19
-31
lines changed

docs/specification/basic/utilities/progress.md

Lines changed: 19 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,10 @@ The Model Context Protocol (MCP) supports optional progress tracking for long-ru
1010

1111
## Progress Flow
1212

13-
When a party wants to receive progress updates for a request, it includes a `progressToken` in the request metadata. Progress tokens can be any string or number value chosen by the sender, but MUST be unique across all active requests. The receiver can then send progress notifications containing:
13+
When a party wants to _receive_ progress updates for a request, it includes a `progressToken` in the request metadata.
1414

15-
- The original progress token
16-
- Current progress value
17-
- Optional total value
15+
* Progress tokens **MUST** be a string or integer value
16+
* Progress tokens can be chosen by the sender using any means, but **MUST** be unique across all active requests.
1817

1918
```json
2019
{
@@ -29,7 +28,11 @@ When a party wants to receive progress updates for a request, it includes a `pro
2928
}
3029
```
3130

32-
The receiver MAY then send progress notifications:
31+
The receiver **MAY** then send progress notifications containing:
32+
33+
- The original progress token
34+
- The current progress value so far
35+
- An optional "total" value
3336

3437
```json
3538
{
@@ -43,24 +46,20 @@ The receiver MAY then send progress notifications:
4346
}
4447
```
4548

46-
## Behavior Requirements
49+
* The `progress` value **MUST** increase with each notification, even if the total is unknown.
50+
* The `progress` and the `total` values **MAY** be floating point.
4751

48-
Both clients and servers MUST follow these requirements when handling progress:
52+
## Behavior Requirements
4953

50-
1. Progress notifications MUST only reference tokens that:
54+
1. Progress notifications **MUST** only reference tokens that:
5155
- Were provided in an active request
5256
- Are associated with an in-progress operation
5357

54-
2. Receivers of progress requests MAY:
58+
2. Receivers of progress requests **MAY**:
5559
- Choose not to send any progress notifications
5660
- Send notifications at whatever frequency they deem appropriate
5761
- Omit the total value if unknown
5862

59-
3. Senders SHOULD be prepared to:
60-
- Handle missing progress notifications
61-
- Receive notifications out of order
62-
- Handle notifications after completion
63-
6463
```mermaid
6564
sequenceDiagram
6665
participant Sender
@@ -71,9 +70,9 @@ sequenceDiagram
7170
7271
Note over Sender,Receiver: Progress updates
7372
loop Progress Updates
74-
Receiver-->>Sender: Progress notification (50/100)
75-
Receiver-->>Sender: Progress notification (75/100)
76-
Receiver-->>Sender: Progress notification (100/100)
73+
Receiver-->>Sender: Progress notification (0.2/1.0)
74+
Receiver-->>Sender: Progress notification (0.6/1.0)
75+
Receiver-->>Sender: Progress notification (1.0/1.0)
7776
end
7877
7978
Note over Sender,Receiver: Operation complete
@@ -82,17 +81,6 @@ sequenceDiagram
8281

8382
## Implementation Notes
8483

85-
- Receivers SHOULD use meaningful progress increments
86-
- Senders SHOULD track active progress tokens
87-
- Both parties SHOULD implement rate limiting
88-
- Progress tracking SHOULD stop on completion
89-
90-
## Error Handling
91-
92-
Invalid progress notifications SHOULD be ignored without error responses:
93-
94-
- Unknown progress tokens
95-
- Out of order notifications
96-
- Malformed notifications
97-
98-
This maintains the "fire and forget" nature of notifications while allowing for race conditions in asynchronous communication.
84+
- Senders and receivers **SHOULD** track active progress tokens
85+
- Both parties **SHOULD** implement rate limiting to prevent flooding
86+
- Progress notifications **MUST** stop after completion

0 commit comments

Comments
 (0)