Skip to content

Commit e7b403b

Browse files
Fix comments on McpServerTool/Prompt/Resource (#866)
They were a bit out of date with the implementation. Co-authored-by: Stephen Halter <[email protected]>
1 parent 1f97301 commit e7b403b

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

src/ModelContextProtocol.Core/Server/McpServerPrompt.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,13 @@ namespace ModelContextProtocol.Server;
105105
/// <description>Converted to a list of <see cref="PromptMessage"/> instances derived from the <see cref="ChatMessage"/> with <see cref="AIContentExtensions.ToPromptMessages"/>.</description>
106106
/// </item>
107107
/// <item>
108-
/// <term><see cref="IEnumerable{PromptMessage}"/> of <see cref="PromptMessage"/></term>
108+
/// <term><see cref="IEnumerable{ChatMessage}"/> of <see cref="ChatMessage"/></term>
109109
/// <description>Converted to a list of <see cref="PromptMessage"/> instances derived from all of the <see cref="ChatMessage"/> instances with <see cref="AIContentExtensions.ToPromptMessages"/>.</description>
110110
/// </item>
111+
/// <item>
112+
/// <term><see cref="GetPromptResult"/></term>
113+
/// <description>Returned directly without modification.</description>
114+
/// </item>
111115
/// </list>
112116
/// <para>
113117
/// Other returned types will result in an <see cref="InvalidOperationException"/> being thrown.

src/ModelContextProtocol.Core/Server/McpServerResource.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ namespace ModelContextProtocol.Server;
9090
/// <description>Wrapped in a list containing the single <see cref="ResourceContents"/>.</description>
9191
/// </item>
9292
/// <item>
93-
/// <term><see cref="TextContentBlock"/></term>
93+
/// <term><see cref="TextContent"/></term>
9494
/// <description>Converted to a list containing a single <see cref="TextResourceContents"/>.</description>
9595
/// </item>
9696
/// <item>
@@ -113,6 +113,10 @@ namespace ModelContextProtocol.Server;
113113
/// <term><see cref="IEnumerable{String}"/> of <see cref="string"/></term>
114114
/// <description>Converted to a list containing a <see cref="TextResourceContents"/>, one for each <see cref="string"/>.</description>
115115
/// </item>
116+
/// <item>
117+
/// <term><see cref="ReadResourceResult"/></term>
118+
/// <description>Returned directly without modification.</description>
119+
/// </item>
116120
/// </list>
117121
/// <para>
118122
/// Other returned types will result in an <see cref="InvalidOperationException"/> being thrown.

src/ModelContextProtocol.Core/Server/McpServerTool.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,6 @@ namespace ModelContextProtocol.Server;
110110
/// <description>Returned as a single-item <see cref="ContentBlock"/> list.</description>
111111
/// </item>
112112
/// <item>
113-
/// <term><see cref="IEnumerable{String}"/> of <see cref="string"/></term>
114-
/// <description>Each <see cref="string"/> is converted to a <see cref="TextContentBlock"/> object with its text set to the string value.</description>
115-
/// </item>
116-
/// <item>
117113
/// <term><see cref="IEnumerable{AIContent}"/> of <see cref="AIContent"/></term>
118114
/// <description>Each <see cref="AIContent"/> is converted to a <see cref="ContentBlock"/> object using <see cref="AIContentExtensions.ToContent(AIContent)"/>.</description>
119115
/// </item>

0 commit comments

Comments
 (0)