Parsed the argument schemas of tools without the reflection-based serializer

This commit is contained in:
Thorsten Sommer committed 2026-11-02 19:21:08 +01:00
1 parent 9e78f5055e
commit 8fa083ae24
1 file changed
+2 -1
@@ -80,7 +80,8 @@ public sealed class ToolParameterSchemaBuilder
["additionalProperties"] = false, ["additionalProperties"] = false,
}; };
return JsonSerializer.Deserialize<JsonElement>(schema.ToJsonString()); using var document = JsonDocument.Parse(schema.ToJsonString());
return document.RootElement.Clone();
} }
private ToolParameterSchemaBuilder Add(string name, string jsonType, string description, bool isRequired, IReadOnlyList<string>? allowedValues = null) private ToolParameterSchemaBuilder Add(string name, string jsonType, string description, bool isRequired, IReadOnlyList<string>? allowedValues = null)