Class BuiltInToolSelection
Fluent selection builder used by ToolRegistry built-in registration APIs.
public sealed class BuiltInToolSelection
- Inheritance
-
BuiltInToolSelection
- Inherited Members
Examples
Registering data + numeric tools while excluding the calculator:
using LMKit.Agents;
using LMKit.Agents.Tools;
using LMKit.Agents.Tools.BuiltIn;
var agent = Agent.CreateBuilder(model)
.WithTools(tools => tools.AddBuiltIn(s => s
.Categories("data", "numeric")
.Exclude("calculator")
.MaxRisk(ToolRiskLevel.Medium)))
.Build();
Methods
- Category(string)
Restricts the selection to tools belonging to the category identified by its string key (for example,
"io","net","data"). Multiple calls are cumulative; a tool matches if it belongs to any of the specified categories.
- Exclude(string)
Adds a tool name to the exclusion list. Excluded tools are always removed from the result, regardless of other filters.
- Include(string)
Adds a tool name to the inclusion list. When at least one name is included, only tools whose name appears in the list are selected.
- MaxRisk(ToolRiskLevel)
Sets the maximum allowable risk level. Tools with a RiskLevel above this threshold are excluded.