Property ForcedToolName
ForcedToolName
public string ForcedToolName { get; set; }
Property Value
Examples
Example: Forcing a calculator tool
using LMKit.Agents.Tools;
var policy = new ToolCallPolicy
{
Choice = ToolChoice.Specific,
ForcedToolName = "calculator"
};
// The agent will be required to call the "calculator" tool
// before producing its response
Remarks
Tool name comparison uses ordinal (case-sensitive) string comparison. The name must exactly match a tool registered in the agent's tool registry.
Before prompting the model, the runtime should validate that a tool with this name exists. If the tool is not found, an error should be raised.