Table of Contents

Constructor SkillResourceTool

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

SkillResourceTool(SkillRegistry, string, int)

Initializes a new instance of the SkillResourceTool class.

public SkillResourceTool(SkillRegistry registry, string name = "load_skill_resource", int maxContentLength = 65536)

Parameters

registry SkillRegistry

The skill registry to access resources from.

name string

The tool name. Defaults to DefaultName (load_skill_resource).

maxContentLength int

Maximum content length to return. Defaults to DefaultMaxContentLength (64KB). Larger files will be truncated with a warning.

Examples

Creating and registering a SkillResourceTool:

var registry = new SkillRegistry();
registry.LoadFromDirectory("./skills");

// Default configuration
var resourceTool = new SkillResourceTool(registry);

// Custom max content length (128KB)
var largerTool = new SkillResourceTool(registry, maxContentLength: 131072);

conversation.Tools.Register(resourceTool);

Exceptions

ArgumentNullException

Thrown when registry is null.