diff --git a/src/ModelContextProtocol/Client/McpClient.cs b/src/ModelContextProtocol/Client/McpClient.cs
index eb197d6..d80f8fc 100644
--- a/src/ModelContextProtocol/Client/McpClient.cs
+++ b/src/ModelContextProtocol/Client/McpClient.cs
@@ -55,7 +55,7 @@ internal sealed class McpClient : McpEndpoint, IMcpClient
{
if (samplingCapability.SamplingHandler is not { } samplingHandler)
{
- throw new InvalidOperationException($"Sampling capability was set but it did not provide a handler.");
+ throw new InvalidOperationException("Sampling capability was set but it did not provide a handler.");
}
RequestHandlers.Set(
@@ -72,7 +72,7 @@ internal sealed class McpClient : McpEndpoint, IMcpClient
{
if (rootsCapability.RootsHandler is not { } rootsHandler)
{
- throw new InvalidOperationException($"Roots capability was set but it did not provide a handler.");
+ throw new InvalidOperationException("Roots capability was set but it did not provide a handler.");
}
RequestHandlers.Set(
diff --git a/src/ModelContextProtocol/Client/McpClientExtensions.cs b/src/ModelContextProtocol/Client/McpClientExtensions.cs
index f495e89..a86f7e6 100644
--- a/src/ModelContextProtocol/Client/McpClientExtensions.cs
+++ b/src/ModelContextProtocol/Client/McpClientExtensions.cs
@@ -145,7 +145,7 @@ public static class McpClientExtensions
///
///
/// Every iteration through the returned
- /// will result in requerying the server and yielding the sequence of available tools.
+ /// will result in re-querying the server and yielding the sequence of available tools.
///
///
///
@@ -248,7 +248,7 @@ public static class McpClientExtensions
///
///
/// Every iteration through the returned
- /// will result in requerying the server and yielding the sequence of available prompts.
+ /// will result in re-querying the server and yielding the sequence of available prompts.
///
///
///
@@ -396,7 +396,7 @@ public static class McpClientExtensions
///
///
/// Every iteration through the returned
- /// will result in requerying the server and yielding the sequence of available resource templates.
+ /// will result in re-querying the server and yielding the sequence of available resource templates.
///
///
///
@@ -510,7 +510,7 @@ public static class McpClientExtensions
///
///
/// Every iteration through the returned
- /// will result in requerying the server and yielding the sequence of available resources.
+ /// will result in re-querying the server and yielding the sequence of available resources.
///
///
///
diff --git a/src/ModelContextProtocol/Protocol/Messages/ProgressToken.cs b/src/ModelContextProtocol/Protocol/Messages/ProgressToken.cs
index 1f73952..ac5ceb1 100644
--- a/src/ModelContextProtocol/Protocol/Messages/ProgressToken.cs
+++ b/src/ModelContextProtocol/Protocol/Messages/ProgressToken.cs
@@ -37,7 +37,7 @@ public readonly struct ProgressToken : IEquatable
///
public override string? ToString() =>
- _token is string stringValue ? $"{stringValue}" :
+ _token is string stringValue ? stringValue :
_token is long longValue ? longValue.ToString(CultureInfo.InvariantCulture) :
null;
diff --git a/src/ModelContextProtocol/Server/AIFunctionMcpServerPrompt.cs b/src/ModelContextProtocol/Server/AIFunctionMcpServerPrompt.cs
index 85bf38c..d3b48b6 100644
--- a/src/ModelContextProtocol/Server/AIFunctionMcpServerPrompt.cs
+++ b/src/ModelContextProtocol/Server/AIFunctionMcpServerPrompt.cs
@@ -263,7 +263,7 @@ internal sealed class AIFunctionMcpServerPrompt : McpServerPrompt
Messages = [.. chatMessages.SelectMany(chatMessage => chatMessage.ToPromptMessages())],
},
- null => throw new InvalidOperationException($"Null result returned from prompt function."),
+ null => throw new InvalidOperationException("Null result returned from prompt function."),
_ => throw new InvalidOperationException($"Unknown result type '{result.GetType()}' returned from prompt function."),
};