From 49fbc513f0ca53ce3822683bc95126178536cdd8 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Feb 2026 15:39:50 -0500 Subject: [PATCH] Align `InitializeResult.instructions` XML docs with latest MCP spec guidance (#1290) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com> Co-authored-by: Stephen Toub Co-authored-by: Stephen Halter --- src/ModelContextProtocol.Core/Client/McpClient.cs | 6 +++--- src/ModelContextProtocol.Core/Protocol/InitializeResult.cs | 7 ++++--- src/ModelContextProtocol.Core/Server/McpServerOptions.cs | 5 +++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/ModelContextProtocol.Core/Client/McpClient.cs b/src/ModelContextProtocol.Core/Client/McpClient.cs index abd556f..28a37f2 100644 --- a/src/ModelContextProtocol.Core/Client/McpClient.cs +++ b/src/ModelContextProtocol.Core/Client/McpClient.cs @@ -35,11 +35,11 @@ public abstract partial class McpClient : McpSession /// /// /// This property contains instructions provided by the server during initialization that explain - /// how to effectively use its capabilities. These instructions can include details about available - /// tools, expected input formats, limitations, or any other helpful information. + /// how to effectively use its capabilities. They should focus on guidance that helps a model + /// use the server effectively and should avoid duplicating tool, prompt, or resource descriptions. /// /// - /// This can be used by clients to improve an LLM's understanding of available tools, prompts, and resources. + /// This can be used by clients to improve an LLM's understanding of how to use the server. /// It can be thought of like a "hint" to the model and can be added to a system prompt. /// /// diff --git a/src/ModelContextProtocol.Core/Protocol/InitializeResult.cs b/src/ModelContextProtocol.Core/Protocol/InitializeResult.cs index 095b5ff..e791136 100644 --- a/src/ModelContextProtocol.Core/Protocol/InitializeResult.cs +++ b/src/ModelContextProtocol.Core/Protocol/InitializeResult.cs @@ -65,9 +65,10 @@ public sealed class InitializeResult : Result /// /// /// - /// These instructions provide guidance to clients on how to effectively use the server's capabilities. - /// They can include details about available tools, expected input formats, limitations, - /// or any other information that helps clients interact with the server properly. + /// These instructions should focus on guidance that helps a model use the server effectively, + /// such as workflow tips, capability relationships, and server-specific conventions. + /// They should avoid repeating tool descriptions, prompt descriptions, or resource descriptions + /// that are already available through other protocol responses. /// /// /// Client applications often use these instructions as system messages for LLM interactions diff --git a/src/ModelContextProtocol.Core/Server/McpServerOptions.cs b/src/ModelContextProtocol.Core/Server/McpServerOptions.cs index e13b4d3..9d30c72 100644 --- a/src/ModelContextProtocol.Core/Server/McpServerOptions.cs +++ b/src/ModelContextProtocol.Core/Server/McpServerOptions.cs @@ -54,8 +54,9 @@ public sealed class McpServerOptions /// /// /// These instructions are sent to clients during the initialization handshake and provide - /// guidance on how to effectively use the server's capabilities. They can include details - /// about available tools, expected input formats, limitations, or other helpful information. + /// guidance on how to effectively use the server's capabilities. They should focus on + /// information that helps models use the server effectively and should not duplicate + /// tool, prompt, or resource descriptions already exposed elsewhere. /// Client applications typically use these instructions as system messages for LLM interactions /// to provide context about available functionality. ///