When the tool catalog becomes the prompt
A 192-run Microsoft.Extensions.AI benchmark compares sending 8 or 64 tools on every request with a RequestTools discovery function. At 64 tools, billed tokens drop by about 2.5x. At 8 tools, the extra round trip costs more than it saves.
ToolCatalog catalog = new ToolCatalogBuilder()
.AddTool("github", githubSearch)
.AddTool("jira", jiraSearch)
.AddTool("database", queryDatabase, tags: ["sql", "postgres"])
.Build();
AIFunction requestTools = catalog.CreateRequestToolsFunction();Register the catalog in process. Put RequestTools on the request. Attach matches during the function loop.