You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/concepts/progress/progress.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,14 +17,14 @@ This project illustrates the common case of a server tool that performs a long-r
17
17
18
18
### Server Implementation
19
19
20
-
When processing a request, the server can use the [sendNotificationAsync] extension method of [McpServer] to send progress updates,
20
+
When processing a request, the server can use the [sendNotificationAsync] extension method of [IMcpServer] to send progress updates,
21
21
specifying `"notifications/progress"` as the notification method name.
22
-
The C# SDK registers an instance of [McpServer] with the dependency injection container,
23
-
so tools can simply add a parameter of type [McpServer] to their method signature to access it.
22
+
The C# SDK registers an instance of [IMcpServer] with the dependency injection container,
23
+
so tools can simply add a parameter of type [IMcpServer] to their method signature to access it.
24
24
The parameters passed to [sendNotificationAsync] should be an instance of [ProgressNotificationParams], which includes the current progress, total steps, and an optional message.
The server must verify that the caller provided a `progressToken` in the request and include it in the call to [sendNotificationAsync]. The following example demonstrates how a server can send a progress notification:
@@ -38,10 +38,10 @@ Note that servers are not required to support progress tracking, so clients shou
38
38
39
39
In the MCP C# SDK, clients can specify a `progressToken` in the request parameters when calling a tool method.
40
40
The client should also provide a notification handler to process "notifications/progress" notifications.
41
-
There are two way to do this. The first is to register a notification handler using the [RegisterNotificationHandler] method on the [McpClient] instance. A handler registered this way will receive all progress notifications sent by the server.
41
+
There are two way to do this. The first is to register a notification handler using the [RegisterNotificationHandler] method on the [IMcpClient] instance. A handler registered this way will receive all progress notifications sent by the server.
0 commit comments