Skip to content

Commit 6b6f7f4

Browse files
committed
Merge remote-tracking branch 'origin/main' into mbuck/api-experiments
2 parents 206b300 + d344c65 commit 6b6f7f4

File tree

83 files changed

+3555
-697
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+3555
-697
lines changed

.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ root = true
33

44
# C# files
55
[*.cs]
6+
csharp_style_namespace_declarations=file_scoped:warning
67

78
# Compiler
89
dotnet_diagnostic.CS1998.severity = suggestion # CS1998: Missing awaits

.github/workflows/ci-build-test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ on:
1818
- "src/**"
1919
- "tests/**"
2020
- "samples/**"
21+
- "docs/**"
2122

2223
permissions:
2324
contents: read

ModelContextProtocol.slnx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,34 @@
88
<File Path=".github/workflows/release.md" />
99
<File Path=".github/workflows/release.yml" />
1010
</Folder>
11+
<Folder Name="/docs/" />
12+
<Folder Name="/docs/concepts/" />
13+
<Folder Name="/docs/concepts/elicitation/" />
14+
<Folder Name="/docs/concepts/elicitation/samples/" />
15+
<Folder Name="/docs/concepts/elicitation/samples/client/">
16+
<Project Path="docs/concepts/elicitation/samples/client/ElicitationClient.csproj" />
17+
</Folder>
18+
<Folder Name="/docs/concepts/elicitation/samples/server/">
19+
<Project Path="docs/concepts/elicitation/samples/server/Elicitation.csproj" />
20+
</Folder>
21+
<Folder Name="/docs/concepts/logging/" />
22+
<Folder Name="/docs/concepts/logging/samples/" />
23+
<Folder Name="/docs/concepts/logging/samples/client/">
24+
<Project Path="docs/concepts/logging/samples/client/LoggingClient.csproj" />
25+
</Folder>
26+
<Folder Name="/docs/concepts/logging/samples/server/">
27+
<Project Path="docs/concepts/logging/samples/server/Logging.csproj" />
28+
</Folder>
29+
<Folder Name="/docs/concepts/progress/" />
30+
<Folder Name="/docs/concepts/progress/samples/" />
31+
<Folder Name="/docs/concepts/progress/samples/client/">
32+
<Project Path="docs/concepts/progress/samples/client/ProgressClient.csproj" />
33+
</Folder>
34+
<Folder Name="/docs/concepts/progress/samples/server/">
35+
<Project Path="docs/concepts/progress/samples/server/Progress.csproj" />
36+
</Folder>
1137
<Folder Name="/samples/">
38+
<Project Path="samples/AspNetCoreMcpPerSessionTools/AspNetCoreMcpPerSessionTools.csproj" />
1239
<Project Path="samples/AspNetCoreMcpServer/AspNetCoreMcpServer.csproj" />
1340
<Project Path="samples/ChatWithTools/ChatWithTools.csproj" />
1441
<Project Path="samples/EverythingServer/EverythingServer.csproj" />

docs/concepts/elicitation/elicitation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ Servers request structured data from users with the [ElicitAsync] extension meth
1515
The C# SDK registers an instance of [McpServer] with the dependency injection container,
1616
so tools can simply add a parameter of type [McpServer] to their method signature to access it.
1717

18-
[ElicitAsync]: https://modelcontextprotocol.github.io/csharp-sdk/api/ModelContextProtocol.Server.McpServerExtensions.html#ModelContextProtocol_Server_McpServerExtensions_ElicitAsync_ModelContextProtocol_Server_McpServer_ModelContextProtocol_Protocol_ElicitRequestParams_System_Threading_CancellationToken_
19-
[McpServer]: https://modelcontextprotocol.github.io/csharp-sdk/api/ModelContextProtocol.Server.McpServer.html
18+
[ElicitAsync]: https://modelcontextprotocol.github.io/csharp-sdk/api/ModelContextProtocol.Server.McpServerExtensions.html#ModelContextProtocol_Server_McpServerExtensions_ElicitAsync_ModelContextProtocol_Server_IMcpServer_ModelContextProtocol_Protocol_ElicitRequestParams_System_Threading_CancellationToken_
19+
[IMcpServer]: https://modelcontextprotocol.github.io/csharp-sdk/api/ModelContextProtocol.Server.IMcpServer.html
2020

2121
The MCP Server must specify the schema of each input value it is requesting from the user.
2222
Only primitive types (string, number, boolean) are supported for elicitation requests.

docs/concepts/elicitation/samples/client/ElicitationClient.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="ModelContextProtocol.Core" Version="0.3.0-preview.3" />
11+
<ProjectReference Include="../../../../../src/ModelContextProtocol.Core/ModelContextProtocol.Core.csproj" />
1212
</ItemGroup>
1313

1414
</Project>

docs/concepts/elicitation/samples/client/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@
5656
async ValueTask<ElicitResult> HandleElicitationAsync(ElicitRequestParams? requestParams, CancellationToken token)
5757
{
5858
// Bail out if the requestParams is null or if the requested schema has no properties
59-
if (requestParams?.RequestedSchema?.Properties == null)
59+
if (requestParams is null || requestParams.RequestedSchema?.Properties is null)
6060
{
6161
return new ElicitResult();
6262
}
6363

6464
// Process the elicitation request
65-
if (requestParams?.Message is not null)
65+
if (requestParams.Message is not null)
6666
{
6767
Console.WriteLine(requestParams.Message);
6868
}

docs/concepts/elicitation/samples/server/Elicitation.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="ModelContextProtocol.AspNetCore" Version="0.3.0-preview.3" />
10+
<ProjectReference Include="../../../../../src/ModelContextProtocol.AspNetCore/ModelContextProtocol.AspNetCore.csproj" />
1111
</ItemGroup>
1212

1313
</Project>

0 commit comments

Comments
 (0)