How to Use an Enum Parameter in a Microsoft Agent Framework Function Tool in C#
Some tool parameters can only take a few values: a size, a priority, a status. Make such a parameter a C# enum, and Microsoft Agent Framework tells the model exactly which values exist, so it picks one of them instead of making one up. One thing still gets through: a number that isn't one of the values. This guide shows both with a small coffee-ordering agent and a real model, and adds the one-line check that closes the gap.
