Namespace LMKit.Agents.Tools
Classes
- LMFunctionAttribute
- Marks an instance method as callable by LM-Kit’s tool binding and discovery. - Methods annotated with LMFunctionAttribute can be discovered and exposed as - IToolvia APIs such as- LMFunctionToolBinder.
- LMFunctionToolBinder
- Discovers methods annotated with LMFunctionAttribute and binds them to ITool adapters. - This type is stateless: each call inspects the provided instance/type/assembly via reflection, validates parameter types, and returns newly constructed ITool instances. 
- 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.