Table of Contents

Interface ITool

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

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.

public interface ITool

Properties

Description

Concise, human-readable summary of what the tool does. This text is surfaced to the model and influences tool selection. Prefer an imperative, single sentence (≈ 200 chars or fewer).

InputSchema

JSON Schema (Draft-07 subset) describing the expected input arguments object. Aligned with MCP naming (inputSchema). Provide this schema when registering the tool.

Name

Stable, unique identifier for the tool (e.g., get_weather). Used by the LLM to reference this tool; keep it stable across versions.

Methods

InvokeAsync(string, CancellationToken)

Executes the tool with the provided JSON argument payload and returns a JSON payload result.