Skip to content

Commit 08a9f5f

Browse files
jeffhandleymikekistlerstephentoub
authored
Apply suggestions from code review
Co-authored-by: Mike Kistler <mikekistler@microsoft.com> Co-authored-by: Stephen Toub <stoub@microsoft.com>
1 parent d79aa0f commit 08a9f5f

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

docs/concepts/pagination/pagination.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,6 @@ builder.Services.AddMcpServer()
9696

9797
> [!NOTE]
9898
> The cursor format is opaque to the client. Servers can use any encoding scheme (numeric offsets, encoded tokens, database cursors, etc.) as long as they can parse their own cursors on subsequent requests.
99+
100+
> [!NOTE]
101+
> Because the cursor format is opaque to the client, _any_ value specified in the cursor, including the empty string, signals that more results are available. If an MCP server erroneously sends an empty string cursor with the final page of results, clients can implement their own low-level pagination scheme to work around this case.

docs/concepts/prompts/prompts.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,10 @@ public class CodePrompts
5050
[McpServerPrompt, Description("Generates a code review prompt")]
5151
public static IEnumerable<ChatMessage> CodeReview(
5252
[Description("The programming language")] string language,
53-
[Description("The code to review")] string code)
54-
{
55-
return
53+
[Description("The code to review")] string code) =>
5654
[
57-
new ChatMessage(ChatRole.User,
58-
$"Please review the following {language} code:\n\n```{language}\n{code}\n```"),
59-
new ChatMessage(ChatRole.Assistant,
60-
"I'll review the code for correctness, style, and potential improvements.")
55+
new(ChatRole.User, $"Please review the following {language} code:\n\n```{language}\n{code}\n```"),
56+
new(ChatRole.Assistant, "I'll review the code for correctness, style, and potential improvements.")
6157
];
6258
}
6359
}

docs/concepts/resources/resources.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ builder.Services.AddMcpServer()
215215
if (ctx.Params?.Uri is { } uri)
216216
{
217217
// Track the subscription (e.g., in a concurrent dictionary)
218-
subscriptions.TryAdd(uri, ctx.Server.SessionId);
218+
subscriptions[context.Server.SessionId].TryAdd(uri, 0);
219219
}
220220
return new EmptyResult();
221221
})

docs/concepts/transports/transports.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ MCP uses a [transport layer] to handle the communication between clients and ser
1313

1414
### stdio transport
1515

16-
The stdio transport communicates over standard input and output streams. It is best suited for local integrations where the MCP server runs as a child process of the client.
16+
The stdio transport communicates over standard input and output streams. It is best suited for local integrations, as the MCP server runs as a child process of the client.
1717

1818
#### stdio client
1919

0 commit comments

Comments
 (0)