Namespace LMKit.Agents.Tools
Classes
- ToolCall
Represents a single tool/function call emitted by a model.
A ToolCall is produced by parsing the model’s structured tool-call output and is then used by the runtime to dispatch the call: look up the matching ITool by Name and invoke it with ArgumentsJson.
The Id is intended for correlation across the request/response cycle: include the same identifier when returning the corresponding tool result so the model can associate each result with its originating call.
- ToolCallPolicy
Per-turn policy that governs if and how the assistant may invoke registered tools.
- ToolCallResult
Represents the outcome of executing a single tool call.
Instances of ToolCallResult are created by the runtime after invoking a tool and are sent back into the chat loop so the model can produce a final answer that incorporates the tool output.
The result is correlated to its originating request via ToolCallId. The payload itself is provided as JSON in ResultJson and is classified via Type.
- ToolRegistry
Registry for ITool instances that can be exposed to models/agents.
Tools are stored by their stable Name (case-sensitive, using Ordinal). The registry provides read-only enumeration of registered tools and name-based lookup.
Interfaces
- ITool
Contract for a model-callable tool (“function”) that an LM-Kit agent can expose to an LLM. The model discovers the tool via Name, inspects Description and InputSchema, and invokes InvokeAsync(string, CancellationToken) with JSON
arguments
.
Enums
- ToolCallResultType
Classifies the outcome of invoking a single model-callable tool.
Consumers MUST handle unknown values defensively to remain forward-compatible with newer SDK versions (e.g., by treating unknown values as Error or logging and continuing).
- ToolChoice
Controls how (or whether) the assistant may invoke registered tools during a turn.