Skip to content

Commit 03c724d

Browse files
committed
Address PR review comments
1 parent 2b54bc8 commit 03c724d

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

src/ModelContextProtocol.Core/Client/McpClient.Methods.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,8 @@ public static async Task<McpClient> ResumeSessionAsync(
8383
/// </summary>
8484
/// <param name="options">Optional request options including metadata, serialization settings, and progress tracking.</param>
8585
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
86-
/// <returns>A task that completes when the ping is successful.</returns>
86+
/// <returns>A task containing the ping result.</returns>
8787
/// <exception cref="McpException">The server cannot be reached or returned an error response.</exception>
88-
/// <exception cref="McpException">Thrown when the server cannot be reached or returns an error response.</exception>
8988
public ValueTask<PingResult> PingAsync(RequestOptions? options = null, CancellationToken cancellationToken = default)
9089
{
9190
return SendRequestAsync(

src/ModelContextProtocol.Core/RequestOptions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ public JsonObject? Meta
3333
// Add progress token to metadata
3434
meta["progressToken"] = ProgressToken.Value.Token switch
3535
{
36-
string s => JsonValue.Create(s),
37-
long l => JsonValue.Create(l),
36+
string s => s,
37+
long l => l,
3838
_ => null
3939
};
4040

tests/ModelContextProtocol.Tests/Client/McpClientMetaTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public async Task ResourceReadWithMetaFields()
103103

104104

105105
[Fact]
106-
public async Task PromptGettWithMetaFields()
106+
public async Task PromptGetWithMetaFields()
107107
{
108108
Server.ServerOptions.PromptCollection?.Add(McpServerPrompt.Create(
109109
(RequestContext<GetPromptRequestParams> context) =>

0 commit comments

Comments
 (0)