Table of Contents

Enum ToolChoice

Namespace
LMKit.Agents.Tools
Assembly
LM-Kit.NET.dll

Controls how (or whether) the assistant may invoke registered tools during a turn.

public enum ToolChoice

Fields

Auto = 0

The model may call a tool if needed, or answer directly without any tool call. Recommended default for most scenarios.

Required = 1

The model must call at least one tool before producing the final answer. If the model replies without a tool call, your runtime should nudge or re-prompt.

None = 2

Disable tool usage for this turn; the model must answer without calling any tool. Useful for purely generative responses or when external actions are unsafe.

Specific = 3

The model must call a specific tool (provided separately by name) first. Typically used to enforce a known workflow step (e.g., “use web_search now”).

Remarks

Use this to influence tool-calling behavior on a per-turn basis, e.g., when you want to force a lookup, forbid external actions, or let the model decide. When using Specific, pair it with a separate setting that supplies the target tool name (e.g., a "ForcedToolName" string in your policy object).