8000 Added optional message field to progress notifications by jerome3o-anthropic · Pull Request #197 · modelcontextprotocol/modelcontextprotocol · GitHub
[go: up one dir, main page]

Skip to content

Added optional message field to progress notifications #197

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion docs/specification/draft/basic/utilities/progress.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ The receiver **MAY** then send progress notifications containing:
- The original progress token
- The current progress value so far
- An optional "total" value
- An optional "message" value

```json
{
Expand All @@ -44,14 +45,16 @@ The receiver **MAY** then send progress notifications containing:
"params": {
"progressToken": "abc123",
"progress": 50,
"total": 100
"total": 100,
"message": "Reticulating splines..."
}
}
```

- The `progress` value **MUST** increase with each notification, even if the total is
unknown.
- The `progress` and the `total` values **MAY** be floating point.
- The `message` field **SHOULD** provide relevant human readable progress information.

## Behavior Requirements

Expand Down
4 changes: 4 additions & 0 deletions schema/draft/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1284,6 +1284,10 @@
},
"params": {
"properties": {
"message": {
"description": "An optional message describing the current progress.",
"type": "string"
},
"progress": {
"description": "The progress thus far. This should increase every time progress is made, even if the total is unknown.",
"type": "number"
Expand Down
4 changes: 4 additions & 0 deletions schema/draft/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,10 @@ export interface ProgressNotification extends Notification {
* @TJS-type number
*/
total?: number;
/**
* An optional message describing the current progress.
*/
message?: string;
};
}

Expand Down
0