Skip to content

Commit dc544f9

Browse files
authored
Remove unessesary $ and fix some typos (#305)
1 parent 9c124b1 commit dc544f9

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/ModelContextProtocol/Client/McpClient.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public McpClient(IClientTransport clientTransport, McpClientOptions? options, IL
5555
{
5656
if (samplingCapability.SamplingHandler is not { } samplingHandler)
5757
{
58-
throw new InvalidOperationException($"Sampling capability was set but it did not provide a handler.");
58+
throw new InvalidOperationException("Sampling capability was set but it did not provide a handler.");
5959
}
6060

6161
RequestHandlers.Set(
@@ -72,7 +72,7 @@ public McpClient(IClientTransport clientTransport, McpClientOptions? options, IL
7272
{
7373
if (rootsCapability.RootsHandler is not { } rootsHandler)
7474
{
75-
throw new InvalidOperationException($"Roots capability was set but it did not provide a handler.");
75+
throw new InvalidOperationException("Roots capability was set but it did not provide a handler.");
7676
}
7777

7878
RequestHandlers.Set(

src/ModelContextProtocol/Client/McpClientExtensions.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public static async Task<IList<McpClientTool>> ListToolsAsync(
145145
/// </para>
146146
/// <para>
147147
/// Every iteration through the returned <see cref="IAsyncEnumerable{McpClientTool}"/>
148-
/// will result in requerying the server and yielding the sequence of available tools.
148+
/// will result in re-querying the server and yielding the sequence of available tools.
149149
/// </para>
150150
/// </remarks>
151151
/// <example>
@@ -248,7 +248,7 @@ public static async Task<IList<McpClientPrompt>> ListPromptsAsync(
248248
/// </para>
249249
/// <para>
250250
/// Every iteration through the returned <see cref="IAsyncEnumerable{McpClientPrompt}"/>
251-
/// will result in requerying the server and yielding the sequence of available prompts.
251+
/// will result in re-querying the server and yielding the sequence of available prompts.
252252
/// </para>
253253
/// </remarks>
254254
/// <example>
@@ -396,7 +396,7 @@ public static async Task<IList<ResourceTemplate>> ListResourceTemplatesAsync(
396396
/// </para>
397397
/// <para>
398398
/// Every iteration through the returned <see cref="IAsyncEnumerable{ResourceTemplate}"/>
399-
/// will result in requerying the server and yielding the sequence of available resource templates.
399+
/// will result in re-querying the server and yielding the sequence of available resource templates.
400400
/// </para>
401401
/// </remarks>
402402
/// <example>
@@ -510,7 +510,7 @@ public static async Task<IList<Resource>> ListResourcesAsync(
510510
/// </para>
511511
/// <para>
512512
/// Every iteration through the returned <see cref="IAsyncEnumerable{Resource}"/>
513-
/// will result in requerying the server and yielding the sequence of available resources.
513+
/// will result in re-querying the server and yielding the sequence of available resources.
514514
/// </para>
515515
/// </remarks>
516516
/// <example>

src/ModelContextProtocol/Protocol/Messages/ProgressToken.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public ProgressToken(long value)
3737

3838
/// <inheritdoc />
3939
public override string? ToString() =>
40-
_token is string stringValue ? $"{stringValue}" :
40+
_token is string stringValue ? stringValue :
4141
_token is long longValue ? longValue.ToString(CultureInfo.InvariantCulture) :
4242
null;
4343

src/ModelContextProtocol/Server/AIFunctionMcpServerPrompt.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ public override async ValueTask<GetPromptResult> GetAsync(
263263
Messages = [.. chatMessages.SelectMany(chatMessage => chatMessage.ToPromptMessages())],
264264
},
265265

266-
null => throw new InvalidOperationException($"Null result returned from prompt function."),
266+
null => throw new InvalidOperationException("Null result returned from prompt function."),
267267

268268
_ => throw new InvalidOperationException($"Unknown result type '{result.GetType()}' returned from prompt function."),
269269
};

0 commit comments

Comments
 (0)