From ee9b04b7e5338f490e9307ce3dcb097b8ed961fc Mon Sep 17 00:00:00 2001 From: Gavin Luo Date: Tue, 20 May 2025 20:10:29 +0800 Subject: [PATCH] Update README.md (#437) fix example error --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ed89bfa..6ad5aa8 100644 --- a/README.md +++ b/README.md @@ -169,7 +169,7 @@ McpServerOptions options = new() Tools = new ToolsCapability() { ListToolsHandler = (request, cancellationToken) => - Task.FromResult(new ListToolsResult() + ValueTask.FromResult(new ListToolsResult() { Tools = [ @@ -202,7 +202,7 @@ McpServerOptions options = new() throw new McpException("Missing required argument 'message'"); } - return Task.FromResult(new CallToolResponse() + return ValueTask.FromResult(new CallToolResponse() { Content = [new Content() { Text = $"Echo: {message}", Type = "text" }] });