Table of Contents

Enum ToolApprovalMode

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

Specifies the default approval requirement for a tool invocation.

public enum ToolApprovalMode

Fields

Never = 0

The tool never requires approval. It is safe to execute automatically.

Conditional = 1

The tool may require approval depending on context (e.g., specific arguments or policy configuration). The runtime should check the permission policy.

Always = 2

The tool always requires explicit user approval before execution.

Examples

Reading the default approval mode of a built-in tool:

using LMKit.Agents.Tools;

IToolMetadata meta = (IToolMetadata)BuiltInTools.HttpPost; if (meta.DefaultApproval == ToolApprovalMode.Always) { Console.WriteLine($"Tool '{((ITool)meta).Name}' always requires user approval."); }

Remarks

This indicates whether user approval should be requested before a tool executes. The actual enforcement depends on the ToolPermissionPolicy configured on the agent or tool registry.

Share