Skip to content

Commit 49fbc51

Browse files
Copilotstephentoubhalter73
authored
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 <stoub@microsoft.com> Co-authored-by: Stephen Halter <halter73@gmail.com>
1 parent 4cef394 commit 49fbc51

3 files changed

Lines changed: 10 additions & 8 deletions

File tree

src/ModelContextProtocol.Core/Client/McpClient.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ public abstract partial class McpClient : McpSession
3535
/// <remarks>
3636
/// <para>
3737
/// This property contains instructions provided by the server during initialization that explain
38-
/// how to effectively use its capabilities. These instructions can include details about available
39-
/// tools, expected input formats, limitations, or any other helpful information.
38+
/// how to effectively use its capabilities. They should focus on guidance that helps a model
39+
/// use the server effectively and should avoid duplicating tool, prompt, or resource descriptions.
4040
/// </para>
4141
/// <para>
42-
/// This can be used by clients to improve an LLM's understanding of available tools, prompts, and resources.
42+
/// This can be used by clients to improve an LLM's understanding of how to use the server.
4343
/// It can be thought of like a "hint" to the model and can be added to a system prompt.
4444
/// </para>
4545
/// </remarks>

src/ModelContextProtocol.Core/Protocol/InitializeResult.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,10 @@ public sealed class InitializeResult : Result
6565
/// </summary>
6666
/// <remarks>
6767
/// <para>
68-
/// These instructions provide guidance to clients on how to effectively use the server's capabilities.
69-
/// They can include details about available tools, expected input formats, limitations,
70-
/// or any other information that helps clients interact with the server properly.
68+
/// These instructions should focus on guidance that helps a model use the server effectively,
69+
/// such as workflow tips, capability relationships, and server-specific conventions.
70+
/// They should avoid repeating tool descriptions, prompt descriptions, or resource descriptions
71+
/// that are already available through other protocol responses.
7172
/// </para>
7273
/// <para>
7374
/// Client applications often use these instructions as system messages for LLM interactions

src/ModelContextProtocol.Core/Server/McpServerOptions.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,9 @@ public sealed class McpServerOptions
5454
/// </summary>
5555
/// <remarks>
5656
/// These instructions are sent to clients during the initialization handshake and provide
57-
/// guidance on how to effectively use the server's capabilities. They can include details
58-
/// about available tools, expected input formats, limitations, or other helpful information.
57+
/// guidance on how to effectively use the server's capabilities. They should focus on
58+
/// information that helps models use the server effectively and should not duplicate
59+
/// tool, prompt, or resource descriptions already exposed elsewhere.
5960
/// Client applications typically use these instructions as system messages for LLM interactions
6061
/// to provide context about available functionality.
6162
/// </remarks>

0 commit comments

Comments
 (0)