Table of Contents

Constructor LMFunctionAttribute

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

LMFunctionAttribute(string, string)

Creates a new LMFunctionAttribute.

public LMFunctionAttribute(string name, string description)

Parameters

name string

The stable identifier for the function (recommended: lowercase snake_case). Leading/trailing quotes and dots are trimmed.

description string

A short, imperative summary of what the function does (≈200 chars or fewer recommended). Leading/trailing quotes and dots are trimmed.

Examples

public sealed class WeatherService
{
    [LMFunction("get_weather", "Get current weather for a location.")]
    public string GetWeather(string location, bool includeForecast = false)
    {
        // ...
    }
}

Exceptions

ArgumentNullException

Thrown when name or description is null, empty, or whitespace.