diff --git a/Directory.Packages.props b/Directory.Packages.props
index b1af09c22..78133ed99 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -3,7 +3,7 @@
true
9.0.5
10.0.0-preview.4.25258.110
- 9.5.0
+ 9.6.0
@@ -50,7 +50,7 @@
all
-
+
diff --git a/src/ModelContextProtocol.Core/McpJsonUtilities.cs b/src/ModelContextProtocol.Core/McpJsonUtilities.cs
index b075e1263..1f0a30898 100644
--- a/src/ModelContextProtocol.Core/McpJsonUtilities.cs
+++ b/src/ModelContextProtocol.Core/McpJsonUtilities.cs
@@ -85,30 +85,6 @@ internal static bool IsValidMcpToolSchema(JsonElement element)
return false; // No type keyword found.
}
- internal static JsonElement? GetReturnSchema(this AIFunction function, AIJsonSchemaCreateOptions? schemaCreateOptions)
- {
- // TODO replace with https://github.com/dotnet/extensions/pull/6447 once merged.
- if (function.UnderlyingMethod?.ReturnType is not Type returnType)
- {
- return null;
- }
-
- if (returnType == typeof(void) || returnType == typeof(Task) || returnType == typeof(ValueTask))
- {
- // Do not report an output schema for void or Task methods.
- return null;
- }
-
- if (returnType.IsGenericType && returnType.GetGenericTypeDefinition() is Type genericTypeDef &&
- (genericTypeDef == typeof(Task<>) || genericTypeDef == typeof(ValueTask<>)))
- {
- // Extract the real type from Task or ValueTask if applicable.
- returnType = returnType.GetGenericArguments()[0];
- }
-
- return AIJsonUtilities.CreateJsonSchema(returnType, serializerOptions: function.JsonSerializerOptions, inferenceOptions: schemaCreateOptions);
- }
-
// Keep in sync with CreateDefaultOptions above.
[JsonSourceGenerationOptions(JsonSerializerDefaults.Web,
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull,
@@ -157,6 +133,7 @@ internal static bool IsValidMcpToolSchema(JsonElement element)
[JsonSerializable(typeof(SubscribeRequestParams))]
[JsonSerializable(typeof(UnsubscribeRequestParams))]
[JsonSerializable(typeof(IReadOnlyDictionary))]
+ [JsonSerializable(typeof(PromptMessage[]))]
// Primitive types for use in consuming AIFunctions
[JsonSerializable(typeof(string))]
diff --git a/src/ModelContextProtocol.Core/Server/AIFunctionMcpServerPrompt.cs b/src/ModelContextProtocol.Core/Server/AIFunctionMcpServerPrompt.cs
index 9e1cdbcea..479a00042 100644
--- a/src/ModelContextProtocol.Core/Server/AIFunctionMcpServerPrompt.cs
+++ b/src/ModelContextProtocol.Core/Server/AIFunctionMcpServerPrompt.cs
@@ -71,6 +71,7 @@ private static AIFunctionFactoryOptions CreateAIFunctionFactoryOptions(
Description = options?.Description,
MarshalResult = static (result, _, cancellationToken) => new ValueTask