Skip to content

Commit 0114de7

Browse files
authored
Update to MCP conformance tests version 0.1.13 (#1249)
1 parent e55ae7b commit 0114de7

4 files changed

Lines changed: 98 additions & 30 deletions

File tree

package-lock.json

Lines changed: 55 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
"private": true,
33
"description": "Pinned npm dependencies for MCP C# SDK integration and conformance tests",
44
"dependencies": {
5-
"@modelcontextprotocol/conformance": "0.1.10",
6-
"@modelcontextprotocol/sdk": "1.25.3",
5+
"@modelcontextprotocol/conformance": "0.1.13",
76
"@modelcontextprotocol/server-everything": "2025.12.18",
87
"@modelcontextprotocol/server-memory": "2026.1.26"
98
}

tests/ModelContextProtocol.ConformanceServer/Tools/ConformanceTools.cs

Lines changed: 41 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -332,16 +332,49 @@ public static async Task<string> ElicitationSep1330Enums(
332332
{
333333
Properties =
334334
{
335-
["color"] = new ElicitRequestParams.UntitledSingleSelectEnumSchema()
335+
["untitledSingle"] = new ElicitRequestParams.UntitledSingleSelectEnumSchema()
336336
{
337-
Description = "Choose a color",
338-
Enum = ["red", "green", "blue"]
337+
Description = "Choose an option",
338+
Enum = ["option1", "option2", "option3"]
339339
},
340-
["size"] = new ElicitRequestParams.UntitledSingleSelectEnumSchema()
340+
["titledSingle"] = new ElicitRequestParams.TitledSingleSelectEnumSchema()
341341
{
342-
Description = "Choose a size",
343-
Enum = ["small", "medium", "large"],
344-
Default = "medium"
342+
Description = "Choose a titled option",
343+
OneOf =
344+
[
345+
new() { Const = "value1", Title = "First Option" },
346+
new() { Const = "value2", Title = "Second Option" },
347+
new() { Const = "value3", Title = "Third Option" }
348+
]
349+
},
350+
#pragma warning disable MCP9001
351+
["legacyEnum"] = new ElicitRequestParams.LegacyTitledEnumSchema()
352+
{
353+
Description = "Choose a legacy option",
354+
Enum = ["opt1", "opt2", "opt3"],
355+
EnumNames = ["Option One", "Option Two", "Option Three"]
356+
},
357+
#pragma warning restore MCP9001
358+
["untitledMulti"] = new ElicitRequestParams.UntitledMultiSelectEnumSchema()
359+
{
360+
Description = "Choose multiple options",
361+
Items = new ElicitRequestParams.UntitledEnumItemsSchema
362+
{
363+
Enum = ["option1", "option2", "option3"]
364+
}
365+
},
366+
["titledMulti"] = new ElicitRequestParams.TitledMultiSelectEnumSchema()
367+
{
368+
Description = "Choose multiple titled options",
369+
Items = new ElicitRequestParams.TitledEnumItemsSchema
370+
{
371+
AnyOf =
372+
[
373+
new() { Const = "value1", Title = "First Choice" },
374+
new() { Const = "value2", Title = "Second Choice" },
375+
new() { Const = "value3", Title = "Third Choice" }
376+
]
377+
}
345378
}
346379
}
347380
};
@@ -354,8 +387,7 @@ public static async Task<string> ElicitationSep1330Enums(
354387

355388
if (result.Action == "accept" && result.Content != null)
356389
{
357-
return $"Accepted with values: color={result.Content["color"].GetString()}, " +
358-
$"size={result.Content["size"].GetString()}";
390+
return $"Elicitation completed: action={result.Action}, content={result.Content}";
359391
}
360392
else
361393
{

tests/ModelContextProtocol.ConformanceServer/appsettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
"Microsoft.AspNetCore": "Warning"
66
}
77
},
8-
"AllowedHosts": "*"
8+
"AllowedHosts": "localhost;127.0.0.1;[::1]"
99
}

0 commit comments

Comments
 (0)