microsoft / microsoft/agent-framework
.NET: Support programmatic parameter descriptions in AIFunctionFactory
@stephentoub is already working on this.
Since Dec 3, 2025.
- Dominant language
- Python
- Stars
- 13.6k
- Forks
- 2.3k
- Avg merge
- 2d 45m
- Merged PRs (30d)
- 358
Description
Hello,
I have an issue regarding tool definitions.
AIFunctionFactory.Create cannot set parameter descriptions programmatically. It must use [Description] attributes in code, preventing external configuration.
Right now, parameter descriptions can only come from [Description] attributes in code:
public async Task<string> SearchAsync(
[Description("The search query")] // Must be in code
string query
)
This means every time I want to tweak a parameter description to improve tool selection, I need to deploy new code. For comparison, I can already set the function name and description externally via AIFunctionFactoryOptions, but there's no equivalent for parameters.
Right now I'm stuck with a hybrid approach (function descriptions external, parameter descriptions in code), but it would be great to have consistency.
Let me know if you need any clarification or if there's a workaround I missed :)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.