Improve progress reporting (#145)
* Improve progress reporting - Enable injecting an `IProgress<>` into a tool call to report progress when the client has supplied a progress token - Add a custom type for ProgressToken and ProgressNotification to map to the schema - Simplify RequestId to match ProgressToken's shape - Serialize StdioClientTransport's SendMessageAsync implementation - Add strongly-typed names for all request methods - Change all request IDs created by McpJsonRpcEndpoint to include a guid for that endpoint * Address PR feedback
This commit is contained in:
parent
0294c574a6
commit
2c75acded8
1 changed files with 627 additions and 228 deletions
|
|
@ -1,3 +1,4 @@
|
|||
using ModelContextProtocol.Protocol.Messages;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace ModelContextProtocol.Protocol.Types;
|
||||
|
|
@ -11,5 +12,5 @@ public class RequestParamsMetadata
|
|||
/// If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
|
||||
/// </summary>
|
||||
[JsonPropertyName("progressToken")]
|
||||
public object ProgressToken { get; set; } = default!;
|
||||
public ProgressToken? ProgressToken { get; set; } = default!;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue