Skip to content

Commit db0f244

Browse files
Merge pull request modelcontextprotocol#48 from modelcontextprotocol/justin/fix-cancelled-method
Fix the `cancelled` notification name
2 parents 795ecef + 777802d commit db0f244

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

docs/spec/cancellation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ MCP supports request cancellation through a dedicated notification message. This
88

99
## Cancellation Protocol
1010

11-
When a party wants to cancel a request, they send a `cancelled` notification containing the ID of the request they wish to cancel:
11+
When a party wants to cancel a request, they send a "cancelled" notification containing the ID of the request they wish to cancel:
1212

1313
For example, initiating a request:
1414

@@ -28,7 +28,7 @@ For example, initiating a request:
2828
```json
2929
{
3030
"jsonrpc": "2.0",
31-
"method": "cancelled",
31+
"method": "notifications/cancelled",
3232
"params": {
3333
"requestId": "abc123",
3434
"reason": "User interrupted operation"

schema/schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
"description": "This notification can be sent by either side to indicate that it is cancelling a previously-issued request.\n\nThe request SHOULD still be in-flight, but due to communication latency, it is always possible that this notification MAY arrive after the request has already finished.\n\nThis notification indicates that the result will be unused, so any associated processing SHOULD cease.\n\nA client MUST NOT attempt to cancel its `initialize` request.",
9292
"properties": {
9393
"method": {
94-
"const": "cancelled",
94+
"const": "notifications/cancelled",
9595
"type": "string"
9696
},
9797
"params": {

schema/schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export type EmptyResult = Result;
125125
* A client MUST NOT attempt to cancel its `initialize` request.
126126
*/
127127
export interface CancelledNotification extends Notification {
128-
method: "cancelled";
128+
method: "notifications/cancelled";
129129
params: {
130130
/**
131131
* The ID of the request to cancel.

0 commit comments

Comments
 (0)